jtds"Network error IOException Connection refused: connect"问题解决
2009-04-18 16:13
639 查看
用jtds作驱动程序连接SQL Server常常遇到这个问题:
java.sql.SQLException: Network error IOException Connection refused: connect
下午查了一些资料,算是得到一些信息,总结一下。
jtds官方网站解释如下:
Why do I get
The
The server name is misspelled or the port number is incorrect.
SQL Server is not configured to use TCP/IP. Either enable TCP/IP from SQL Server's Network Utility app or have jTDS connect via named pipes (see the URL format for information on how to do this).
There is a firewall blocking port 1433 on the server.
To check whether TCP/IP is enabled and the port is not blocked you can use "telnet <server_host> 1433". Until telnet doesn't connect, jTDS won't either. If you can't figure out why, ask your network administrator for help.
解决问题当然是先按照官网来检查了,于是一步步查下来,发现符合现象2,但是通过网络管理工具察看TCP/IP,正常。而现象确实与上文描述相同,百思不得其解。
于是baidu+google,终于看到有网友说SQL Server 2000需要升级到SP4 SQLServer2000中文版SP4补丁
java.sql.SQLException: Network error IOException Connection refused: connect
下午查了一些资料,算是得到一些信息,总结一下。
jtds官方网站解释如下:
Why do I get
java.sql.SQLException: "Network error IOException: Connection refused: connect"when trying to get a connection?
The
"Connection refused"exception is thrown by jTDS when it is unable to connect to the server. There may be a number of reasons why this could happen:
The server name is misspelled or the port number is incorrect.
SQL Server is not configured to use TCP/IP. Either enable TCP/IP from SQL Server's Network Utility app or have jTDS connect via named pipes (see the URL format for information on how to do this).
There is a firewall blocking port 1433 on the server.
To check whether TCP/IP is enabled and the port is not blocked you can use "telnet <server_host> 1433". Until telnet doesn't connect, jTDS won't either. If you can't figure out why, ask your network administrator for help.
解决问题当然是先按照官网来检查了,于是一步步查下来,发现符合现象2,但是通过网络管理工具察看TCP/IP,正常。而现象确实与上文描述相同,百思不得其解。
于是baidu+google,终于看到有网友说SQL Server 2000需要升级到SP4 SQLServer2000中文版SP4补丁
相关文章推荐
- jtds"Network error IOException Connection refused: connect"问题解决
- jtds Network error IOException Connection refused connect
- 程序连接SQL Sever数据库出现:java.sql.SQLException: Network error IOException: Connection refused: connect 错误
- Network error IOException: Connection refused: connect这是怎么回事?
- Network error IOException: Connection refused: connect
- Network error IOException: Connection refused: connect
- sql Connect:Network error IOException:Connection refused:connect
- Network error IOException: Connection refused: connect
- Network error IOException: Connection refused: connect
- [MySQLMigrationTool] 从MSSQL导数据到MySql的错误解决 Network error IOException: Connection Refused [INNODB不能创建][max_allowed_packet][Data too long] 的解决
- SqlServer连接异常java.sql.SQLException: Network error IOException: Connection refused: connect
- SqlServer默认端口1433未开放导致java.sql.SQLException: Network error IOException: Connection refused: connect
- java.net.ConnectException: Connection refused问题解决办法
- Launch error: Failed to connect to remote VM. Connection refused.的解决办法
- vsftp:ftp:connect:connection:refused问题及解决
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- ssh连接树莓派出现"network error:connection refused"的解决办法
- 运行SparkStreaming的NetworkWordCount实例出错:Error connecting to localhost:9999 java.net.ConnectException: Connection refused 解决办法
- java.sql.SQLException: Cannot create PoolableConnectionFactory (Network error IOException: 解决方法