distal-attribute
distal-attribute
distal-attribute
distal-attribute

plink stopped working

User, date Message
Written by dootzky2
6 months ago
Category: General
6 posts since Wed, 23 Oct 13
hey guys, I LOVE HeidiSQL, and recently after an update to a newer version my SSH tunnel connection stopped working.

I have the latest version: 8.1.0.4545

Heidi works perfectly on my localhost (XAMPP, Windows 7), but my remote SSH tunnel stopped working. I didn't change anything. No password changes, no settings, firewalls, antiviruses etc.

I can still connect normally to my server using PUTTY or plink from the command line, but Heidi is giving me this message:

PLink exited unexpected. Command line was:
C:\Program Files (x86)\plink.exe -ssh my_username@myserver.com -pw "**********" -P 22 -N -L 3307:myserver.com:3306

So I tried plink from the command line, works fine, I can connect to my server. I even tried to connect to mysql server like I've read on this forum, to test my user/pass for mysql server, and it worked, with a simple command:
mysql -u my_sql_username -p (and then enter the pass)

So what am I doing wrong?

Please note that it WAS working, and I didn't change anything, and then after few updates, it just stopped working.

I have two different remote servers, and both stopped working at the same time, after a Heidi update, and I can still connect to both servers using putty, so it's not a connection or a password issue, leaving only maybe my Heidi configuration to be broken after an update?

Thank you for any advices, tips or hints you can give me to debug this further.
Heidi is by far the best MySQL GUI I've found in 2013. :)

Thanks!
dootzky
Written by zewtastic
6 months ago
18 posts since Sat, 26 Oct 13
Yes I have noticed an issue with using plink.

I have rarely gotten heidi to work with plink.

But I am SSHing to one host with a key, then tunneling to a 2nd host that is the DB. Impossible for Heidi to handle usually with plink.

I did notice when I tried to use plink from the command line(win7) it always got the username wrong unless you specifically use -l username, and not username@host.

so plink.exe -ssh server.com -l username -pw password -P 22 -N -L 3307 etc etc.
Written by ansgar
6 months ago
4792 posts since Fri, 07 Apr 06
Perhaps I should refactor the whole SSH tunnel thing in HeidiSQL. Only there seem to be so many pitfalls the user can dive into.
Written by dootzky2
6 months ago
6 posts since Wed, 23 Oct 13
No idea guyssmile
I mean, you tell me.. if I can help and test, debug, or do something which could help you debug and improve the software, by all means, just tell me what you need, and I'll get it done.

Any other workarounds maybe?
Any way to get users to establish the SSH tunnel manually, and then connect through that with Heidi?

thanks for your insight and time! :)
Written by jfalchMoney, Euro
6 months ago
352 posts since Sat, 17 Oct 09
a) I use heidisql on a daily basis, with several servers using ssh tunnels, and i almost never have problems with that. So I personally don´t think a refactoring is really necessary. Fringe cases will always exist.

b) if you really wanted to do that, there´s a set of delphi components called "secure blackbox", which IMHO would give much tighter control over the connection process than using an external application.
Written by zewtastic
6 months ago
18 posts since Sat, 26 Oct 13
I have been using Heidi for years, but only when I moved into the cloud has it been a serious issue. I simply have had to stop relying on it.

I am a sys admin and support mostly Amazon cloud systems now, and heidi is a hit and miss issue, and mostly I am unable to get it to work. Most users currently use Navicat which has seamless connection issues.

Hundreds of hosts, dozens of RDS's.

In our cloud setup we use a primary admin box(linux), and from there the user tunnels to an RDS (amazon MySQL).

No passwords, no passphrases for SSH. All public, private keys.

I thought I would try and get Heidi working for a new user that needed instant access, and Heidi simply could not work as hoped. I can connect using plink from the command line to my admin box over SSH.

If I put putty.exe into the Heidi config instead of plink.exe, it works, except it opens a putty window.

So explain why that happens, but plink fails.
Written by zewtastic
6 months ago
18 posts since Sat, 26 Oct 13
And to add, we are always looking for products to use like Heidi, where we can save on expensive products like Navicat, and support the smaller guy out there making a difference.
Written by dootzky2
6 months ago
6 posts since Wed, 23 Oct 13
Yeah, same here, I tried everything, and it just won't work.

And I don't think I'm a "fringe case", by any means. I'm as typical developer as it gets, with super-simple XAMPP setup. Really minimum amount of customization or plugins.

I did a (re)search over the weekend, looking for alternatives, and they are all either fairly expensive, or really really bad.

That's why I would love to help out and contribute with any feedback you might need to improve Heidi and keep using it. :)

Thanks again for your time.
Written by zewtastic
6 months ago
18 posts since Sat, 26 Oct 13
Did you try changing the plink.exe to using putty.exe.

It opens a putty window but it should work where plink may not be.
Written by dootzky2
6 months ago
6 posts since Wed, 23 Oct 13
Yup, didn't work.

Alright - here's the SOLUTION. :)

You guys are probably gonna laugh, but I want to share this so that other might figure out and fix their issues, if they happen.

The way I "fixed it" is just by copying my "plink.exe" file to a different folder.

It was originally here, and it worked for months:
C:\Program Files (x86)\plink.exe

Figured that's where I keep all of my "programs" and that would be fine. And it was fine, it worked for months.

But then, I just moved the file "plink.exe" to a new folder, for example here:
C:\Temp\plink.exe

and that's it!smileFixed it!
Now HeidiSQL works again! YAY!

To conclude, I still thing this is bug.
After one of the automatic Heidi upgrades, it stopped working, so I think something about including system PATH or running the plink.exe command gets broken with an extra space or "(" in the folder name, or something like that.

Just to test (as a good bug-reporter smile), I closed Heidi, tried to change path of plink.exe to C:\Program Files (x86)\plink.exe again, and it again did NOT work. Back to C:\Temp\plink.exe - and it works again.

So it's definitely something with the paths.

Hope this bug reports help in the long run, and THANK YOU for a great and awesome SQL tool! :)

cheers!
dootzky
Written by ansgar
6 months ago
4792 posts since Fri, 07 Apr 06
I'm definitely going to check that when i'm back from Berlin. Currently sitting in attain near Magdeburg, had to wait several hours because of storm "Christian" here in north Germany. Hoping to get my kids to bed today.
Written by ansgar
6 months ago
4792 posts since Fri, 07 Apr 06
"Sitting in a train..."
Written by dootzky2
6 months ago
6 posts since Wed, 23 Oct 13
Awesome, no rush man, you're doing an amazing job already.

Thanks again for caring and for creating an awesome software! :)
Written by zewtastic
6 months ago
18 posts since Sat, 26 Oct 13
I have tried that moving around plink, sometimes it helps but usually it does not for me.
Written by zewtastic
6 months ago
18 posts since Sat, 26 Oct 13
I even have heidi working connecting to one MySQL DB, but when I try to add a new connection to a 2nd DB, using the same plink.exe, it fails. While the first one still works fine. Drives me nuts.
Written by ansgar
5 months ago
4792 posts since Fri, 07 Apr 06
r4611 quotes the plink.exe path + filename in the SSH tunnel preparation. Please test.
Written by dootzky2
5 months ago
6 posts since Wed, 23 Oct 13
Nailed it.smile
Downloaded r4611, tested, with the old buggy path - and it's working now.

Good job, sir!
Thanks for the fix! :)
have a great Monday! :D
Written by ansgar
5 months ago
4792 posts since Fri, 07 Apr 06
Thanks for your feedback!
Written by zewtastic
5 months ago
18 posts since Sat, 26 Oct 13
I have now tested it against six of my amazon RDSs and have not had any problems. I have a few of my users to hear back from yet, but all indications look great.

Now we just need to hit that donate button I guess. happy
 

Please login to leave a reply, or register at first.