Sitelet https://web.archive.org/web/20211009072043/https://github.com/vapor/vapor/issues/2629
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Dashboard error reporting for “Connection refused” is not helpful #2629

Open
jaanus opened this issue May 25, 2021 · 0 comments
Open

Comments

@jaanus
Copy link

@jaanus jaanus commented May 25, 2021 •

Describe the bug

When a Dockerized Vapor app gets a “connection refused” error from PostgreSQL, the log provided in Docker Dashboard is not helpful and does not have all the details.

To Reproduce

Build a simple Vapor app (based on the template app) with this Dockerfile and docker-compose.yml.

dockerfiles.zip

Observe that there is an error in docker-compose.yml. DATABASE_PORT is specified as 6432, which is the externally visible port. Yet the Dockerized app should use the internal port 5432. With this setup, the app tries to connect to an inaccessible port when running in Docker context.

When you compose this setup, the database containers run fine. The app exits shortly after starting with error code 132.

Docker Dashboard shows this log.

Screenshot 2021-05-25 at 15 14 45

When inspecting the log with Terminal, there is a bit more info and a mention of Connection refused (errno: 111).

Screenshot 2021-05-25 at 15 13 25

Expected behavior

  1. Docker Dashboard should have an indication of the connection error.

  2. The connection error itself could be more helpful and specific.

Environment

  • Vapor Framework version: 4.45.3
  • Vapor Toolbox version: 18.3.3
  • OS version: macOS Big Sur 11.3.1 (20E241)
@jaanus jaanus added the bug label May 25, 2021
@0xTim 0xTim added good first issue and removed bug labels Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants