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

Most upvoted comments

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: default

Try this in 4.1.0.

Environment: macOS Other Details:

  • Normally in my terminal i use OH MY ZSH
  • I wrote a dbeaver.sh script to call from “Shell Commands” in Dbeaver
  • I called that .sh command via: /bin/bash dbeaver.sh

FWIW,

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