Self-Solve Knowledge Search

Minimize Maximize
Upgrade failure due to connection reset to MS SQL Server
Title :
Upgrade failure due to connection reset to MS SQL Server
Document ID :
KM02151574
Product - Version:
operations orchestration ;
OS :
Updated :
Wed Feb 24 08:37:27 GMT 2016
Summary :
A possible workaround for upgrade failure due to connection reset to MS SQL Server is to remove ssl=request or to replace it with ssl=off in database.properties.
Problem

In some cases, an upgrade of OO(Central) that connects to MS SQL Server may fail due to the following exceptions written in upgrade.log:

java.lang.RuntimeException: Failed to run SQL query, make sure the DB is accessible
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:194)
    at com.hp.oo.upgrade.tasks.upgrade.TagDatabaseTask.execute(TagDatabaseTask.groovy:26)
    at com.hp.oo.upgrade.tasks.UpgradeTask$execute$1.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at com.hp.oo.upgrade.tasks.UpgradeTask$execute$1.call(Unknown Source)
    at com.hp.oo.upgrade.Common.executeTask(Common.groovy:253)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:148)
    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:99)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:53)
    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:101)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:165)
    at com.hp.oo.upgrade.Common.executeTasks(Common.groovy:234)
    at com.hp.oo.upgrade.Common$executeTasks$10.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at com.hp.oo.upgrade.Upgrade.startUpgrade(Upgrade.groovy:167)
    at com.hp.oo.upgrade.Upgrade.start(Upgrade.groovy:116)
    at com.hp.oo.upgrade.Upgrade$start.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at com.hp.oo.upgrade.Upgrade.main(Upgrade.groovy:101)
Caused by: : java.sql.SQLException: Network error IOException: Connection reset
    at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:385)
    at org.apache.tools.ant.taskdefs.SQLExec.getConnection(SQLExec.java:942)
    at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:614)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at groovy.util.AntBuilder.performTask(AntBuilder.java:319)
    at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:264)
    at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147)
    at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:203)
    at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at com.hp.oo.upgrade.Common.runSql(Common.groovy:589)
    at com.hp.oo.upgrade.Common.runSql(Common.groovy)
    at com.hp.oo.upgrade.Common$runSql$13.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at com.hp.oo.upgrade.tasks.upgrade.TagDatabaseTask.execute(TagDatabaseTask.groovy:24)
    ... 26 more
Caused by: java.sql.SQLException: Network error IOException: Connection reset
    at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:434)
    at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:183)
    at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:370)
    ... 50 more
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:209)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at net.sourceforge.jtds.ssl.TdsTlsInputStream.readFully(TdsTlsInputStream.java:131)
    at net.sourceforge.jtds.ssl.TdsTlsInputStream.primeBuffer(TdsTlsInputStream.java:100)
    at net.sourceforge.jtds.ssl.TdsTlsInputStream.read(TdsTlsInputStream.java:78)
    at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
    at sun.security.ssl.InputRecord.read(InputRecord.java:503)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:961)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375)
    at net.sourceforge.jtds.ssl.SocketFactories$TdsTlsSocketFactory.createSocket(SocketFactories.java:101)
    at net.sourceforge.jtds.jdbc.SharedSocket.enableEncryption(SharedSocket.java:361)
    at net.sourceforge.jtds.jdbc.TdsCore.negotiateSSL(TdsCore.java:554)
    at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:363)
    ... 52 more

Cause
This kind of failure may be caused by a failed ssl connection between Central using jtds and java 1.8, and MS SQL Server.
Fix

A possible workaround is to remove 'ssl\=request' from the jdbc.url line in database.properties or to replace 'ssl\=request' with 'ssl\=off' in the line. Then try to upgrade again.

  jdbc.url=jdbc\:jtds\:sqlserver\://dbhost\:1433/oodb;ssl\=request