The 502 bad gateway error means that the back-end server is not functioning properly, and since it was related to Jenkins browser there could be some of the reasons:
- It would be related to not starting on boot time
Or
- Bad buffering/timeout configuration etc
For 1st case : running sudo service --status-all
lists all services on the system.
After finding the service name, you can start it using
sudo service spawn-fcgi start
or
sudo /etc/init.d/spawn-fcgi start
You need to make sure that it auto starts on boot, to find that you can easily google how to make a service start on boot, it's very simple.
For 2nd case: You can try increasing the buffer as well as timeout times.
http {
...
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
...
}
For more details, please refer the below links: