dbgate icon indicating copy to clipboard operation
dbgate copied to clipboard

SSH Tunnel does not work: ECONNREFUSED 127.0.0.1

Open sky0hunter opened this issue 2 years ago • 7 comments

https://github.com/dbgate/dbgate/blob/aea2c64703bbdd2a2937e51a8ffd57cbe41d8b3b/packages/api/src/utility/connectUtility.js#L55

I've notcied that the SSH tunnel that is generated listens on IPv6 only on my system ( [::1]:10000 ), when the app is trying to connect to 127.0.0.1:10000 it fails.

I did build a version locally where I changed the "127.0.0.1" to "localhost", which should work for both, IPv4 and IPv6, in my case this fixed the problem.

sky0hunter avatar Nov 08 '23 11:11 sky0hunter

What platform are you on and how did you install DbGate?

ProjectInfinity avatar Nov 10 '23 08:11 ProjectInfinity

Same here, I use archlinux

Error: connect ECONNREFUSED 127.0.0.1:10001 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16)

Error JSON: { "errno": -111, "code": "ECONNREFUSED", "syscall": "connect", "address": "127.0.0.1", "port": 10001 } Connection: { "server": "", "engine": "postgres@dbgate-plugin-postgres", "sshMode": "agent", "sshKeyfile": "", "useSshTunnel": true, "user": "", "password": "", "sshLogin": "", "sshHost": "", "unsaved": false, "_id": "", "databases": "", "status": "", "displayName": "", "connectionColor": "***" }

Platform: linux

If I do tunnelling manually it works on the same port.

mattskinosix avatar Jan 17 '24 22:01 mattskinosix

Same for me, Manjaro linux, Arch linux, Endeavour. Installed from AUR Being run from AppImage works fine. Looks like it is an AUR package issue

Pavel-Husakouski avatar Jan 18 '24 08:01 Pavel-Husakouski

Same for me, Manjaro linux, Arch linux, Endeavour. Installed from AUR Being run from AppImage works fine. Looks like it is an AUR package issue

Yes I confirm, from AppImage works!

mattskinosix avatar Feb 01 '24 13:02 mattskinosix

on .deb popos version breaks

lucaspereirasouzat avatar May 22 '24 19:05 lucaspereirasouzat

on .deb popos version breaks

Make sure you are on latest beta. And what do you mean breaks? Run from terminal and post output.

ProjectInfinity avatar May 22 '24 19:05 ProjectInfinity