NginX times out connecting to java app
I have a Docker container running YaCy (source: https://hub.docker.com/r/luccioman/yacy/) , a java/Solr based P2P and local search engine.
It runs fine if I try access it locally (e.g with curl) over 10.x.x.x network, including from the webserver itself, but as soon as nginx needs to forward it, NginX times out with error 504 after 30 seconds.
I don’t get how this is possible, does anyone know what might cause this and where I can begin try fixing it?
Things I checked:
- setenforce 0 changes nothing, it’s not SELinux.
- The logs simply say it’s a time out, as if the upstream server doesn’t exist.
- I can access the server with curl from the webserver itself within milliseconds without any issue.