Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Not listening on port - "Connection refused"

Author  Topic 

smudge
Starting Member

2 Posts

Posted - 2007-03-27 : 16:16:28
Hi all,

I have a Java app that I am attempting to switch from the JDBC-ODBC Bridge to jtds. It worked fine with the bridge, but with jtds I keep getting connection errors.

Right now I am getting this:
java.sql.SQLException: Network error IOException: Connection refused: connect
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:372)

I am attempting to log in with SQL Server authentication with a username and password that works fine with SQL Query Analyzer.

Then I discovered this:
> telnet localhost 1433
Connecting To localhost...Could not open connection to the host, on port 1433: Connect failed

Also netstat doesn't show anything on port 1443, or anything that looks like it could be SQL server. Which is strange, because the SQL Server Client Network Utility shows TCP/IP is enabled, and 1433 is the default port.

I have installed these updates hoping that they will help: sql2ksp3.exe, sql2kasp3.exe, and SQLCritUpdPkg_ENU.exe. No luck.

I fiddled with windows firewall settings. No luck. I disabled the firewall completely. Again no luck.

Looking at ERRORLOG, I have these lines:
2007-03-27 13:35:01.92 spid5 Starting up database 'model'.
2007-03-27 13:35:01.96 server SQL server listening on Shared Memory, Named Pipes.
2007-03-27 13:35:01.96 server SQL Server is ready for client connections

Which also seem to indicate that SQL Server isn't even trying to listen on port 1433.

The system is Windows XP Professional, SP 2.

I am just about at the end of my tether here. Can anyone give me a hand?

Thanks in advance,

jessica

smudge
Starting Member

2 Posts

Posted - 2007-03-27 : 16:34:54
Well I found a workaround by adding "namedPipe=true" to the connection string. So I have database connectivity now which is sweet

Still curious to know why I couldn't make the TCP/IP connection though...
Go to Top of Page

jasonblewis
Starting Member

4 Posts

Posted - 2007-04-12 : 03:07:52
Hi,

I am experiencing the exact same problem.

I set the server to listen to port 1433, but it does not bind to any port.

Did you ever resolve this issue?

Thanks,

Jason
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-12 : 03:15:24
tried a different port no ?


KH

Go to Top of Page

jasonblewis
Starting Member

4 Posts

Posted - 2007-04-12 : 03:57:10
yes, I did try a different port number but no joy.

The server is definately not listening on that port. I found this article on the ms website:

http://support.microsoft.com/kb/308766

I am upgrading to sp2 to see if that solves the problem.

I'll let you know
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-04-12 : 11:15:00
Did you check sql server network utility? Is tcp/ip enabled there?
Go to Top of Page

jasonblewis
Starting Member

4 Posts

Posted - 2007-04-12 : 17:14:31
Yes, I did check that and it is enabled and on port 1433. Even though it is enabled, I cannot telnet to port 1433. I get connection refused.

oh, I also upgraded to SP2 as the ms article suggested but that did not help.

Thanks,

Jason
Go to Top of Page
   

- Advertisement -