WebSphere Application Server & Liberty

 View Only
  • 1.  Problem with datasource

    Posted Tue March 08, 2022 08:57 AM

    Hi,

    I have questions when I use WAS ND 8.5.5.20 and create a data source to Oracle Database 19c EE with JDBC driver 12.1.0.2.0.

    I found error as following. Please help to guide me how to fix this problem. 

    1. Exception:org.jbpm.workflow.instance.WorkflowRuntimeException SourceId:com.ibm.ejs.container.LocalExceptionMappingStrategy.setUncheckedException ProbeId:178 Reporter:com.ibm.ejs.container.LocalExceptionMappingStrategy@XXXXX
      org.jbpm.workflow.instance.WorkflowRuntimeException: -- ; nested exception is: org.hibernate.exception.JDBCConnectionException: could not execute batchCaused by: javax.ejb.TransactionRolledbackLocalException: ; nested exception is: org.hibernate.exception.JDBCConnectionException: could not execute batch
      Caused by: org.hibernate.exception.JDBCConnectionException: could not execute batch
      Caused by: java.sql.BatchUpdateException: IO Error: Socket read timed out

    2. Exception:oracle.jdbc.xa.OracleXAException SourceId:com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.start ProbeId:639 Reporter:com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl@XXXX
      oracle.jdbc.xa.OracleXAException
      at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1229)
      Caused by: java.sql.SQLRecoverableException: IO Error: Socket read timed out
      Caused by: oracle.net.ns.NetException: Socket read timed out
    3.  Event ID: CONNECTION ERROR OCCURRED (5)
       Exception: java.sql.SQLRecoverableException: IO Error: Socket read timed out DSRA0010E: SQL State = 08006, Error Code = 17,002
      XAException error code is :XAER_RMFAIL (-7)
    Thank you

    ------------------------------
    rununrath jarornsukkhaphap
    ------------------------------


  • 2.  RE: Problem with datasource

    Posted Tue March 08, 2022 10:12 AM
    Hello rununrath,

    From the description is it hard to determine if all three exceptions you listed above were all part of the same exception stack.
    Assuming that they are, then the root issue is the "Socket read timed out" being thrown by the Oracle JDBC driver.

    This exception is thrown when the Oracle JDBC driver submits a Query/Update to the database, and the database does not reply.
    The amount of time the Oracle JDBC driver waits before throwing this exception is determined by the oracle.jdbc.ReadTimeout property which has a default timeout of 10 minutes (600000ms). 
    Why the database never responded could be one of a few issues:
    1. The database was brought down before it had a chance to respond.
    2. The Update took longer than the timeout to execute.
    3. The Table/Row has been locked, and that lock was never released.

    Or it could be something else entirely.
    I would check with your DBA to see if there were any warnings or errors on your database at the time this happened.

    Thank you,
    Kyle Jon Aure

    ------------------------------
    Kyle Aure
    ------------------------------



  • 3.  RE: Problem with datasource

    IBM Champion
    Posted Wed March 09, 2022 03:04 AM
    Hello rununrath,

    In addition to Kyle's answer:

    • Check the connection URL with your DBAs, HOST and IP and other parameters.
    • Check if you can "test connection" from datasource configuration. If the connection is sucessfull then you are able to reach your Database and is more probably a DB issue.
    • Check if you are able to reach you DB HOST and IP from your WAS nodes (taking in mind the scope of definition) sometimes there are firewalls. When you do the "test connection" check if there a connecions on SYNC_SENT status, if there is you have a firewall issue.
    *NIX: netstat -na| grep DB_IP
    ss -na| grep DB_IP

    WINDOWS: netstat -na| findstr DB_IP

    Hope this helps,

    Regards

    ------------------------------
    Gabriel Aberasturi
    Versia tecnologias emergentes
    ------------------------------



  • 4.  RE: Problem with datasource

    Posted Wed March 09, 2022 05:50 AM

    Thanks for your reply. I already tell DBA help to collect output of netstat for me but must watis some moment.

    And Oracle suggests to set the following connection property: oracle.jdbc.javaNetNio=false. then how to set this property.

    Where to configure this properties (1) Servers > Server Types > WebSphere application servers > server1 > Process definition > Java virtual machine > Generic JVM arguments or must configure in (2) Data sources > Custom Properties ?

    Thanks



    ------------------------------
    rununrath jarornsukkhaphap
    ------------------------------



  • 5.  RE: Problem with datasource

    IBM Champion
    Posted Wed March 09, 2022 06:27 AM
    Edited by Gabriel Aberasturi Wed March 09, 2022 06:30 AM
    Rununrath,

    But the output of netstat MUST be taken in WAS nodes NOT in the DB. They can check if there are connections from WAS nodes but if we have a connection timeout in WAS not seems that is the case. If they can see a connections from WAS node IPs but to other ports in DB (other listeners) maybe is a networking issue related to firewalls.

    Have you do "test connection" from datasoure definition?

    About your suggestion seems a JVM property so in Servers > Server Types > WebSphere application servers > server1 > Process definition > Java virtual machine > Generic JVM arguments

    Regards,

    ------------------------------
    Gabriel Aberasturi
    Versia tecnologias emergentes
    ------------------------------



  • 6.  RE: Problem with datasource

    Posted Wed March 09, 2022 08:08 AM

    Hello Gabriel Aberasturi,

    I tried to add oracle.jdbc.javaNetNio=false but still failed with same error. 

    Are you have any recommendations for me to diagnose?

    Thanks

    May



    ------------------------------
    rununrath jarornsukkhaphap
    ------------------------------



  • 7.  RE: Problem with datasource

    IBM Champion
    Posted Wed March 09, 2022 09:16 AM
    Hello May,

      Before continue...
     
    • Are you getting more errors previous to what you have put? is the datasoruces starting ok (check the logs when the server started)? if there are errors related to data source need be solved first.
    • Are other oracle datasource configured? take a look if they have some specific type of configuration.
    • How is the the datasource configured using type 4 (pure java ) o type 2 (driver needed to be installed)?
    • Do you have access to WAS node? terminal to the WAS node system not only admin console
      Seems a networking issue (communication and connection) from WAS Node to DB, but maybe there are previous errors. We need to discard them.



    Regards

    ------------------------------
    Gabriel Aberasturi
    Versia tecnologias emergentes
    ------------------------------



  • 8.  RE: Problem with datasource

    Posted Wed March 09, 2022 03:05 AM

    Hello Kyle Aure,

    Thanks for your reply, I let DBA help to check on database tier. 
    But in part of the WebSphere tier, have any point that I must check to clarify didn't have any error or didn't cause from WebSphere tier. 

    Thank you



    ------------------------------
    rununrath jarornsukkhaphap
    ------------------------------



  • 9.  RE: Problem with datasource

    Posted Wed March 09, 2022 10:23 AM
    Hello Rununrath,

    WebSphere does sit between your application and the JDBC driver and manages the connection pool to your Database.
    A misconfigured DataSource or other networking issues could cause this error.
    However, to fully debug this issue we would need to collect traces and investigate the issue.
    If after following the previous suggestions in this post you are still having issues I would recommend opening a support ticket for further investigation.

    Thank you,

    ------------------------------
    Kyle Aure
    ------------------------------