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

[BUG] Import SQL with SSL on - Port is incorrect 443, should be 5432. #1410

Open
rostislav-palivoda opened this issue Feb 2, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@rostislav-palivoda
Copy link

  • Database type and version:
  • Postgres 16.6

I use SSL connection and try to make import SQL dump operation with menu, see image:

Image

As result see command generated is incorrrect:

2025-02-02 20:32:59 [DEBUG] Executing: set "PGPASSWORD=" && "C:\Program Files\PostgreSQL\15\bin\psql.exe" -h -p 443 -U -d -f "c:\test.sql"

Insted it should be "-p 5432".

My connection string has sslmode=require
Settings has flag SSL = ON.

@rostislav-palivoda rostislav-palivoda added the bug Something isn't working label Feb 2, 2025
@rostislav-palivoda
Copy link
Author

On more note, in some situations I see database is "undefined".

@cweijan
Copy link
Owner

cweijan commented Feb 13, 2025

Sorry for not replying in time, can you give me a desensitized connection string?

@rostislav-palivoda
Copy link
Author

rostislav-palivoda commented Mar 20, 2025

Connection string is correct. I can connect to the database over SSL.

The problem exectly in command sent to the command line when I make export or import.

Image

Connection string is: postgres://user:host/database?sslmode=require

Example log output:

2025-03-20 13:22:12 [DEBUG] Executing: set "PGPASSWORD=<password>" && "C:\Users\<user>\.dbclient\dependency\postgresql\pg_dump16.exe" -h <host> -w -p 443 -U <user> --schema-only -n public  -t "\"public\".\"app_cache\"" neondb >"c:\Users\<user>\Downloads\file.sql"
2025-03-20 13:22:13 [ INFO] Executing: set "PGPASSWORD=<password>" && "C:\Users\<user>\.dbclient\dependency\postgresql\pg_dump16.exe" -h <host> -w -p 443 -U <user> --schema-only -n public  -t "\"public\".\"app_cache\"" neondb >"c:\Users\<user>\Downloads\file.sql"
Command failed: set "PGPASSWORD=<password>" && "C:\Users\<user>\.dbclient\dependency\postgresql\pg_dump16.exe" -h <host> -w -p 443 -U <user> --schema-only -n public  -t "\"public\".\"app_cache\"" neondb >"c:\Users\<user>\Downloads\file.sql"
pg_dump16: error: connection to server at "<host>" (52.57.171.9), port 443 failed: received invalid response to SSL negotiation: �

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants