Restore Admin Passwort

After restarting the MC docker instance on the server I was unable to log in with the user I used to log in to the system all the time. I am sure that the user and password are correct. What could be the reason? How can I recover the password?

You may try to run docker-compose down and docker-compose up -d. I just experienced the same after I restarted the nginx container… After doing so I can use the username and password to login again.

I am having the same issue now. Seems the previous trick does work for me this time.

The problem is that the certs expired but certbot was able to renew them but the files used by the docker images did not point to the correct updated ones.

I tried to restart the docker-containers and now the certs are valid (renewed) but seems all users are not found anymore. I enclose the logging in the docker container mobilecoach-server_tomcatservice_1 for reference:

2020-09-12 16:09:31,004 DEBUG           ch.ethz.mc.ui.AdminNavigatorUI [https-openssl-nio-443-exec-4] - Creating new UI Session object based on session 3A477C4EBC084354F8C5F908B3036526
2020-09-12 16:09:31,010 DEBUG           ch.ethz.mc.ui.AdminNavigatorUI [https-openssl-nio-443-exec-4] - Init admin navigator ui
2020-09-12 16:09:31,014 DEBUG            ch.ethz.mc.ui.views.LoginView [https-openssl-nio-443-exec-4] - Entered view LOGIN
2020-09-12 16:09:31,033 DEBUG           ch.ethz.mc.ui.AdminNavigatorUI [https-openssl-nio-443-exec-4] - View detached
2020-09-12 16:09:31,041 DEBUG ethz.mc.services.internal.LockingService [https-openssl-nio-443-exec-4] - Releasing lock of UI session
2020-09-12 16:09:31,042 DEBUG ethz.mc.services.internal.LockingService [https-openssl-nio-443-exec-4] - 0 locks remaining
2020-09-12 16:09:42,669 WARN              ch.ethz.mc.model.ModelObject [https-openssl-nio-443-exec-10] - Could not retrieve BackendUser with find one query {'username':#} and parameters [admin]: state should be: open
2020-09-12 16:09:42,670 DEBUG InterventionAdministrationManagerService [https-openssl-nio-443-exec-10] - Username 'admin' not found.

I tried to run docker exec -it mobilecoach-server_mongodbservice_1 bin/bas and run mongo inside the mongodb docker container. I run db.BackendUser.find({}) and it seems that the mongodb still stores the correct admins and their corresponding passwordHard are still correct. Where should I further check to solve this issue? Thanks.

Edit: Oh! I tried a few more times and suddenly it works.
I think this is an issue that need further investigation, may I know if we can raise an issue and check for the progress about that?

Can I get the full logs from the tomcat container when it failed?

My thoughts on this: I assume this happened when you renewed your SSL certificates with Letsencrypt. And it is possible that “keystore” file for tomcat was not generated properly with the ‘tomcat’ alias. When the question about, “Do you want to overwrite the alias?”, one needs to answer it as “yes”.

Is this one helpful enough?

2020-09-14 04:40:03,528 DEBUG          ch.ethz.mc.ui.UISessionListener [https-openssl-nio-443-exec-1] - UI Session 74B56C0AEE27708D8AF338BB46A5A1BD has been created
2020-09-14 04:40:03,530 DEBUG         ch.ethz.mc.servlets.AdminServlet [https-openssl-nio-443-exec-1] - Session started - setting timeouts
2020-09-14 04:40:03,530 DEBUG         ch.ethz.mc.servlets.AdminServlet [https-openssl-nio-443-exec-1] - Max inactive interval: 900
2020-09-14 04:40:03,530 DEBUG         ch.ethz.mc.servlets.AdminServlet [https-openssl-nio-443-exec-1] - Heartbeat interval: 300
2020-09-14 04:40:03,531 DEBUG         ch.ethz.mc.servlets.AdminServlet [https-openssl-nio-443-exec-1] - Close idle sessions: true
2020-09-14 04:40:03,871 DEBUG           ch.ethz.mc.ui.AdminNavigatorUI [https-openssl-nio-443-exec-6] - Creating new UI Session object based on session 74B56C0AEE27708D8AF338BB46A5A1BD
2020-09-14 04:40:03,875 DEBUG           ch.ethz.mc.ui.AdminNavigatorUI [https-openssl-nio-443-exec-6] - Init admin navigator ui
2020-09-14 04:40:03,875 DEBUG            ch.ethz.mc.ui.views.LoginView [https-openssl-nio-443-exec-6] - Entered view LOGIN
2020-09-14 04:40:12,959 DEBUG           ch.ethz.mc.ui.AdminNavigatorUI [https-openssl-nio-443-exec-2] - Creating new UI Session object based on session 74B56C0AEE27708D8AF338BB46A5A1BD
2020-09-14 04:40:12,960 DEBUG           ch.ethz.mc.ui.AdminNavigatorUI [https-openssl-nio-443-exec-2] - Init admin navigator ui
2020-09-14 04:40:12,960 DEBUG            ch.ethz.mc.ui.views.LoginView [https-openssl-nio-443-exec-2] - Entered view LOGIN
2020-09-14 04:40:19,411 DEBUG          ch.ethz.mc.ui.UISessionListener [https-openssl-nio-443-exec-10] - UI Session 4AC57C6BEBBF9D477CED1C76B2B2C74A has been created
2020-09-14 04:40:19,415 DEBUG         ch.ethz.mc.servlets.AdminServlet [https-openssl-nio-443-exec-10] - Session started - setting timeouts
2020-09-14 04:40:19,416 DEBUG         ch.ethz.mc.servlets.AdminServlet [https-openssl-nio-443-exec-10] - Max inactive interval: 900
2020-09-14 04:40:19,416 DEBUG         ch.ethz.mc.servlets.AdminServlet [https-openssl-nio-443-exec-10] - Heartbeat interval: 300
2020-09-14 04:40:19,416 DEBUG         ch.ethz.mc.servlets.AdminServlet [https-openssl-nio-443-exec-10] - Close idle sessions: true
2020-09-14 04:40:19,765 DEBUG           ch.ethz.mc.ui.AdminNavigatorUI [https-openssl-nio-443-exec-6] - Creating new UI Session object based on session 4AC57C6BEBBF9D477CED1C76B2B2C74A
2020-09-14 04:40:19,766 DEBUG           ch.ethz.mc.ui.AdminNavigatorUI [https-openssl-nio-443-exec-6] - Init admin navigator ui
2020-09-14 04:40:19,766 DEBUG            ch.ethz.mc.ui.views.LoginView [https-openssl-nio-443-exec-6] - Entered view LOGIN
2020-09-14 04:40:21,222 WARN              ch.ethz.mc.model.ModelObject [https-openssl-nio-443-exec-7] - Could not retrieve BackendUser with find one query {'username':#} and parameters [anna]: state should be: open
2020-09-14 04:40:21,223 DEBUG InterventionAdministrationManagerService [https-openssl-nio-443-exec-7] - Username 'anna' not found.
2020-09-14 04:40:39,468 WARN              ch.ethz.mc.model.ModelObject [https-openssl-nio-443-exec-6] - Could not retrieve BackendUser with find one query {'username':#} and parameters [anna]: state should be: open
2020-09-14 04:40:39,470 DEBUG InterventionAdministrationManagerService [https-openssl-nio-443-exec-6] - Username 'anna' not found.

Waiting for a few minutes and I saw this:

Sep 14, 2020 4:46:06 AM org.atmosphere.container.JSR356Endpoint onError
SEVERE:
java.io.EOFException
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1289)
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1260)
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1230)
	at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:72)
	at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
	at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
	at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)

Sep 14, 2020 4:46:06 AM org.atmosphere.container.JSR356Endpoint onError
SEVERE:
java.io.EOFException
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1289)
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1260)
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1230)
	at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:72)
	at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
	at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
	at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)

Sep 14, 2020 4:46:06 AM org.atmosphere.container.JSR356Endpoint onError
SEVERE:
java.io.EOFException
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1289)
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1260)
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1230)
	at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:72)
	at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
	at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
	at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)

Oh… I meant from when the container started. It can help me see if all the servlets and services started properly or not. If not there might not be a proper connection to the database and hence it fails. You can upload the logs or a file? Or send it to me via email psanthanam@ethz.ch.

Thanks! I have email you the log.

Finally I figured out that in ./deepstream/config.yml in the #Authentication section, the endpointUrl was https://<your_domain>:8443/MC/deepstream and I found that the cert involved here was expired. I changed the value to https://<your_domain>/MC/deepstream, then restart the deepstream and tomcat services and the login work again. I hope that solves the problem.