problem with SSH tunneling

Note: please leave bug reports and feature requests on

problem with SSH tunneling

Postby demeus1985 » Tue May 15, 2012 10:57 am

Hi!

I started using recently and it is pretty cool, so congrats!

I am having a little problem stablishing a SSH tunnel. After configuring it I get the following exception:

Can't initialize tunnel
Cannot establish tunnel
PortForwardingL: local port XXX.XXX.XXX.XXX:P cannot be bound.
Cannot assign requested address: JVM_Bind


I am running in Windows 7 x64 and the connection is also being established using a VPN. When doing the same thing with PuTTY works perfect.

Am I missing some configuration here? Do you know which is the problem?


Thanks in advance,

Jorge
Last edited by demeus1985 on Mon May 21, 2012 8:47 am, edited 1 time in total.
demeus1985
 
Posts: 10
Joined: Tue May 15, 2012 10:51 am

Re: problem with SSH tunneling

Postby Serge » Tue May 15, 2012 1:20 pm

Hi!

If you work thru SSH tunnel then set server host (on main connection configuration page) to "localhost". Real database host should be set in tunnel configuration.
Maybe its a little bit confusing and not very obvious, I agree :) But connection configuration remains the same as if you'd use third-part software to establish connection.

Thanks!
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: problem with SSH tunneling

Postby Serge » Tue May 15, 2012 1:32 pm

Maybe this issue should be qualified as bug.
Probably dbeaver should ignore database host value and always forward to localhost. Or it would confuse users even more?..
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: problem with SSH tunneling

Postby demeus1985 » Tue May 15, 2012 4:11 pm

Hi Serge,

Thanks for your answer.

In my opinion, I suggest that the less confusing way would be to work in the same way as DBVisualizer does:

In our situation, we have to manage two servers (ips/hostnames). The database server, that should be configured in the main connection tab (where all the information to the database is set). On the other hand, the SSH host, through which we are establishing the tunnel, in the "tunneling" configuration dialog. This SSH host, is not localhost. Why are you saying that we should use localhost?

As a workaround, I had to use PuTTY to establish the tunnel through the SSH host and, in this case, yes, I had to point the main connection tab to localhost. But I think that DBeaver configuration should be independent from third party software.

Regards,

Jorge
demeus1985
 
Posts: 10
Joined: Tue May 15, 2012 10:51 am

Re: problem with SSH tunneling

Postby Serge » Thu May 17, 2012 8:25 am

Hi Jorge,

Sure, SSH host is not a localhost, it doesn't make sence to make tunnels on local machine :)
I mean you always forward port from some SSH host TO localhost. And when JDBC driver connects to database it connects to some port on localhost which then forwarded to some remote host.

Anyway, I made some fixes in tunnel configuration. These fixes should make configuration more "user friendly". I believe new version (1.5.6) will be released on the next week.

Thanks!
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: problem with SSH tunneling

Postby demeus1985 » Mon May 21, 2012 9:05 am

Hi again Serge,

Thanks for your answer. I think that I may misunderstood something from your explanation.

This is the configuration I think I should do:

General Tab: All DB configuration: ip, port, schema, login and password
Tunneling dialog: ip of the system through which I'm going to establish the tunnel, port 22 and login and password for this system.

What I understood from what you have previously said was:

General Tab: localhost as ip or SSH tunneling system IP. port, login and password of SSH system?
Tunneling dialog: DB ip, DB port, DB login and password.

Anyway, I tried several combinations but none of them was aparently correct :)

I look forward to test this in the new release. Will it be then configured as I said?

Thanks,

Jorge
demeus1985
 
Posts: 10
Joined: Tue May 15, 2012 10:51 am

Re: problem with SSH tunneling

Postby Serge » Mon May 21, 2012 11:43 am

Hmm. Thats strange.
At the moment SSH tunnel configuration is very similar to the same configuration in DBVis or Navicat or other universal tools.

In database settings tab (General tab) set database port, database name, user/password as if you connect to it without a tunnel. The only difference is host name - set it to "localhost".
In SSH tunnel configuration window set you SHH host name, port (22) and your user/password on that host.

Hope it'll help :)

PS New version will be released 22 or 23 May, fix will allow you to set database host name in General tab.
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: problem with SSH tunneling

Postby demeus1985 » Thu May 24, 2012 2:58 pm

Hi Serge,

I've just downloaded the new version and it works as I expected. It is great!

Thank you very much!

Jorge
demeus1985
 
Posts: 10
Joined: Tue May 15, 2012 10:51 am


Return to Support



Who is online

Users browsing this forum: Google [Bot] and 9 guests