RestoreData and ChangeWebServerPort problems
Hi everyone.
This is an information post for anyone who wants to avoid all the hair-pulling that I've just been through trying to restore data from a Live to DR/Test system.
Background:
I have a physical live system and a virtual DR/Test system
Both run on Microsoft SQL 2005
Both run on Windows 2003 Server Web edition
Both run on https port 443
Both use a wildcard security certificate for our domain
Process:
I wanted to test an upgrade of SC+ on my Test system before applying to Live so that I could test the new functionality as well as ensuring that all the existing functionality hasn't been broken. This is done as a matter of course for any changes to the system which I'm going to make - it's a very good practice for anyone who doesn't already do it and is made even easier by the use of virtual machines which can be rolled backwards if something goes wrong.
To do my test I take a backup of the Live system using BackupData.bat which creates a .data file containing the SQL and File Attachments. This file is copied over to the Test system and then I run restoreData.bat to overwrite the out of date Test system with the data from Live.
Problem 1:
When I tried to run the restoreData.bat I got a lot of error information displayed including the following:
requestScheme is https
Exception in thread "Thread-3" java.lang.NoClassDefFoundError:
After much head-scratching and a phone call to technical support I discovered that there's a bug in the restore process which causes it to fail if the web server is set to use https.
I therefore ran the command "ChangeWebServerPort.bat 80 http" to set it back to http and the restore ran through without a problem.
Problem 2:
Having restored my data I then set about changing my system back to https with the command "ChangeWebServerPort.bat 443 https". This worked without any noticeable problems but when I tried to start SC+ back up nothing worked. I rolled my Test system back (VM's - very useful!) and tried various combinations of http, https, restoring/not restoring data etc. etc. etc., all without success. At this point I called Jai who helped me work out a few things:
1. The ChangeWebServerPort process takes a copy of the server_http or server_https xml file in the tomcat deployment folder and uses it to copy over the existing server.xml configuration file.
2. Because of the above, any changes you might have made to the server.xml configuration file need to also be made into these files. This particularly includes changes which you'd probably have made to get the security certificate working in tomcat (i.e. keystore password, keystore file and potentially the addition of keystoreType which in my instance was equal to PKCS12
The moral of the story? Support need to look at why the RestoreData function doesn't work when SC+ is in https mode, they also need to make public how and when files are overwritten for those of us who have been told to make amendments to them, and I need to make copies of all my files before I make changes ;)
Hope the above is of some use to someone and it prevents them from wasting days trying to work out how parts of the underlying system work! Thanks to Jai and the Support team for their assistance and you for sparing the lengthy time to read through this post(!).
Andy
New to ADSelfService Plus?