Reputation: 1635
The below error throwing while connecting sqlserver(java). I don't know root cause of this problem.
CONNECTION URL :: jdbc:jtds:sqlserver://<IP>:<port>/DB2011;instance=TESTINST
Caused by: java.sql.SQLException: I/O Error: Connection reset
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2277)
at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:599)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:331)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
If anyone face this problem, kindly let us know, how can solve this problem?
Upvotes: 1
Views: 1708
Reputation: 39632
I got this exception some time ago because the server couldn't handle more connections. A restart of the database fixed this.
Another time the problem was a firewall between my laptop and the database server. The firewall had to allow my IP to pass.
Upvotes: 1