Context: I am attempting to connect to a PostgreSQL database hosted in a Docker container on my Synology NAS using DataGrip. The postgresql db was created using the managed container service of synology.
Issue: Despite successful SSH connection tests using the IP of my Synology as an SSH tunnel, the overall connection (including host, database user, password, and database name) fails.
Attempts: I've tried multiple connection settings in DataGrip, including using the IP of my Synology for SSH tunneling, with my username and password. Specified "localhost" and the Docker container's IP on Synology as the "Host" in the general settings.
Additional Information:
I have successfully established a connection to the database via terminal. This was done by first connecting to the Synology NAS using SSH (ssh my_user@synology_ip) and then connecting to the PostgreSQL database using psql
psql -h docker_ip -p 5432 -U my_username -d my_database
Expected Result: I expected to establish a connection to the PostgreSQL database through DataGrip.
Actual Result: The connection fails with the error message: "SSH tunnel creation failed: open failed."