Patch application failed on Linux server with Database Connection error

Situation: We are facing an issue while applying a patch on our Linux server. The Patch get fails and throwing connectivity errors with the backend database. In patch log, found the following error:-

ERROR ROOT c.a.p.p.steps.BackendDBConnection - Error while creating connection with backend database
com.app.exception.SystemException:
UNABLE_TO_CONNECT_DATABASE:com.app.patch.exception.errorcode.PrerequisiteErrorCode : Exception Id "7a5e2365-38a7-47be-b8d8-d50480ab97db" Message :Not able to connect with database, to continue with patch process database should be accessible.
[Database type=Oracle]
[URL=jdbc:oracle:thin:@vldcdstd22rtp1a:1521:ADPT]
[User=ABC]
[prerequisite step=Step to check backend database connection]
at com.app.patch.utils.DatabaseUtils.checkDBConnection(DatabaseUtils.java:310) ~[patchUpdate.jar:na]

 

Cause: On testing the Backend database Connection with a Database Connection utility (attached at the bottom), we have found the following error:-

java.sql.SQLRecoverableException: IO Error: Connection reset by peer, Authentication lapse 87623 ms.
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:794)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:688)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at test.DatabaseConnectionTest.createConnection(DatabaseConnectionTest.java:22)
at test.DatabaseConnectionTest.main(DatabaseConnectionTest.java:74)
Caused by: java.io.IOException: Connection reset by peer, Authentication lapse 87623 ms.
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:790)
... 7 more

 

For more info, kindly refer to the below link:-

https://stackoverflow.com/questions/137212/how-to-deal-with-a-slow-securerandom-generator

 

Solution: In order to resolve this issue, kindly, perform the following steps and make the required changes. The steps are:-

  • Goto the extracted patch folder.
  • Open Apply-Patch.sh file in edit mode and search for "Invoke command" section.
  • Now, replace the second line with the following one:- 

java -Djava.security.egd=file:/dev/../dev/urandom -Xms256M -Xmx2048M -DinstallationDirectory="$installDirPath" -DpatchMode="deployment" -Dcomponent=$component -cp "libs/logback-access-1.1.3.jar:libs/logback-classic-1.1.3.jar:libs/logback-core-1.1.3.jar:libs/*:etc" com.app.Main

img_20200821_2_.png

  • Save the file and apply the patch again.
Have more questions? Submit a request

0 Comments

Article is closed for comments.