2 Replies Latest reply: Oct 11, 2013 7:31 AM by AjithPathiyil RSS

    Connection being reset JDBC setup

    3710bd8f-5fe4-4b5c-89ae-47b94239d69b

      Hello,

       

      I am currently trying to deploy an app with weblogic, but the JDBC keeps getting a connection reset.  I have tested the app connecting to another DB server and it worked, but when I setup a new server and data source, it connects initially but then I get a connection reset every time after I test it.  See logs below.

       

      --- app log----

      ####<Oct 10, 2013 12:36:10 PM EDT> <Warning> <Deployer> <stratappsvr.xxxxxx.com> <AdminServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <a870efa4738b3828:-64bc6166:141a309c41a:-8000-0000000000000048> <1381422970530> <BEA-149004> <Failures were detected while initiating redeploy task for application 'STRATDBSVRDS'.>

      ####<Oct 10, 2013 12:36:10 PM EDT> <Warning> <Deployer> <stratappsvr.xxxxxx.com> <AdminServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <a870efa4738b3828:-64bc6166:141a309c41a:-8000-0000000000000048> <1381422970530> <BEA-149078> <Stack trace for message 149004

      weblogic.application.ModuleException:

              at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:327)

              at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)

              at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)

              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

              at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)

              at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)

              at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:648)

              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

              at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)

              at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:44)

              at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)

              at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)

              at weblogic.deploy.internal.targetserver.operations.RedeployOperation.createAndPrepareContainer(RedeployOperation.java:104)

              at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(RedeployOperation.java:128)

              at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:221)

              at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)

              at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)

              at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:218)

              at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)

              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)

              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.prepare(DeploymentReceiverCallbackDeliverer.java:41)

              at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingContextUpdateCompletion.callDeploymentReceivers(AwaitingContextUpdateCompletion.java:164)

              at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingContextUpdateCompletion.handleContextUpdateSuccess(AwaitingContextUpdateCompletion.java:66)

              at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingContextUpdateCompletion.contextUpdated(AwaitingContextUpdateCompletion.java:32)

              at weblogic.deploy.service.internal.targetserver.TargetDeploymentService.notifyContextUpdated(TargetDeploymentService.java:225)

              at weblogic.deploy.service.internal.DeploymentService$1.run(DeploymentService.java:189)

              at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)

              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

              at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

      Caused By: weblogic.common.ResourceException: IO Error: Connection reset

              at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:512)

              at weblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnectionEnvFactory.java:178)

              at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1319)

              at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1236)

              at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:250)

              at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1329)

              at weblogic.jdbc.common.internal.ConnectionPool.start(ConnectionPool.java:176)

              at weblogic.jdbc.common.internal.ConnectionPoolManager.createAndStartPool(ConnectionPoolManager.java:507)

              at weblogic.jdbc.common.internal.ConnectionPoolManager.createAndStartPool(ConnectionPoolManager.java:428)

              at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:280)

              at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)

              at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)

              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

              at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)

              at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)

              at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:648)

              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)

              at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)

              at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:44)

              at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)

              at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)

              at weblogic.deploy.internal.targetserver.operations.RedeployOperation.createAndPrepareContainer(RedeployOperation.java:104)

              at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(RedeployOperation.java:128)

              at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:221)

              at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)

              at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)

              at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:218)

              at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)

              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)

              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.prepare(DeploymentReceiverCallbackDeliverer.java:41)

              at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingContextUpdateCompletion.callDeploymentReceivers(AwaitingContextUpdateCompletion.java:164)

              at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingContextUpdateCompletion.handleContextUpdateSuccess(AwaitingContextUpdateCompletion.java:66)

              at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingContextUpdateCompletion.contextUpdated(AwaitingContextUpdateCompletion.java:32)

              at weblogic.deploy.service.internal.targetserver.TargetDeploymentService.notifyContextUpdated(TargetDeploymentService.java:225)

              at weblogic.deploy.service.internal.DeploymentService$1.run(DeploymentService.java:189)

              at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)

              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

              at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

       

      I can connect ping the DB from this server and I can query the db from this server.

       

      Any suggestions?

       

      Rich

        • 1. Re: Connection being reset JDBC setup
          Joe Weinstein-Oracle

          Hi. Set the initial capacity of your datasource to zero. That will let the deployment succeed.

          There is a problem with the DBMS and perhaps the number of connections it will either allow,

          or the number of connection requests it can handle at a time... But first things first. Do the

          capacity change, then we'll see if we hit any further problem.

          • 2. Re: Connection being reset JDBC setup
            AjithPathiyil

            Hi,


            I guess, your datasource is a connection to a RAC database using SCAN_NAME, the DB connection breaks intermittently. I would suggest you to put a monitoring script I used to identify this issue  and ask DBA's to fix the SCAN issue. please mark this reply as answered if this works for you too.


            . .  /home/oracle/dbs/init_wl.sh

            while true()

            do

            java -classpath $WL_HOME/server/lib/weblogic.jar utils.dbping      ORACLE_THIN      apps      apppwd      ajithpathiyil.lab.com:1521:RAC1 > /tmp/chknet.out

            java -classpath $WL_HOME/server/lib/weblogic.jar utils.dbping      ORACLE_THIN      apps      appspwd      ajithpathiyil.lab.com:1521:RAC2 >> /tmp/chknet.out

            grep "**** Success!!! ****" /tmp/chknet.out

            if [ $? -ne 0 ] then

            cat /tmp/chknet.out | /bin/mail -s "DataSource Connectivity:Issue "YOUR EMAIL ID"

            fi

            sleep 300

            done