question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test tunnel isn't work if environment variable is used in SSH Tunnel configuration

See original GitHub issue

System information:

  • Windows 10 (21H1)
  • DBeaver 21.2.0.202108310918
  • Additional extensions: None

Connection specification:

  • Database name and version: MySQL Server 8.0
  • Driver name: MySQL
  • Do you use tunnels or proxies (SSH, SOCKS, etc): I use SSH

Describe the problem you’re observing:

I set my environment variables but I can’t use them in SSH Tunnel configuration in DBeaver connection.

I checked the “Use environment variables in connection parameters” option.

Steps to reproduce, if exist:

My user variables: image

The “Use environment variables in connection parameters” option is checked: image

SSH Tunnel configuration: image

But DBeaver doesn’t resolve my variables: image

Include any warning/errors/backtraces from the logs

2021-09-02 22:55:05.788 - Private key file '${UBUNTU_VM_PRIVATE_KEY_PATH}' does not exist
org.jkiss.dbeaver.DBException: Private key file '${UBUNTU_VM_PRIVATE_KEY_PATH}' does not exist
	at org.jkiss.dbeaver.model.net.ssh.SSHImplementationAbstract.loadConfiguration(SSHImplementationAbstract.java:217)
	at org.jkiss.dbeaver.model.net.ssh.SSHImplementationAbstract.initTunnel(SSHImplementationAbstract.java:98)
	at org.jkiss.dbeaver.model.net.ssh.SSHTunnelImpl.initializeHandler(SSHTunnelImpl.java:75)
	at org.jkiss.dbeaver.ui.net.ssh.SSHTunnelConfiguratorUI.lambda$0(SSHTunnelConfiguratorUI.java:218)
	at org.jkiss.dbeaver.ui.UIUtils.lambda$14(UIUtils.java:1682)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tran-huynh-minh-ngoccommented, Sep 3, 2021

@uslss It works, Thank you! It’s strange that the test functionality fails.

1reaction
uslsscommented, Sep 3, 2021

@tran-huynh-minh-ngoc Could you try to use created SSH profile (even if Test Tunnel fails) to connect to db?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I pass an environment variable through an ssh ...
For tunnels, it's not so bad. For env vars, two reasons: One, PermitUserEnvironment requires admin access to configure on the server to pass...
Read more >
python - SSHTunnel with key value (not path) - Stack Overflow
The output of this I used an my environment variable SSH_KEY_BLOB. ... StringIO(SSH_KEY)) # setup your SSHTunnel like normal server ...
Read more >
SSH Tunneling and Proxying | Baeldung on Linux
We can configure a browser on the client host to use our SOCKS proxy server on 127.0.0.1, port 8080. That way, we can...
Read more >
Remote debugging via SSH tunnel | PhpStorm Documentation
This tutorial describes how to use an SSH tunnel to setup a secure connection between the development machine and a remote server.
Read more >
using environment variable for local port of ssh tunnel
I use an environment variable to set the port used by the local server that I want to test. I do this because...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found