Update to 3.5.11 results in "502 Bad Gateway"
I tried to update our JATOS installation by clicking the corresponding button on the admin GUI.
However, it results in a "502 Bad Gateway" and the service crashes. I'vr tried this a couple of times now. Restarting JATOS starts up the old version again.
Has it occured for anyone else? Does anyone know a solution?
Thanks in advance!
-Yavor

Comments
Hi Yavor!
My updates worked so far. What do JATOS' logs say? In the log folder are several log files, application.log, update.log, loader.log. Are there any errors regarding the update?
Best
Kristian
Dear Kristian,
Thanks for the quick reply! I checked the logs. I think application.log had the right information. Sadly I am still not sure how to resolve it. For example, after initiating the update I get:
2021-04-08 11:51:49,441 [INFO] - gui_access - GET /jatos/updateAndRestart?backupAll=true (admin)
2021-04-08 11:51:49,442 [INFO] - g.c.JatosUpdater - Restart JATOS to finish update to version v3.5.11
2021-04-08 11:51:49,482 [ERROR] - g.ErrorHandler - Internal JATOS error
java.lang.IllegalStateException: cannot create children while terminating or terminated
I've attached a longer version of this as a txt file. Any help will be much appreciated!
-Yavor
Interesting: this error states a permission problem: java.lang.IllegalStateException: cannot create children while terminating or terminated
Which OS are you on? How do you run JATOS (docker, systemd, proxy)? What are your JATOS users permissions?
Best,
Kristian
Our JATOS install is running on a Linux-based VM handled by the univeristy's IT team. The IT guys installed it following the documentation, so I'm not sure how we're running it. Since I can use the "systemctl restart" command, I think were' using systemd.
The user that I'm trying to update from is the admin user.
Hi Yavor,
I checked your errors again and it's likely not a permission problem - I jumped to a conclusion there. It's more of a problem in JATOS that it can't correctly shutdown (for unknown reasons).
Since you can run `systemctl restart` I assume you have terminal access to the server. What happens if you start the update process manually with
(but please do a backup before you try it).
Best,
Kristian
Hi Kristian,
Thanks for the reply! This Thursday I will try what you suggested and write a status update here.
- Yavor
Hi Kristian,
I tried this, and it gives me this error:
Thu Apr 15 13:10:17 CEST 2021 JATOS didn't shut down. Cannot update. Exit.
Could it be that I'm trying to update from 3.5.5. all the way to 3.5.11?
-Yavor
Another update
After the unsucessful update today it was no longer possible to upload new studies. (an error 500)
I tried restarting the service, and now it's stuck at "502 Bad Gateway". Manually starting and stopping it also doesn't work...
Hi Yavor,
At this point I'd recommend to recover your old 3.5.5 from your backup and do a manual update. Although I'm quite curious what's causing the problems, without direct access to the server I can't say much.
Best,
Kristian
Hi Kristian,
Our JATOS is back up. It was most likely due to lack of storage space!
We're upgrading it, and then we'll try the update again. Thanks for your effort responding on these forums!
-Yavor