LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2009, 09:02 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Rep: Reputation: 32
Problem by connecting MS SQL from SuSE Linux


Hi all,

I installed the VMware on the host (Windows XP) and then installed a guest syste of SuSE Linux.

I wrote a java program which just try to connect to the MS SQL database installed on the host. I ran this program successfully on host.

But as I ran this program from on Linux, I got exception as follow.

I've made an exception by firewall to let the 192.168.174.1:1433 go through. But it doesn't help. Seems it's not really a problem of firewall?

Code:
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 192.168.174.1, port 1433 has failed. Error: No route to host. Please verify the connection properties and check that a SQL Server instance is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.
        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:130)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1195)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(SQLServerConnection.java:1054)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:758)
        at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
        at java.sql.DriverManager.getConnection(DriverManager.java:620)
        at java.sql.DriverManager.getConnection(DriverManager.java:200)
        at com.weichen.app.App.main(App.java:36)
 
Old 09-06-2009, 09:41 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,925

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
Quote:
Originally Posted by thomas2004ch View Post
Hi all,

I installed the VMware on the host (Windows XP) and then installed a guest syste of SuSE Linux.

I wrote a java program which just try to connect to the MS SQL database installed on the host. I ran this program successfully on host.

But as I ran this program from on Linux, I got exception as follow.

I've made an exception by firewall to let the 192.168.174.1:1433 go through. But it doesn't help. Seems it's not really a problem of firewall?

[CODE]
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 192.168.174.1, port 1433 has failed. Error: No route to host. Please verify the connection properties and check that a SQL Server instance is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.
[CODE]
Might not be a firewall issue, but there definitely IS a network issue somewhere. Can you connect to the box via other ports, like telnet, ssh, ftp, etc.?? Can you ping the other host?? Did you install SElinux?

Also, VMware networking can be challenging. Can you get to the internet via Linux? Post the output of "iptables -L", if the networking things I mentioned are all working...
 
Old 09-06-2009, 09:56 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by TB0ne View Post
Might not be a firewall issue, but there definitely IS a network issue somewhere. Can you connect to the box via other ports, like telnet, ssh, ftp, etc.?? Can you ping the other host?? Did you install SElinux?

Also, VMware networking can be challenging. Can you get to the internet via Linux? Post the output of "iptables -L", if the networking things I mentioned are all working...
I can ping the host (Windows XP) from the Guest syste (SeSu Linux).

I can connect to the Guest from Host using putty.

I can open FireFox in Guest (Linux) and browse any internet.

I haven't installed SELinux. What is that?

The output of "iptables -L" looks as follow. But I wonder if I have to install the MS-SQL Client first?

Code:
linux-upve:/home/thomas2004ch/temp # cd
linux-upve:~ # iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
linux-upve:~ #

Last edited by thomas2004ch; 09-06-2009 at 09:58 AM.
 
Old 09-06-2009, 09:23 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Taking TB0ne's qns
Quote:
Can you connect to the box via other ports, like telnet, ssh, ftp, etc.?? Can you ping the other host??
Try all those but connecting to the VM guest from the other (Suse) box. Which, if any, work?
 
Old 09-07-2009, 04:27 AM   #5
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
I solved the problem now. It's a firewall issue. I set an xception in the Windows firewall for the Linux ip and it works.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem by connecting Oracle from SuSE Linux thomas2004ch Linux - Newbie 2 09-07-2009 04:27 AM
Problem with FreeTDS, connecting to MS SQL Server 2000 domiflichi Linux - Software 2 06-23-2009 10:14 AM
Connecting to MS SQL Server heckflosse230 Programming 4 05-07-2009 01:07 PM
Problem connecting net through nokia 7610 cable modem on suse linux 10 prashantaghamkar Linux - Networking 2 04-02-2008 11:38 AM
connecting from Linux to MS SQL using perl DBI->connect Aniket Linux - Software 0 08-08-2002 06:42 PM


All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration