Dokku: Site can't be reached: Server took too long to respond

Created on 22 Apr 2017  路  5Comments  路  Source: dokku/dokku

Description of problem:

I created the following droplet from Digital Ocean:

image

And then deployed a very simple Node.js Application: https://github.com/jaustinhughey/hello-world-node-express

The deployment was successful but when I visit the URL (http://107.170.42.232:4907) the request times out.

I checked the nginx config file: /home/dokku/app_name/nginx.conf and found that the local IP address is: 172.17.0.5:5000 so I curl inside the droplet to that url and got the proper response. So it seems that my external requests are not being passed to the Node process.

This is the output of nginx -t:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Thank you very much for the help, and for maintaining such an awesome project.

# Dokku Report:

-----> uname: Linux appdelante 4.4.0-63-generic #84-Ubuntu SMP Wed Feb 1 17:20:32 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
              total        used        free      shared  buff/cache   available
Mem:            488         169          69           2         249         278
Swap:           999          53         946
-----> docker version:
Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 06:50:14 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.13.1
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 06:50:14 2017
 OS/Arch:      linux/amd64
 Experimental: false
-----> docker daemon info:
Containers: 13
 Running: 3
 Paused: 0
 Stopped: 10
Images: 30
Server Version: 1.13.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 75
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1
runc version: 9df8b306d01f59d3a8029be411de015b7304dd8f
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-63-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 488.4 MiB
Name: appdelante
ID: QFRG:KDVJ:ZIFR:CO23:2L6Z:VCP7:BEG3:NFMP:QKEO:XVK6:C43W:AT4O
Docker Root Dir: /var/lib/docker
Debug Mode (client): true
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
-----> sigil version: 0.4.0
-----> herokuish version:
herokuish: 0.3.24
buildpacks:
  heroku-buildpack-multi     v1.0.0
  heroku-buildpack-ruby      v150
  heroku-buildpack-nodejs    v93
  heroku-buildpack-clojure   v75
  heroku-buildpack-python    v97
  heroku-buildpack-java      v48
  heroku-buildpack-gradle    v19
  heroku-buildpack-grails    v21
  heroku-buildpack-scala     v72
  heroku-buildpack-play      v26
  heroku-buildpack-php       v117
  heroku-buildpack-go        v54
  heroku-buildpack-erlang    fa17af9
  buildpack-nginx            v8
-----> dokku version: 0.8.0
-----> dokku plugins:
plugn: 0.2.2
  00_dokku-standard    0.8.0 enabled    dokku core standard plugin
  20_events            0.8.0 enabled    dokku core events logging plugin
  apps                 0.8.0 enabled    dokku core apps plugin
  build-env            0.8.0 enabled    dokku core build-env plugin
  certs                0.8.0 enabled    dokku core certificate management plugin
  checks               0.8.0 enabled    dokku core checks plugin
  common               0.8.0 enabled    dokku core common plugin
  config               0.8.0 enabled    dokku core config plugin
  docker-options       0.8.0 enabled    dokku core docker-options plugin
  domains              0.8.0 enabled    dokku core domains plugin
  enter                0.8.0 enabled    dokku core enter plugin
  git                  0.8.0 enabled    dokku core git plugin
  logs                 0.8.0 enabled    dokku core logs plugin
  mongo                1.0.0 enabled    dokku mongo service plugin
  named-containers     0.8.0 enabled    dokku core named containers plugin
  nginx-vhosts         0.8.0 enabled    dokku core nginx-vhosts plugin
  plugin               0.8.0 enabled    dokku core plugin plugin
  proxy                0.8.0 enabled    dokku core proxy plugin
  ps                   0.8.0 enabled    dokku core ps plugin
  repo                 0.8.0 enabled    dokku core repo plugin
  shell                0.8.0 enabled    dokku core shell plugin
  ssh-keys             0.8.0 enabled    dokku core ssh-keys plugin
  storage              0.8.0 enabled    dokku core storage plugin
  tags                 0.8.0 enabled    dokku core tags plugin
  tar                  0.8.0 enabled    dokku core tar plugin
support

Most helpful comment

Run sudo ufw disable and then see if you can access it.

All 5 comments

Run sudo ufw disable and then see if you can access it.

@joshmanders That did work Josh! Should I enable it and open just that port?

@rickitan that works as well.

@rickitan @josegonzalez It looks like I have similar problem. When I do sudo ufw disable I can open my site. When I do sudo ufw enable, then ufw status I see:

Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
2375/tcp                   ALLOW       Anywhere
2376/tcp                   ALLOW       Anywhere
22/tcp (v6)                ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)
2375/tcp (v6)              ALLOW       Anywhere (v6)
2376/tcp (v6)              ALLOW       Anywhere (v6)

however I cannot open my site.
How should I define my FW setting to be able to see my site, please?
sudo netstat -plant | grep LISTEN gives me this:

tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      590/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      7960/sshd
tcp        0      0 0.0.0.0:29036           0.0.0.0:*               LISTEN      18327/nginx: master
tcp6       0      0 :::22                   :::*                    LISTEN      7960/sshd
tcp6       0      0 :::29036                :::*                    LISTEN      18327/nginx: master

@matissg please do not comment on a year+ old issue - those tend to notify folks who may not be using the project anymore.

Instead, please open a new issue with all the requested info (and any you find pertinent) and reference this one if you think it is related. Thanks.

Was this page helpful?
0 / 5 - 0 ratings