wood burning stoves
The moose likes JForum and the fly likes Communication link failure: java.net.SocketException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Communication link failure: java.net.SocketException" Watch "Communication link failure: java.net.SocketException" New topic

Communication link failure: java.net.SocketException

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello there!

I have recently installed Jforum2.1.6 in my website which runs in resin server 2.X version and the database it uses is MySql 4

It works fine but sometimes randomly it throws the following error

Communication link failure: java.net.SocketException, underlying cause: Broken pipe


MESSAGE: Broken pipe


java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:1743)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:1706)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1144)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1257)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2242)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1493)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at net.jforum.dao.generic.GenericPostDAO.selectAllByTopicByLimit(GenericPostDAO.java:295)
at net.jforum.view.forum.common.PostCommon.topicPosts(PostCommon.java:266)
at net.jforum.view.forum.PostAction.list(PostAction.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.jforum.Command.process(Command.java:116)
at net.jforum.JForum.service(JForum.java:182)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:346)
at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:595)


but when i logout and login again or when I go to other links and come back, the same page sometimes works fine.

Can anyone please tell me , what is the problem with my installation or what is the issue and how to fix it ?


[originally posted on jforum.net by razia]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I have seen this happen with some versions of the mysql jdbc driver. There is a bizarre combination that may lead to these problems.

You can try using a different version of connector/j (and older doesn't means worst, in this case)

[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424

Thanks for your reply.
It is very nice that you give very good support for jforum users.

I tried with couple of other versions of connector/J which are 3.1.6 and 3.1.14
. But still i get the same Broken pipe error randomly.
Temporarily I am working with simple connection.

Can any one mention the version of Connector/J which goes well with Jforum2.1.6 and pooled db connection?


[originally posted on jforum.net by razia]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Where are you having this problem? in some hosting company? I saw some places where you simple can't use a connection pool because the default configurations of mysql the hosting guys do.

You can try using C3P0 (which will be the default one on JForum 2.1.7+) instead of the connection pool that comes with JForum.

[originally posted on jforum.net by Rafael Steil]
subject: Communication link failure: java.net.SocketException
It's not a secret anymore!