1 Reply Latest reply on Jan 8, 2015 11:37 AM by Jay SenSharma

    Communications Link Failure

    Nihar Pophale Newbie


      Hi... I am new to this forum and to JBoss.

       

      We have deployed a web application which runs normally most of the time but sometimes it just hangs and not able to proceed forward from the login page although the instance appears to be running.

       

      I am getting below error.

       

      10:08:01,426 ERROR [STDERR]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      10:08:01,426 ERROR [STDERR]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      10:08:01,426 ERROR [STDERR]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      10:08:01,426 ERROR [STDERR]     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      10:08:01,426 ERROR [STDERR]     at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
      10:08:01,427 ERROR [STDERR]     at com.mysql.jdbc.Util.getInstance(Util.java:381)
      10:08:01,427 ERROR [STDERR]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
      10:08:01,427 ERROR [STDERR]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
      10:08:01,427 ERROR [STDERR]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
      10:08:01,427 ERROR [STDERR]     at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1115)
      10:08:01,427 ERROR [STDERR]     at com.mysql.jdbc.ConnectionImpl.createStatement(ConnectionImpl.java:2392)
      10:08:01,427 ERROR [STDERR]     at com.mysql.jdbc.ConnectionImpl.createStatement(ConnectionImpl.java:2374)
      10:08:01,427 ERROR [STDERR]     at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
      10:08:01,427 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      10:08:01,427 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
      10:08:01,427 ERROR [STDERR]     at com.jamonapi.proxy.MonProxy.invoke(MonProxy.java:110)
      10:08:01,427 ERROR [STDERR]     at com.jamonapi.proxy.JDBCMonProxy.invoke(JDBCMonProxy.java:98)
      10:08:01,427 ERROR [STDERR]     at $Proxy73.createStatement(Unknown Source)
      10:08:01,427 ERROR [STDERR]     at org.jboss.resource.adapter.jdbc.WrappedConnection.createStatement(WrappedConnection.java:176)
      10:08:01,427 ERROR [STDERR]     at com.cromaretail.common.delivery.cache.CacheManager.updateTransactionCache(CacheManager.java:1856)
      10:08:01,427 ERROR [STDERR]     ... 28 more
      10:08:01,356 INFO  [STDOUT] User Info - Role - -:DC
      10:08:01,438 WARN  [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id a0b361d:ab88:54abd546:82988 invoked while multiple threads active within it.
      10:08:01,438 WARN  [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action a0b361d:ab88:54abd546:82988 aborting with 1 threads active!
      10:08:01,439 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 08003
      10:08:01,439 ERROR [JDBCExceptionReporter] No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:


      ** BEGIN NESTED EXCEPTION **

      com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
      MESSAGE: Communications link failure

      Last packet sent to the server was 65975 ms ago.
      STACKTRACE:

      com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

      Last packet sent to the server was 65975 ms ago.
              at sun.reflect.GeneratedConstructorAccessor323.newInstance(Unknown Source)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
              at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
              at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
              at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:1645)
              at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1401)
              at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2840)
              at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:468)
              at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2534)
              at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1749)
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2159)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761)
              at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912)
              at sun.reflect.GeneratedMethodAccessor601.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.jamonapi.proxy.MonProxy.invoke(MonProxy.java:110)
              at com.jamonapi.proxy.JDBCMonProxy.invoke(JDBCMonProxy.java:98)
              at $Proxy184.executeQuery(Unknown Source)
              at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatement.java:90)
              at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:342)
              at com.cromaretail.common.delivery.cache.CacheManager.generateTransactionCache(CacheManager.java:1570)
              at com.cromaretail.common.delivery.cache.CacheManager.updateTransactionCache(CacheManager.java:1862)
              at com.cromaretail.csd.web.servlet.CSDServlet.doPost(CSDServlet.java:81)
              at com.cromaretail.csd.web.servlet.CSDServlet.doGet(CSDServlet.java:66)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at com.cromaretail.csd.web.servlet.JAMonServletFilter.doFilter(JAMonServletFilter.java:36)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.hyperic.hq.product.servlet.filter.JMXFilter.doFilter(JMXFilter.java:322)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: java.io.EOFException: Can not read response from server. Expected to read 10 bytes, read 1 bytes before connection was unexpectedly lost.
              at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2455)
              at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:1626)
              ... 47 more

       

      Details are as below:

       

      JBoss version - 4.2.3

      Database - MySQL 5.5.20

       

      The database is working fine.

       

      Please help.

        • 1. Re: Communications Link Failure
          Jay SenSharma Master

          The root cause of this error is :

           

          Caused by: java.io.EOFException: Can not read response from server. Expected to read 10 bytes, read 1 bytes before connection was unexpectedly lost.
                  at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2455)
                  at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:1626)
          
          

           

          It is basically, EOFException, As you mentioned that Database was running fine so the only possibility i see is that your N/W might be fluctuating or there might be Firewall interference of closing  the connection abruptly. You can see that this exception is coming during communication between MySQL jdkc Driver and the Database.    JBoss is not directly related to this.   You should check your n/w.

           

          Additionally check from MySQL side "wait_timeout"  so can you check if you are facing this issue while running a Long running query on the database?  the http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout