dbeaver: Launch ssh command in before connect not working
Hi,
If I launch this command in shell (not in DBeaver)
ssh -L 3133:ip:5433 user@server -N
And I click on Test connection in DBeaver, it works.
If I kill my command in shell, add in DBeaver same command in “Before Connect” and click on Test connection, it not works. I have this error
Connection to 127.0.0.1:3133 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. java.net.ConnectException: Connexion refusée (Connection refused)
Version of DBeaver I use : dbeaver-ce_4.0.7_amd64.deb
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- #1669 Shell command config enhancement (pause + working dir) — committed to dbeaver/dbeaver by serge-rider 7 years ago
- #1669 Log process error output — committed to dbeaver/dbeaver by serge-rider 7 years ago
Probably this happens because DBeaver doesn’t make any pause before ssh command execute and connection attempt (so SSH doesn’t have a chance to establish tunnel before db connect). I’ve added extra config parameters:
Try this in 4.1.0.
Environment: macOS Other Details:
/bin/bash dbeaver.shFWIW,
I had a lot of issues trying to leverage commands within the shell executor that DBeaver started. It all came down to Dbeaver starting a shell execution with a different $PATH than my usual.
standard PATH within running script:
/usr/bin:/bin:/usr/sbin:/sbin