Question

Unable to access app deployed on Dokku in a droplet

I’ve deployed an app on Dokku using DigitalOcean’s droplet, but unfortunately I’m unable to access, I cannot make any requests to my app from outiside the dokku.

Here is the app’s server logs, the app server is running on port 5000(inside a docker container, I guess?)

2021-01-29T15:54:55.631984450Z app[web.1]: Puma starting in single mode...
2021-01-29T15:54:55.632155110Z app[web.1]: * Version 4.3.5 (ruby 2.7.0-p0), codename: Mysterious Traveller
2021-01-29T15:54:55.632257250Z app[web.1]: * Min threads: 5, max threads: 5
2021-01-29T15:54:55.632416330Z app[web.1]: * Environment: production
2021-01-29T15:54:59.477622282Z app[web.1]: D, [2021-01-29T15:54:59.477398 #10] DEBUG -- : BONSAI_URL not present, proceeding with Elasticsearch defaults.
2021-01-29T15:55:01.789462413Z app[web.1]: * Listening on tcp://0.0.0.0:5000
2021-01-29T15:55:01.790215291Z app[web.1]: Use Ctrl-C to stop

Here is my port mappings for the app

Proxy enabled:                 true
Proxy port map:                http:80:5000
Proxy type:                    nginx

Here is docker ps -a output

CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS                      PORTS               NAMES
29a40b74890a        dokku/propertysafe:latest     "/start web"             23 minutes ago      Up 23 minutes                                   propertysafe.web.1
159102b6127b        2ab94a5f043a                  "/bin/bash -c 'mkdir…"   23 minutes ago      Exited (0) 23 minutes ago                       naughty_sammet
a2dc93fff2dd        dd5cbe9f96db                  "/bin/bash -c 'mkdir…"   23 minutes ago      Exited (0) 23 minutes ago                       interesting_margulis
5861efa15abf        cc49b1d8e228                  "/build"                 26 minutes ago      Exited (0) 24 minutes ago                       peaceful_napier
e25ce8a7c7e2        9c8964c4fb67                  "/bin/bash -c 'cat >…"   26 minutes ago      Exited (0) 26 minutes ago                       dreamy_morse
410dbbc9cc4c        b197a493cfba                  "/bin/bash -c 'mkdir…"   26 minutes ago      Exited (0) 26 minutes ago                       crazy_hodgkin
5555c7890af0        gliderlabs/herokuish:latest   "/bin/bash -c 'mkdir…"   26 minutes ago      Exited (0) 26 minutes ago                       eager_meitner
287b083012b6        postgres:11.6                 "docker-entrypoint.s…"   2 hours ago         Up 2 hours                  5432/tcp            dokku.postgres.app_db

and the ufw firewall has permitted http traffic.

Everytime I make a hit to the droplet IP I get the connection refused error.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there @coderx,

What is the error that you get when you try to visit the app in your browser? As far as I can see from the docker ps output, the service is not exposing any ports.

I could suggest running the following command to check if your service is listening on the correct port on your host:

  1. sudo netstat -plant

Feel free to share the output here! Regards, Bobby