NginX times out connecting to java app

I have a Docker container running YaCy (source: , 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?

  • Rancher agent can't run on master server?
  • How to save config file inside a running container?
  • Kubernetes pods using too much memory on larger machines
  • Why does sendmail cli not send mails from docker containers?
  • Docker compose mysql connection failing
  • docker blockio can not monitor when using dd to test
  • 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.

  • Getting cron to run on php:7-fpm image [closed]
  • Where to keep Dockerfile's in a project?
  • Docker : Unable to run Docker commands
  • Using Kubernetes or Apache mesos
  • How Can I Change the VirtualBox VM that Docker is Connected To?
  • How to use source in docker?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.