This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Communication link failure: java.net.SocketException

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Broken pipe

STACKTRACE:

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)


** END NESTED EXCEPTION **


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 ?

thanks
Razia

[originally posted on jforum.net by razia]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

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?

Thanks,
Razia

[originally posted on jforum.net by razia]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic