Help › Tunnels, sign-in and passwords

Read a connection error

Use the list of steps under Test Connection to see where a connection fails, and what to check for each step.

Querlyn 0.1.0 is not released yet. This help describes it ahead of release.

A connection is made in steps: reaching each SSH host, signing in to it, reaching the database, encrypting, signing in. Querlyn reports each step, so a failure tells you which one it was and not just that connecting failed.

See the steps

  1. Select the connection in the sidebar and choose Query › Edit Connection….
  2. Choose Test Connection.

Under the dialog's fields, each step is listed as it happens:

✓ Resolve bastion.example.com
✓ Connect to 203.0.113.10:22
✓ SSH handshake with bastion.example.com (hop 1)
✓ Verify host key of bastion.example.com
✓ Authenticate as [email protected]
✓ Open SSH tunnel to db.internal:5432
✗ Authenticate   password authentication failed for user "app"
MarkMeaning
…The step is running.
✓The step succeeded.
✗The step failed; the reason is beside it.
–The step was skipped; the reason is beside it.

Below the list, a line in red says what went wrong, and a line under it says what to check. If a command fixes the problem, it is shown with a Copy button.

When you connect from the sidebar and it fails, the connection's name turns red and the reason appears at the right of the status bar. If you opened the connection by its arrow, a row under it says Couldn't connect with the reason and a Retry button. To see every step, choose Details beside the message (Command Palette › View: Show Message Details): it lists the steps with the same marks and can copy them. Testing the connection as described above shows them too.

The steps and what to check

StepWhen it fails, check
Find kubectl, Find the AWS CLIThe program is installed. Settings, under Tools, shows where Querlyn looked, and takes a path.
Start kubectl port-forward…, Start AWS SSM session…The pod, service or instance name; that you are signed in to the cluster or to AWS. The message says which.
Sign in with AWS IAM, Sign in with Microsoft Entra IDYour cloud sign-in. See Sign in with AWS or Entra ID.
Get the password from…The reference to the item in your password manager, and that the manager is unlocked. See Use a password manager.
ResolveThe host name is spelled right, and you are on the network or VPN where that name exists.
Connect to an addressThe server is running, the port is right, and no firewall is in the way. "Refused" means something answered and said no; "timed out" means nothing answered.
SSH handshakeThe SSH host and port. If the server has only an RSA key, see Which keys.
Verify host keySee Trust an SSH host's key.
Authenticate as user@hostThe SSH user, and the key, agent or password for that hop.
Connect to … through hopThe next host is reachable from the hop before it, and that hop allows TCP forwarding.
Open SSH tunnel toThe database's host and port as seen from the last hop.
Open a fileThe database file's path and its permissions.
TLS handshakeWhether the server supports TLS at all, and for Verify full whether its certificate is from an authority your Mac trusts and matches Host. See Encrypt a connection with TLS.
AuthenticateThe database user and password; for a cloud sign-in, that the database user is set up for it.
Prepare sessionThe server accepted the sign-in and then refused one of the first statements Querlyn sends to set the session up. The reason beside the step says which.

Common cases

You seeUsually means
"Could not find the host"A misspelled host name, or a name that exists only inside a network you are not on. If the database is behind a bastion, set a Route.
"The server at … refused the connection."Nothing listens on that port, or the server accepts connections only from its own network.
"… timed out."A firewall is dropping the connection, or the address is not reachable from where you are.
"the server does not support TLS"TLS is Require or Verify full, and the server has TLS off.
"the server's TLS certificate could not be verified"A private certificate authority. Give its file under CA certificate.
"The SSH key … is an RSA key. RSA keys are disabled"Turn on Allow RSA keys in Settings under SSH, or use an Ed25519 or ECDSA key.
"The SSH agent has no usable key for …"The key is not loaded in your agent. Add it with ssh-add, or choose Key File.
"Your AWS sign-in has expired."Run the command shown, then connect again.
"The connection attempt was cancelled."You cancelled, or closed a password or host-key question without answering it.

When a connection drops later

If a connection is lost while a statement runs, the statement fails and says so. The next statement you run in the tab opens a new session.

Servers also close sessions that sit idle too long (MySQL's wait_timeout, PostgreSQL's idle_session_timeout), or restart. On PostgreSQL, MySQL and MariaDB, when a tab's session was closed while it sat idle, the next statement you run opens a new session and runs there. On other databases it may fail once, saying that the connection was closed; the one after it opens a new session.

If a transaction was open in that session, the server rolled it back. The next statement you run in the tab then does not run: the message says that the transaction was rolled back, and nothing in it was committed. Run again to continue in a new session, after redoing the changes you still want.

For a connection through SSH whose hop was lost, see While you are connected.

Help for Querlyn 0.1.0. All help topics