cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Error rehost utility rename scenario

Level 7

Error rehost utility rename scenario

Hi All,

Today I tried to rename the rehost utility in a windchill 10.2. After launching the bat and after configuring the file rehost.propeties I return the following error:

 

BUILD FAILED
C:\ptc\conf\rehost.xml:103: com.ptc.wc.rehost.exception.RehostException: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
Nested exception is: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
    at java.sql.DriverManager.getConnection(DriverManager.java:571)
    at java.sql.DriverManager.getConnection(DriverManager.java:215)
    at com.ptc.wc.rehost.util.RehostUtils.getDBConnection(RehostUtils.java:567)
    at com.ptc.wc.rehost.validate.DBConnectionValidator.performTask(DBConnectionValidator.java:48)
    at com.ptc.wc.rehost.javatask.AbstractRehostTask.execute(AbstractRehostTask.java:141)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:439)
    at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:454)
    at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:693)
    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:251)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1140)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:340)
    ... 25 more
Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:149)
    at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:405)
    ... 30 more

 

I can not solve the error

Thanks for your help

Davide

12 REPLIES 12

Re: Error rehost utility rename scenario

"Connection refused".  Sounds like a username/password issue.  I would verify these are correct for the target Oracle server.

Re: Error rehost utility rename scenario

Hi Tom,

the password and username is correct.

Not so much like doing :-(

Re: Error rehost utility rename scenario

this is the log error:

 

WARN [Echo]: ***************************************************************
WARN [Echo]: ** Starting Rehost Utility 3.0 M010 B05 20170721 0944 (16) **
WARN [Echo]: ***************************************************************
WARN [Echo]: modules=rename
INFO [DBConnectionValidator]: RehostProject: OS Name: Windows Server 2008 R2 windows:true prop dir:C:\ptc\conf\rehost.properties
INFO [DBConnectionValidator]: Log may contain passwords? true
INFO [DBConnectionValidator]: Properties for Task:
INFO [DBConnectionValidator]: * Rehost Parameter:rehost.log.passwords=true
* Rehost Parameter:test.prop.values.only=false
target.db.hostname=P04.local
target.db.jdbc.database=
target.db.password=wcadmin
target.db.port=1521
target.db.serviceName=wind
target.db.username=wcadmin
target.db.vendor=oracle

INFO [DBConnectionValidator]: Connecting to jdbcSmiley Surprisedracle:thin:@P04.local:1521:wind
INFO [DBConnectionValidator]: with credential: wcadmin
ERROR [DBConnectionValidator]: com.ptc.wc.rehost.exception.RehostException: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
Nested exception is: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.ptc.wc.rehost.util.RehostUtils.getDBConnection(RehostUtils.java:567)
at com.ptc.wc.rehost.validate.DBConnectionValidator.performTask(DBConnectionValidator.java:48)
at com.ptc.wc.rehost.javatask.AbstractRehostTask.execute(AbstractRehostTask.java:141)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:439)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:454)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:693)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:251)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1140)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:340)
... 25 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:149)
at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:405)
... 30 more

Re: Error rehost utility rename scenario

You have to figure out what is preventing communication:

Nested exception is: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

Re: Error rehost utility rename scenario

What I do not understand is why it continues to give me the following error when credentials are correct.

 

 

WARN [Echo]: ***************************************************************
WARN [Echo]: ** Starting Rehost Utility 3.0 M010 B05 20170721 1422 (16) **
WARN [Echo]: ***************************************************************
WARN [Echo]: modules=rename
INFO [DBConnectionValidator]: RehostProject: OS Name: Windows Server 2008 R2 windows:true prop dir:C:\ptc\conf\rehost.properties
INFO [DBConnectionValidator]: Log may contain passwords? true
INFO [DBConnectionValidator]: Properties for Task:
INFO [DBConnectionValidator]: * Rehost Parameter:rehost.log.passwords=true
* Rehost Parameter:test.prop.values.only=false
target.db.hostname=P04.local
target.db.jdbc.database=
target.db.password=wcinst
target.db.port=1521
target.db.serviceName=wind
target.db.username=wcinst
target.db.vendor=oracle

INFO [DBConnectionValidator]: Connecting to jdbcSmiley Surprisedracle:thin:@P04.local:1521:wind
INFO [DBConnectionValidator]: with credential: wcinst
ERROR [DBConnectionValidator]: com.ptc.wc.rehost.exception.RehostException: java.sql.SQLException: ORA-01017: invalid username/password; logon denied

Nested exception is: java.sql.SQLException: ORA-01017: invalid username/password; logon denied

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:675)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:448)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:383)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:776)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:432)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.ptc.wc.rehost.util.RehostUtils.getDBConnection(RehostUtils.java:567)
at com.ptc.wc.rehost.validate.DBConnectionValidator.performTask(DBConnectionValidator.java:48)
at com.ptc.wc.rehost.javatask.AbstractRehostTask.execute(AbstractRehostTask.java:141)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Re: Error rehost utility rename scenario

Re: Error rehost utility rename scenario

thank you! But now i have a new error :-(

 

WARN [Echo]: ***************************************************************
WARN [Echo]: ** Starting Rehost Utility 3.0 M010 B05 20170721 1526 (16) **
WARN [Echo]: ***************************************************************
WARN [Echo]: modules=rename
INFO [DBConnectionValidator]: RehostProject: OS Name: Windows Server 2008 R2 windows:true prop dir:C:\ptc\conf\rehost.properties
INFO [DBConnectionValidator]: Log may contain passwords? true
INFO [DBConnectionValidator]: Properties for Task:
INFO [DBConnectionValidator]: * Rehost Parameter:rehost.log.passwords=true
* Rehost Parameter:test.prop.values.only=false
target.db.hostname=P04.local
target.db.jdbc.database=
target.db.password=encrypted.wt.pom.dbPassword
target.db.port=1521
target.db.serviceName=wind
target.db.username=wcadmin
target.db.vendor=oracle

INFO [DBConnectionValidator]: Connecting to jdbcSmiley Surprisedracle:thin:@P04.local:1521:wind
INFO [DBConnectionValidator]: with credential: wcadmin
ERROR [DBConnectionValidator]: com.ptc.wc.rehost.exception.RehostException: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

Nested exception is: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.ptc.wc.rehost.util.RehostUtils.getDBConnection(RehostUtils.java:567)
at com.ptc.wc.rehost.validate.DBConnectionValidator.performTask(DBConnectionValidator.java:48)
at com.ptc.wc.rehost.javatask.AbstractRehostTask.execute(AbstractRehostTask.java:141)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

at oracle.net.ns.NSProtocol.connect(NSProtocol.java:399)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1140)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:340)
... 25 more

Re: Error rehost utility rename scenario

Look at line with error.

TNS:listener does not currently know of SID given in connect descriptor

 

Searching with that string on KB (support) you can find this article:

 

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS261992

Marco

Re: Error rehost utility rename scenario

This article looks more related to Rehost Utility.

 

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS255607

Marco