502 bad gateway

Hello everyone,
do you know how to deal with the 502 Bad Gatway issue on DHIS2 version 2.39.3?

502 Bad Gateway

502 Bad Gateway


This generally means that Tomcat is dead. You need to restart Tomcat. It could also be indicative of a misconfigured reverse proxy but I would start with Tomcat.

1 Like

Thank you Jason for your answer. Since I’m not an IT technician, could you support me on how to restart Tomcat? May I need to ask all my colleages in Africa and Europe to do that?

I thank you in advance.

Hi Paolo,
Yes, I think you may need to ask whoever is administering your DHIS2 server to restart the Tomcat server. The person administering your system should know what to do.

Good luck!

1 Like

My server is giving 502 after every couple of hours. It is not sustainable to keep on restarting tomcat and checking the catalina.out logs, there are no error messages before it goes out.

Tomcat 9
PostgreSQL 14
Ubuntu 18.04

Can you share the output for the dhis2 log before the 502

There are no error messages. Just info messages on the activity happening.

Well, I think I found the issue, so it’s kept online since then.

1 Like