Is this a bug? java.net.BindException: Address already in use: connect
От | Michael Mattox |
---|---|
Тема | Is this a bug? java.net.BindException: Address already in use: connect |
Дата | |
Msg-id | CJEBLDCHAADCLAGIGCOOKEHBCKAA.michael.mattox@verideon.com обсуждение исходный текст |
Список | pgsql-general |
I'm getting a "java.net.BindException: Address already in use" error while load testing my application, the line causing the error is: try { con = DriverManager.getConnection( url, properties.getProperty(IGlobalKeys.JDBC_USERNAME), properties.getProperty(IGlobalKeys.JDBC_PASSWORD)); And in the finally block I have: } finally { try { if (con != null && !con.isClosed()) con.close(); } catch (SQLException e) { } } I'm not sure why or how the DriverManager is getting a connection that's already in use. I'm using PostgreSQL 7.3.2 with Cygwin on Windows 2000 with the pg73jdbc3.jar driver and JDK 1.4.1_03. Here's the stack trace: The connection attempt failed because Exception: java.net.BindException: Address already in use: connect Stack Trace: java.net.BindException: Address already in use: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:434) at java.net.Socket.connect(Socket.java:384) at java.net.Socket.<init>(Socket.java:291) at java.net.Socket.<init>(Socket.java:119) at org.postgresql.PG_Stream.<init>(PG_Stream.java:38) at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Con nection.java:160) at org.postgresql.Driver.connect(Driver.java:122) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at com.verideon.veriguard.services.ReportService.getMonitorStatus(ReportService .java:293)
В списке pgsql-general по дате отправления: