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

Products missing after Rehost

bschmidt-2
1-Newbie

Products missing after Rehost

Hi all,

we created a test system and tried to rehost our production system (Windchill 10.2 M030 CPS03).

It worked fine with the user data (LDAP import successful) but we are missing all our products and objects. We can only see the newly created product.

Please see attached screenshot.

no_products.PNG

Does anyone have a hint what could have gone wrong during rehosting? Did anyone experience the same behavior?

Thanks in advance!

Benjamin

1 ACCEPTED SOLUTION

Accepted Solutions
TomU
23-Emerald II
(To:bschmidt-2)

The fact that Windchill starts up successfully makes me think the Rehost utility worked fine.  I really question if the database was imported correctly.  The Rehost utility doesn't make changes to existing products or libraries.  It's basically changing server names, file paths, passwords, etc.  If the rehosted system fires up correctly, then what you see when you log it is what exists in the database.

Are you allowed access directly to the database?  If so, try querying for the products and libraries:

select * from PDMLinkProduct

select * from WTLibrary

View solution in original post

10 REPLIES 10
TomU
23-Emerald II
(To:bschmidt-2)

Did you copy your production database to your test system (and import it) before running the Rehost utility?

Expdp and impdp were called during the rehosting.

We did the following steps:

  1. export ldap
  2. import ldap
  3. expdp
  4. impdp
  5. copy vaults
TomU
23-Emerald II
(To:bschmidt-2)

What version of the Rehost utility are you using?

Are you positive the database import actually worked?  (Maybe do a row count on a few of the larger tables and make sure they agree with production.)

I'm assuming you ran the other required Rehost tasks after step 5 above - InfoEngine, Apache, Database, and Vault...

RehostingUtility 10.2 M010 it is.

And yes, we ran the other tasks afterwards.

Here's the logfile:

WARN  [Echo]: ***************************************************************

WARN  [Echo]: **  Starting Rehost Utility 3.0 M010 B05  20160916 1631 (16) **

WARN  [Echo]: ***************************************************************

WARN  [Echo]: modules=rehost.firstrun

INFO  [DBConnectionValidator]: RehostProject: OS Name: Windows Server 2012 R2 windows:true prop dir:D:\install\MED-61138-CD-RehostingUtility_102_M010\conf\rehost.properties

INFO  [DBConnectionValidator]: Log may contain passwords? false

INFO  [DBConnectionValidator]: Properties for Task:

INFO  [DBConnectionValidator]: * Rehost Parameter:rehost.log.passwords=false

* Rehost Parameter:test.prop.values.only=false

target.db.hostname=srv-test.smb.lan

target.db.jdbc.database=

target.db.password=*******

target.db.port=1521

target.db.serviceName=oratest

target.db.username=orauser

target.db.vendor=oracle

INFO  [DBConnectionValidator]: Connecting to jdbc:oracle:thin:@srv-test.smb.lan:1521:oratest

INFO  [DBConnectionValidator]: Successfully connected to the database.

WARN  [Echo]: InfoEngine,Database

INFO  [BackupTask]: RehostProject: OS Name: Windows Server 2012 R2 windows:true prop dir:D:\install\MED-61138-CD-RehostingUtility_102_M010\conf\rehost.properties

INFO  [BackupTask]: Log may contain passwords? false

INFO  [BackupTask]: Properties for Task:

INFO  [BackupTask]: * Rehost Parameter:rehost.log.passwords=false

* Rehost Parameter:target.directory.ldap=D:\ptc\Windchill_10.2\WindchillDS

* Rehost Parameter:test.prop.values.only=false

rehost.useCase=rehost.firstrun

target.db.hostname=srv-test.smb.lan

target.db.jdbc.database=

target.db.password=*******

target.db.port=1521

target.db.serviceName=oratest

target.db.username=orauser

target.db.vendor=oracle

INFO  [BackupTask]: Rehost home directory is D:\install\MED-61138-CD-RehostingUtility_102_M010

INFO  [BackupTask]: Backing up rehost configuration to D:\install\MED-61138-CD-RehostingUtility_102_M010\backups\rehost.firstrun_20160916_1631

INFO  [BackupTask]: Discovered tasks: InfoEngine,Database for scenario: rehost.firstrun

INFO  [BackupTask]: Enabling ldap backup beause of task InfoEngine

INFO  [BackupTask]: Adding tables to backup set: Repository,RemoteObjectId,FvHost,WTProcessStep,CollaborationInfo

INFO  [BackupTask]: Properties for exporting LDAP:

INFO  [BackupTask]: target.directory.ldap=D:\ptc\Windchill_10.2\WindchillDS

target.ldap.baseDn=cn=configuration,cn=Windchill_10.2,o=ptc

target.ldap.hostname_NO_SUFFIX_=srv-test.smb.lan

target.ldap.password_NO_SUFFIX_=******

target.ldap.port_NO_SUFFIX_=389

target.ldap.username_NO_SUFFIX_=cn=Manager

INFO  [BackupTask]: Running command: D:\ptc\Windchill_10.2\WindchillDS\server\bat\export-ldif --ldifFile D:\install\MED-61138-CD-RehostingUtility_102_M010\backups\rehost.firstrun_20160916_1631\backup.ldif --backendID userRoot --appendToLDIF --hostName srv-test.smb.lan --port 4444 --bindDN cn=Manager --bindPassword ****** --trustAll --noPropertiesFile

INFO  [BackupTask]: ** command output **

Export task 20160916163134037 scheduled to start immediately

[16/Sep/2016:16:31:33.990 +0200] severity="NOTICE" msgCount=0 msgID=9896349 message="Export task 20160916163134037 started execution"

[16/Sep/2016:16:31:33.990 +0200] severity="INFORMATION" msgCount=1 msgID=10487422 message="Exporting to D:\install\MED-61138-CD-RehostingUtility_102_M010\backups\rehost.firstrun_20160916_1631\backup.ldif"

[16/Sep/2016:16:31:33.990 +0200] severity="NOTICE" msgCount=2 msgID=8847447 message="Exported 372 entries and skipped 0 in 0 seconds (average rate 11625,0/sec)"

[16/Sep/2016:16:31:33.990 +0200] severity="NOTICE" msgCount=3 msgID=9896350 message="Export task 20160916163134037 finished execution"

Export task 20160916163134037 has been successfully completed

** End command output **

Command successful

INFO  [BackupTask]: Backing up database tables: [CollaborationInfo, Repository, FvHost, WTProcessStep, RemoteObjectId]

INFO  [BackupTask]: Connecting to jdbc:oracle:thin:@srv-test.smb.lan:1521:oratest

INFO  [BackupTask]: Ignore following error message if backup table already existed.

INFO  [BackupTask]: ORA-00955: Es gibt bereits ein Objekt mit diesem Namen

INFO  [BackupTask]: Ignore following error message if backup table already existed.

INFO  [BackupTask]: ORA-00955: Es gibt bereits ein Objekt mit diesem Namen

INFO  [BackupTask]: Ignore following error message if backup table already existed.

INFO  [BackupTask]: ORA-00955: Es gibt bereits ein Objekt mit diesem Namen

INFO  [BackupTask]: Ignore following error message if backup table already existed.

INFO  [BackupTask]: ORA-00955: Es gibt bereits ein Objekt mit diesem Namen

INFO  [BackupTask]: Ignore following error message if backup table already existed.

INFO  [BackupTask]: ORA-00955: Es gibt bereits ein Objekt mit diesem Namen

INFO  [BackupTask]: backup is complete

WARN  [Echo]: EXEC: rehost.firstrun cur:InfoEngine

WARN  [Echo]: rehostTaskName=rehost

WARN  [Echo]: taskCMD=${taskCMD}

WARN  [Echo]: StartProcessCMD=${StartProcessCMD}

INFO  [IeRehosterTask]: RehostProject: OS Name: Windows Server 2012 R2 windows:true prop dir:D:\install\MED-61138-CD-RehostingUtility_102_M010\conf\rehost.properties

INFO  [IeRehosterTask]: Log may contain passwords? false

INFO  [IeRehosterTask]: Properties for Task:

INFO  [IeRehosterTask]: * Rehost Parameter:rehost.log.passwords=false

* Rehost Parameter:source.directory.windchill=D:\ptc\staging\Windchill_P

* Rehost Parameter:target.directory.windchill=D:\ptc\Windchill_10.2\Windchill

* Rehost Parameter:target.wc.hostname=srv-test.smb.lan

* Rehost Parameter:test.prop.values.only=false

cluster.slave.rehost=false

target.directory.windchill=D:\ptc\Windchill_10.2\Windchill

target.ldap.baseDn=cn=configuration,cn=Windchill_10.2,o=ptc

target.ldap.filter=(objectClass=*)

target.ldap.hostname_NO_SUFFIX_=srv-test.smb.lan

target.ldap.password_NO_SUFFIX_=******

target.ldap.port_NO_SUFFIX_=389

target.ldap.username_NO_SUFFIX_=cn=Manager

INFO  [IeRehosterTask]: Updating windchill host? true

INFO  [IeRehosterTask]: Updating application name? false

INFO  [IeRehosterTask]: Keeping previous domain?: true sourceAdapter: lan.smb.srv-test targetAdapter: lan.smb.srv-test

INFO  [IeRehosterTask]: Found repository srv-test.smb.lan

INFO  [IeRehosterTask]: not changing domain for repository srv-test.smb.lan

INFO  [IeRehosterTask]: Found repository Ldap.smb.lan

INFO  [IeRehosterTask]: not changing domain for repository Ldap.smb.lan

INFO  [IeRehosterTask]: Found repository EnterpriseLdap.smb.lan

INFO  [IeRehosterTask]: not changing domain for repository EnterpriseLdap.smb.lan

INFO  [IeRehosterTask]: Keeping home directory: false targetWindchillDir: D:/ptc/Windchill_10.2/Windchill sourceWindchillDir: D:/ptc/staging/Windchill_P

INFO  [IeRehosterTask]: Changing LDAP - Source: d:/ptc/staging/windchill_p Target: D:/ptc/Windchill_10.2/Windchill

INFO  [IeRehosterTask]: Using props for lan.smb.srv-test

INFO  [IeRehosterTask]: Using props for lan.smb.srv-test

INFO  [IeRehosterTask]: ** Changing lan.smb.srv-test.servlet.administration.baseUri=ldap://srv-test.smb.lan:389/dc=srv-test,dc=smb,dc=lan,cn=configuration,cn=Windchill_10.2,o=ptc to lan.smb.srv-test.servlet.administration.baseUri=ldap://srv-test.smb.lan:389/dc=srv-test,dc=smb,dc=lan,cn=configuration,cn=Windchill_10.2,o=ptc

INFO  [IeRehosterTask]: Using props for lan.smb.srv-test

INFO  [IeRehosterTask]: Using props for lan.smb.srv-test

INFO  [IeRehosterTask]: Using props for lan.smb.srv-test

INFO  [IeRehosterTask]: ** Changing lan.smb.Ldap.java.naming.provider.url=ldap://srv-test.smb.lan:389 to lan.smb.Ldap.java.naming.provider.url=ldap://srv-test.smb.lan:389

INFO  [IeRehosterTask]: Using props for lan.smb.srv-test

INFO  [IeRehosterTask]: ** Changing lan.smb.EnterpriseLdap.java.naming.provider.url=ldap://srv-test.smb.lan:389 to lan.smb.EnterpriseLdap.java.naming.provider.url=ldap://srv-test.smb.lan:389

INFO  [IeRehosterTask]: Changing LDAP server from ldap://srv-test.smb.lan:389 to ldap://srv-test.smb.lan:389

INFO  [IeRehosterTask]: Changing Java RMI Server Host from srv-test.smb.lan to srv-test.smb.lan

INFO  [IeRehosterTask]: Changing Wt RMI Server Host from srv-test.smb.lan to srv-test.smb.lan

INFO  [IeRehosterTask]: ** command output **

Default product root=D:\ptc\Windchill_10.2\Windchill\bin\..

java -cp "D:\ptc\Windchill_10.2\Windchill\bin\..\codebase;D:\ptc\Windchill_10.2\Windchill\bin\..\codebase\WEB-INF\lib\*;D:\ptc\Windchill_10.2\Windchill\bin\..\lib\*" com.ptc.windchill.structconf.StructConfManager -r "D:\ptc\Windchill_10.2\Windchill\bin\.." -t codebase/wt.properties -s wt.federation.ie.ldapServer=ldap://srv-test.smb.lan:389 -s java.rmi.server.hostname=srv-test.smb.lan -s wt.rmi.server.hostname=srv-test.smb.lan

** End command output **

Command successful

INFO  [IeRehosterTask]: Command to update IE struct properties: xconfmanager -s ie.ldap.managerDn=cn=Manager -s ie.ldap.managerPw=****** -s ie.ldap.serverHostName=srv-test.smb.lan -s ie.ldap.serverPort=389 -t codebase/WEB-INF/ieStructProperties.txt

INFO  [IeRehosterTask]: ** command output **

Default product root=D:\ptc\Windchill_10.2\Windchill\bin\..

java -cp "D:\ptc\Windchill_10.2\Windchill\bin\..\codebase;D:\ptc\Windchill_10.2\Windchill\bin\..\codebase\WEB-INF\lib\*;D:\ptc\Windchill_10.2\Windchill\bin\..\lib\*" com.ptc.windchill.structconf.StructConfManager -r "D:\ptc\Windchill_10.2\Windchill\bin\.." -s ie.ldap.managerDn=cn=Manager -s ie.ldap.managerPw=****** -s ie.ldap.serverHostName=srv-test.smb.lan -s ie.ldap.serverPort=389 -t codebase/WEB-INF/ieStructProperties.txt

** End command output **

Command successful

INFO  [IeRehosterTask]: Updating credentials map

INFO  [IeRehosterTask]: Checking property: mapcredentials.admin.adapters original_value: lan.smb.Ldap^cn=Manager^encrypted.lan.smb.Ldap.cn=Manager;lan.smb.EnterpriseLdap^cn=Manager^encrypted.lan.smb.EnterpriseLdap.cn=Manager

INFO  [IeRehosterTask]: Removing the previous values

INFO  [IeRehosterTask]: ** command output **

Default product root=D:\ptc\Windchill_10.2\Windchill\bin\..

java -cp "D:\ptc\Windchill_10.2\Windchill\bin\..\codebase;D:\ptc\Windchill_10.2\Windchill\bin\..\codebase\WEB-INF\lib\*;D:\ptc\Windchill_10.2\Windchill\bin\..\lib\*" com.ptc.windchill.structconf.StructConfManager -r "D:\ptc\Windchill_10.2\Windchill\bin\.." --undefine mapcredentials.admin.adapters

** End command output **

Command successful

INFO  [IeRehosterTask]: adding new credentials for adapter: lan.smb.Ldap

INFO  [IeRehosterTask]: adding new credentials for adapter: lan.smb.EnterpriseLdap

INFO  [IeRehosterTask]: Checking property: mapcredentials.nonprivileged.adapters original_value:

INFO  [IeRehosterTask]: Adding the new values

WARN  [Echo]: EXEC: rehost.firstrun cur:Database

WARN  [Echo]: rehostTaskName=rehost

WARN  [Echo]: taskCMD=${taskCMD}

WARN  [Echo]: StartProcessCMD=${StartProcessCMD}

INFO  [DatabaseRehostTask]: RehostProject: OS Name: Windows Server 2012 R2 windows:true prop dir:D:\install\MED-61138-CD-RehostingUtility_102_M010\conf\rehost.properties

INFO  [DatabaseRehostTask]: Log may contain passwords? false

INFO  [DatabaseRehostTask]: Properties for Task:

INFO  [DatabaseRehostTask]: * Rehost Parameter:rehost.log.passwords=false

* Rehost Parameter:target.directory.windchill=D:\ptc\Windchill_10.2\Windchill

* Rehost Parameter:target.wc.hostname=srv-test.smb.lan

* Rehost Parameter:test.prop.values.only=false

cluster.slave.rehost=false

target.db.hostname=srv-test.smb.lan

target.db.jdbc.database=

target.db.password=*******

target.db.port=1521

target.db.serviceName=oratest

target.db.username=orauser

target.db.vendor=oracle

INFO  [DatabaseRehostTask]: DB property update command: xconfmanager -s wt.pom.dbUser=orauser -s wt.pom.dbPassword=******* -s wt.pom.serviceName=srv-test.smb.lan:1521:oratest -s wt.pom.jdbc.service=oratest -s wt.pom.jdbc.host=srv-test.smb.lan -s wt.pom.jdbc.port=1521 -t db/db.properties

INFO  [DatabaseRehostTask]: Connecting to jdbc:oracle:thin:@srv-test.smb.lan:1521:oratest

INFO  [DatabaseRehostTask]: Source AppName: Windchill Target AppName: null

INFO  [DatabaseRehostTask]: Not changing local repository name: srv-test.smb.lan

INFO  [DatabaseRehostTask]: No Repositories will be renamed

WARN  [Echo]: running /c D:\ptc\Windchill_10.2\Windchill/bin/xconfmanager -p

INFO  [FinalizeTask]: RehostProject: OS Name: Windows Server 2012 R2 windows:true prop dir:D:\install\MED-61138-CD-RehostingUtility_102_M010\conf\rehost.properties

INFO  [FinalizeTask]: Log may contain passwords? false

INFO  [FinalizeTask]: Properties for Task:

INFO  [FinalizeTask]: * Rehost Parameter:rehost.keystore.clear=false

* Rehost Parameter:rehost.log.passwords=false

* Rehost Parameter:test.prop.values.only=false

Maybe you can find the answer

TomU
23-Emerald II
(To:bschmidt-2)

I don't see the database export and import tasks listed.  Do you run those manually before running the Rehost tool?  Maybe you could share your projects.properties file.

Yes, we did run expdp and impdp before starting the Rehosting Utility.

Projects.properties:

# This file is used to define sets of tasks to be run in sequence.

# Property rehost.useCase in rehost.properties should be set to match the

#   property name listing the desired set of tasks.

# These tasks should be run with Apache and the Windchill MethodServer stopped, and the database running:

# * Apache: Propagate Apache configuration changes

# * ChangeHome: Update Windchill and Apache for a new location - the Apache task needs to run afterwards to propagate the Apache changes

# * Cluster: Update Windchill properties specific to a clustered environment

# * ContainerTemplate: Copy container templates to a stubbed vault to allow it to be used in Upgrade testing

# * Copy: Copy files from staging to target location - needs to be run first for new environments

# * Database: Update Windchill's database connection

# * InfoEngine: Update Windchill's LDAP server connection(s), and update LDAP properties

# * QueueMgmt: Stop, start, or clear queues

# * Script: Allows for user defined tasks

# * Solr: Update Solr settings

# * Vault: Update FileVault configuration, and copy vault content

# * WVSAgent: Update WVS agent configuration

# * WVSWorker: Update WVS worker configuration

# This task should be run after copying lib/wcRehost.jar to <Windchill_Home>/lib/ then starting Apache, and the Windchill MethodServer

# * SelectiveContent: Copies selected vault content to the new location

# These are the standard sets of tasks for these functions:

# rename=InfoEngine,Database,Apache

# rehost=InfoEngine,Database,Apache,Vault

# clone=Copy,InfoEngine,Database,Apache

# move=Copy,ChangeHome,InfoEngine,Apache

rehost.firstrun=Vault,InfoEngine,Apache,Database

TomU
23-Emerald II
(To:bschmidt-2)

The fact that Windchill starts up successfully makes me think the Rehost utility worked fine.  I really question if the database was imported correctly.  The Rehost utility doesn't make changes to existing products or libraries.  It's basically changing server names, file paths, passwords, etc.  If the rehosted system fires up correctly, then what you see when you log it is what exists in the database.

Are you allowed access directly to the database?  If so, try querying for the products and libraries:

select * from PDMLinkProduct

select * from WTLibrary

View solution in original post

Hi guys,

thanks for all the help and hints! We solved the issue 😉

I was a little bit confused by my own rehosting. Tom's hint lead us to the solution.

We run the selects and found out that there are 60 products in production system, but only one(!) in our test system.

We saw that there are two different users on the test database. PDMLINK and ORAUSER. So we connected as the other user and the select returned 60 products. So we changed the db.properties and fixed some "FILENAMEUSN_SEQ" and "STREAMID_SEQ" errors and voilá: Windchill was up and running 😄

Again, thanks for all!

mlockwood
19-Tanzanite
(To:bschmidt-2)

Hopefully PTC is reading this...

I absolutely love what the Re-host utility brings to the table - and applaud PTC for developing it.  I've finally become relatively expert using it.

But, the documentation is extremely hard to follow.  It takes extreme perseverance to be able to get from the documentation what to actually do and how to do it.  The people writing it really tried - you can see that.  Just needs some more attention actually sitting with someone trying to follow it.  There is so much in the guide about the advanced functionality (e.g. scripting) but it's very hard to get to the point where a very bare-bones basic re-host process is working.

Mike - It is being read and passed along 🙂

Tom Uminn‌ thanks for your work.

Best,

Toby

Announcements