留言板

error java.net.ConnectException:Connection refused

Samita Bhujbal,修改在12 年前。

error java.net.ConnectException:Connection refused

Regular Member 帖子: 117 加入日期: 11-7-5 最近的帖子
Hiii,
My staging server getting following error suddenly.:-

java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at java.net.Socket.<init>(Socket.java:392)
at java.net.Socket.<init>(Socket.java:235)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2744)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2820)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)


Does anyone knows why this problem happens suddenly..
thumbnail
David H Nebinger,修改在12 年前。

RE: error java.net.ConnectException:Connection refused

Liferay Legend 帖子: 14914 加入日期: 06-9-2 最近的帖子
These are database connection failures, so your staging system cannot connect to the database. I'd check whether a) you're bleeding connections and so now the c3p0 connection pool is saturated, b) whether database connection is now blocked or limited from the staging system, ...
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: error java.net.ConnectException:Connection refused

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
From your question, it seems your system was working before.
Seems your db connection pool is timing out. Try extending your timeout in portal-ext.properties
Try setting jdbc.default.maxIdleTime

Following thread is old but may give you an idea:
http://www.liferay.com/community/forums/-/message_boards/message/4539108
thumbnail
nitish tyagi,修改在11 年前。

RE: error java.net.ConnectException:Connection refused

New Member 帖子: 9 加入日期: 12-10-23 最近的帖子
hi,
my server give this type exception and stop


java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:1011)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:1204)
at java.lang.Thread.run(Thread.java:619)
Dec 20, 2012 5:06:34 AM org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting Coyote HTTP/1.1 on http-9090
Dec 20, 2012 5:06:34 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-9443
Dec 20, 2012 5:06:34 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8109
Dec 20, 2012 5:06:34 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/63 config=null
Dec 20, 2012 5:06:34 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 126113 ms
Dec 20, 2012 5:09:29 AM org.apache.tomcat.util.net.NioEndpoint setSocketOptions
SEVERE:
java.lang.OutOfMemoryError: Java heap space
at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)
at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)
at org.apache.tomcat.util.net.NioEndpoint$NioBufferHandler.<init>(NioEndpoint.java:1958)
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:996)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:1204)
at java.lang.Thread.run(Thread.java:619)
Dec 20, 2012 5:11:35 AM org.apache.catalina.startup.Catalina stopServer
thumbnail
Hitoshi Ozawa,修改在11 年前。

RE: error java.net.ConnectException:Connection refused

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
nitish, if you are not going to reply to the topic of this thread, please do not reply. If you have a new question, please create a new thread. It's the rule of this forum.
thumbnail
Sushil Kumar Saini,修改在11 年前。

RE: error java.net.ConnectException:Connection refused

Regular Member 帖子: 104 加入日期: 11-7-27 最近的帖子
Hi nitish, ... your problem is different from the Samita's problem. your problem is related to memory space. You can increase the memory size by setting the following parameter. JAVA_OPTS= "%JAVA_OPTS% -Xms512m -Xmx1024m"