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

User is told localhost connection is failing for database connect, not database is unavailable #50465

Open
stevenGravy opened this issue Dec 19, 2024 · 0 comments
Labels
bug database-access Database access related issues and PRs error-msg Improving customer facing error messages.

Comments

@stevenGravy
Copy link
Contributor

Expected behavior:

A user would be told the database is not available, not that localhost connections failed.

Current behavior:

A user gets generic errors about localhost on their machine. The problem is the database connection attempt failed from the database service. To the user it looks like the failure is on connecting to their localhost.

$ tsh db connect --db-user=postgres --db-name=xyz example2
psql: error: connection to server at "localhost" (::1), port 63531 failed: Connection refused
	Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (127.0.0.1), port 63531 failed: failed to handle client connection
ERROR: exit status 2

Bug details:

  • Teleport version: 17.0.5
  • Recreation steps
  1. Add a database service such as a postgres
  2. Have the database be unavailable
  3. Attempt to connect via tsh db connect
@stevenGravy stevenGravy added bug database-access Database access related issues and PRs error-msg Improving customer facing error messages. labels Dec 19, 2024
@stevenGravy stevenGravy changed the title User is not told localhost connection is failing, not db is unavailable User is not told localhost connection is failing, not database is unavailable Dec 19, 2024
@stevenGravy stevenGravy changed the title User is not told localhost connection is failing, not database is unavailable User is told localhost connection is failing for database connect, not database is unavailable Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug database-access Database access related issues and PRs error-msg Improving customer facing error messages.
Projects
None yet
Development

No branches or pull requests

1 participant