In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "java connection SQL2005 error report: how to solve connection refused:connect", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "java connection SQL2005 error report: connection refused:connect how to solve" it!
Com.microsoft.sqlserver.jdbc.SQLServerException: the TCP/IP connection to the host localhost through port 1433 failed. Error: "Connection refused: connect. Verify the connection properties and check that the instance of SQL Server is running on the host and accepts TCP/IP connections on this port, and make sure that the firewall is not blocking TCP connections to this port." .
At com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError (SQLServerException.java:170)
At com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper (SQLServerConnection.java:1049)
At com.microsoft.sqlserver.jdbc.SQLServerConnection.login (SQLServerConnection.java:833)
At com.microsoft.sqlserver.jdbc.SQLServerConnection.connect (SQLServerConnection.java:716)
At com.microsoft.sqlserver.jdbc.SQLServerDriver.connect (SQLServerDriver.java:841)
At java.sql.DriverManager.getConnection (DriverManager.java:525)
At java.sql.DriverManager.getConnection (DriverManager.java:171)
At com.dyadem.support.db.MySQLConnection.getConnection (MySQLConnection.java:18)
At com.dyadem.support.db.History.showHistory (History.java:26)
At com.dyadem.support.servlet.HistoryServlet.doGet (HistoryServlet.java:28)
At javax.servlet.http.HttpServlet.service (HttpServlet.java:617)
At javax.servlet.http.HttpServlet.service (HttpServlet.java:717)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)
At org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:233)
At org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:191)
At org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:128)
At org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
At org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109)
At org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:286)
At org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:845)
At org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process (Http11Protocol.java:583)
At org.apache.tomcat.util.net.JIoEndpoint$Worker.run (JIoEndpoint.java:447)
At java.lang.Thread.run (Thread.java:595)
These days, check out a project from the original server, using the lightweight architecture of Spring+Hibernate, the database is SQL Server2000, and the data source uses jtds. But the program that is running normally can't run anyway. When you connect to the database, java.sql.SQLException: "Network error IOException: Connection refused: connect" always appears. Check the hibernate configuration file and log in to the database using query Analyzer. So google found the official document of jtds and explained the exception as follows (original address: http://jtds.sourceforge.net/faq.html):
This exception is thrown when jtds cannot connect to the server for the following reasons:
1. the server name is misspelled or the port is incorrect.
2. SQL Server is not configured to use TCP/IP. Make TCP/IP available through SQL Server's server network utility, or have jDts connect to the server through a named pipe (name pipes) (see URL format for how to do this)
3. The firewall blocks access to the server port 1433.
To check if TCP/IP is available or port 1433 is disabled, you can use "Telnet 1433". If Telnet cannot connect, neither can jDts. If you really can't point out why, please ask your network administrator for help.
I have been messing around for a long time in the way provided above, but I still haven't made any progress. I was so wrong before. Continue to search, test in various ways, and still make an error. I also saw that some people's mistakes were the same as mine, and they were finally solved, but none of them provided a solution.
When I was at my wit's end, I suddenly saw a record that mentioned the patch of Sp4 if I wanted to play SQL Server2004. Hastened to find the Sp4 installation, ha ha, the server started smoothly. So before the explanation given by jDts above, one should be added:
If your database is SQL Server2000, make sure that you have upgraded to SP4.
At this point, check whether the SQL service is started, check whether the SQL opens the TCP/IP connection, and check whether the connection string is correct.
1. Open the SQL Server Configuration Manager--SQL Server2005 network configuration-- MSSQLSERVER protocol-- TCP/IP2, start TCP/IP3, open TCP/IP properties, set the TCP port in IP all to 14334, restart the SQL Server2005 service. Thank you for reading. The above is the content of "java connection SQL2005 error: how to solve connection refused:connect". After the study of this article, I believe that everyone on the java connection SQL2005 error: how to solve this problem connection refused:connect has a deeper understanding, the specific use of the need for everyone to practice and verify. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.