Discussion

java.net.ConnectException

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect

1) Ran the sql install scripts in ms sql 2005
2) Placed in prdbutil in tomcat webapps and after providing db usr/pwd details in prconfig. Placed the sqljdbc jar in app server lib folder too.
3) Started tomcat and run the prdbutil from browser
4) Verify Connection status showing the above error.

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

April 1, 2010 - 1:38pm

if Tomcat is running on a different system -- make sure that you have opened up the appropriate port on the machine and made the appropriate changes to the firewall to allow SQL server to connect remotely... Check SQL Servers website if you need help here - the same issue is present in 2008.

April 6, 2010 - 3:02am

Recently I got the same issue.

Here is the solution.

1. Go to the configuration manager application in sql server
2. Go to sql server 2005 network configuration and then go to protocals for ****.
3. Go to TCp/IP properties and Ip Address tab in that.
4. Give the TCp Port in IP All to 1433 and restart the service.

Regards,
Sankar Reddy