3 Replies Latest reply on Jul 30, 2012 8:22 PM by NEFTALY GARCIA

    "No more data to read from socket."?

    Spongebob Squarepants Newbie

      Hi everybody,

      We recently migrated from Oracle 10g Database Enterprise Edtion to  Oracle 11g R2 Database Enterprise Edition
      with Data Guard and a dedicated standy-by database. The database is a  data source for multiple applications.
      Among others, we are using two JBoss 4.2.3 GA application servers which  run together in a clustered configuration.

      During our migration of our database, we also updated our OJDBC thin  drivers from Oracle within our JBosses. We
      replaced the ojdbc14.jar with ojbc6.jar (Oracle 11g 11.1.0.7.0) and  updated or added referenced libraries as well.

      Since our migration we experience an unfamiliar problem from time to  time. Suddenly our deployed EJBs crash with
      the exception "SQLException: No more data to read from socket." The  occurence is rather random than bound to
      a specific bean. The only noticeable thing is that it appears more often  when there is more work load on our
      JBosses.

      Our only solution up to now is to shutdown our JBosses, restart the  database and restart our JBosses again.
      Depending on our work load we do this from every two days to every 4  hours.

      I googled the message and even found several hundred hits that mentioned  the exception above, but none of
      them got really solved, instead people found some case of work around  for them. But none of them worked for us,
      since this exception seems more general and can have multiple causes.

      We did not have this problems when we were using the Oracle 10g  database. Currently I am not sure if this problem
      is related to the new Oracle 11g R2 database, the new OJDBC thin driver  or JBoss.

      Anybody experienced the same problem? And maybe even got it properly  solved?

      If you need further information, just ask. I will happily offer as much  information as possible to solve this.

      Greetings,
      CB

        • 1. Re: "No more data to read from socket."?
          sri k Newbie

          Hi CB,

           

          I am having the same issue as you were refering here. After upgrading database from 10g to 11g R2 we are also having the same issue "No more data to read from socket" . We are using tomcat as the container..

           

          Did you get any solution on your issue..Appreciate if you could share the same for me?

           

          Thanks in Advance...

           

          Venkat Sri

          • 2. Re: "No more data to read from socket."?
            Spongebob Squarepants Newbie

            Hi Venkat Sri,

             

            we did solve the problem. We had to modify jboss-service.xml.

             

            Referencing the jboss-service.xml from the default configuration.

            Line 260: <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>

            changed to:

            Line 260: <attribute name="RmiBindAddress">${java.rmi.server.hostname}</attribute>

             

            Line 451: <attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>

            changed to:

            Line 451: <attribute name="ClientConnectAddress">${java.rmi.server.hostname}</attribute>

             

            Line 511: <!-- <attribute name="clientConnectAddress">216.23.33.2</attribute> -->

            changed to (uncommented line):

            Line 511: <attribute name="clientConnectAddress">${java.rmi.server.hostname}</attribute>

             

            We modified oracle-ds.xml:

            <?xml version="1.0" encoding="UTF-8"?>
            <datasources>
              <local-tx-datasource>
                <!-- The name of the datasource. -->
                <jndi-name>MyDataSource</jndi-name>
                <!-- Connection string to connect to database -->
                <!-- Replace 1.2.3.4 with your server ip or server hostname. -->
                <!-- Replace instancename with your sid or service name. -->
                <connection-url>jdbc:oracle:thin:@1.2.3.4:1521:instancename</connection-url>
                <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
                <!-- Replace with your database user. -->
                <user-name>username</user-name>
                <!-- Replace password with the password of the user above. -->
                <password>password</password>
                <!-- Mofify these options to you liking. -->
                <min-pool-size>10</min-pool-size>
                <max-pool-size>30</max-pool-size>

             

                <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
                <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
                <!--
                    We experimented here with different settings, just to find out that "Oracle"
                    won't work and that "Oracle11g" is buggy (at least in 11.1, I don't how it is in
                    11.2.

             

                    So we used Oracle10g, because the driver ojdbc6.jar is backwards compatible till
                    version 8.
                -->
                <metadata>
                  <type-mapping>Oracle10g</type-mapping>
                </metadata>
              </local-tx-datasource>
            </datasources>

             

            We modified oracle-xa-ds.xml:

            <?xml version="1.0" encoding="UTF-8"?>

            <datasources>

              <xa-datasource>

                <!-- The name of the XA-datasource. (cluster config). -->

                <jndi-name>MyXADataSOurce</jndi-name>
                <track-connection-by-tx/>
                <isSameRM-override-value>false</isSameRM-override-value>
                <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
                <!-- Connection string to connect to database. -->
                 <!-- Replace 1.2.3.4 with your server ip or server hostname. -->
                 <!-- Replace instancename with your sid or service name. -->
                <xa-datasource-property name="URL">jdbc:oracle:thin:@1.2.3.4:1521:instancename</xa-datasource-property>

                <!-- Replace with your database user. -->

                <xa-datasource-property name="User">username</xa-datasource-property>

                <!-- Replace password with the password of the user above. -->

                <xa-datasource-property name="Password">password</xa-datasource-property>
                <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
                <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
                <no-tx-separate-pools/>

             

                <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
                 <!--
                     We experimented here with different settings, just to find out that "Oracle"
                     won't work and that "Oracle11g" is buggy (at least in 11.1, I don't how it is in
                     11.2.

             

                    So we used Oracle10g, because the driver ojdbc6.jar is backwards compatible till
                     version 8.
                 -->
                <metadata>
                   <type-mapping>Oracle10g</type-mapping>
                 </metadata>

              </xa-datasource>

             

              <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
                     name="jboss.jca:service=OracleXAExceptionFormatter">
                <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
              </mbean>

            </datasources>

             

            That worked for us. I hope it helps

             

            Best regards,

            Spongebob Squarepants

            • 3. Re: "No more data to read from socket."?
              NEFTALY GARCIA Newbie

              I have the same problem but i dont where i have to change it:

               

              we did solve the problem. We had to modify jboss-service.xml.

               

              Line 260: <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>

              changed to:

              Line 260: <attribute name="RmiBindAddress">${java.rmi.server.hostname}</attribute>

               

              Line 451: <attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>

              changed to:

              Line 451: <attribute name="ClientConnectAddress">${java.rmi.server.hostname}</attribute>

               

              Line 511: <!-- <attribute name="clientConnectAddress">216.23.33.2</attribute> -->

              changed to (uncommented line):

              Line 511: <attribute name="clientConnectAddress">${java.rmi.server.hostname}</attribute>

               

              I am using JBOSS 5.0.1