forums › forums › SQLyog › Using SQLyog › Sja Won't Establish Tunneled Connection
- This topic is empty.
-
AuthorPosts
-
-
December 28, 2006 at 3:59 pm #10109bonafide paterfamiliasMember
I'm a SQLyog newbie, but I'm close…real close…to having my setup working.
I am trying to setup an automated migration from a local SQL Server db to a remote MySQL db.
SQLyog and SJA are running on Windows XP.
Connection to the SQL Server is via an ODBC connection.
Connection to the remote MySQL db is via SSH tunnel. The actual MySQL account is 'user'@'localhost' since the SSH tunnel provides local access to the db.
Everything works great in SQLyog Enterprise GUI and I created and saved a migration job.
This same job works great using sja.exe, as long as SQLyog Enterprise GUI is open. However, if I close SQLyog GUI or choose 'Disconnect' from the GUI, sja.exe will not establish the SSH tunnel to the remote mysql server.
— begin SJA.exe output —
SQLyog Job Agent Version 5.21
Copyright © Webyog Softworks Pvt. Ltd.. All Rights Reserved.
Job started at Thu Dec 28 08:55:00 2006
DBMS Information: MICROSOFT SQL SERVER
ERROR: 2003, Can't connect to MySQL server on 'localhost' (10061)
Check logssqlyog_esther_log.log for complete error details.
ERROR: Import aborted…
Check logssqlyog_esther_log.log for complete error details.
Total time taken – 2 sec(s)
— end SJA.exe output —
If if open the GUI and restablish the connection (from the 'Connect to MySQL Host' dialog that pop-up when launching), and re-execute the sja job, it runs perfectly.
What it the relationship between the GUI and SJA for establishing connections? How can I get this to work without having the GUI active?
Best regards,
Bonafide
-
December 29, 2006 at 5:57 am #23158peterlaursenParticipant
We cannot reproduce (not with 5.21 or 5.22 RC3) and need more information.
1) Please let us see the
Code:
..
....part of the job/XML file (fake details that you don't want to make public, or create a ticket and attach there)
2) Is it a 'freshly generated' jobfile or an old one generated with an earlier version? Was it generated using the GUI?
3) Is it only Migration jobs that give this problem? Try for instance a Notifications job with the same details (.. section). Just try to execute the SQL “SELECT 'this is a test'” for instance!
The relation between the two is that it is (or should be) exactly the same code that establishes connection in either case. Actually they are both compiled from the same soruce files, classes and functions. You are pefrectly sure that you use the same jobfile (use FULL path enclosed in “doublequotes” to be sure like
Code:sja “c:the pathtomy_jobfile.xml” -
December 29, 2006 at 11:11 pm #23159bonafide paterfamiliasMember
Thanks for confirming that SJA should be able to establish the ssh tunnel. I believe I've found the cause.
I had restricted the SSH user account on the Linux box by setting its shell to /usr/sbin/nologin. I've tried both /bin/false and /usr/sbin/nologin and the results are the same. This seems make the SSH tunnel establishment a bit unreliable. It is clearly working sometimes, and definiately failing at others. Changing the SSH users' shell to /bin/bash seems to fix the problem, but creates a bit of a security hole.
I have a slow (128kbps) uplink which may be contributing to the problem.
If anyone can confirm that a /bin/false shell should work for SSH tunneling into a Linux mysql server, I would appreciate knowing this works for others.
Best regards,
Bonafide
-
December 29, 2006 at 11:15 pm #23160bonafide paterfamiliasMember
Sorry, I forgot to add theinformation for the job.
[codebox]
sshusername sshuserpwd my.host.org 22 3310 localhost themysqluser themysqlpwd 3306 [default] mysqlDB [/codebox]
Regards,
Bonafide
-
-
AuthorPosts
- You must be logged in to reply to this topic.