SDP will not start after reboot

SDP will not start after reboot


I am normally very patient, but after several days of much trial and error, I am coming to the realization that we may never be able to migrate from build 9230. Before I can do that, I need a STABLE version of SDP running in DEV (if there is any such thing).


To start, all I want to do is make a copy of my production database and bring it up in my development environment (Windows Server 2008 R2, 4 CPUs and 16GB RAM).


After much trial and all error, I completely removed SDP from my development server, deleted the ManageEngine folder tree and rebooted the server. After it came back up, I checked the registry and found a few leftovers there  (AdventNet) and deleted them.


I then installed build 9230 (downloaded from archive) and tried to start it using the "Start ServiceDesk" option provided after the installation completed. After several minutes of watching dots display, I checked with task manager and saw javaw.exe eating up memory. While updating this note, the system finally started and I was able to log in as administrator.


From this instance I was able to install our license. Taking baby steps this time, I rebooted the server to see if it would start normally. I waited a few minutes for java.exe to settle down and the CPU idled down. I then successfully logged into SDP locally. I tried to connect to the dev system remotely, but had to use port 8080. So far, all is working as expected. I will change the default web server port later if all goes well.


I next shutdown SDP and used the changedbserver command to point to our SQL server back end (SQL Server 2014) and create the database. I then used the RUN command to check out the change. It said "Unclean shutdown of previous run". The [CREATED] lines came out quickly, but it was several minutes until everything started and I was able to login successfully as administrator.


Now I did the StartSDP command (I like dots), but wait! No dots and a successful login. Let's see what a reboot does. That worked too! So far, so good. Now let's get some data.


I logged into the server, shutdown SDP and invoked the "Restoredata" command. I pointed to the latest full backup from our production system and clicked "No" when asked if I was restoring to production to make sure email fetching would be turned off.


After a very, very, very long time (over 100 minutes), the restore failed with the message below. I tried to start SDP using the run command, but it fails starting AdventNetServiceDesk.


===============================QUERY = INSERT INTO RememberMeDetails (REMEMBERMEID,USERID,USERUNIQUEID,AUTHTOKENID,AUTHTOKEN,CREATEDTIME,LASTAUTHENTICATEDTIME,IPADDRESS,USERAGENT,ISVALID) VALUESnull
java.sql.BatchUpdateException: Violation of UNIQUE KEY constraint 'RememberMeDetails_UK2'. Cannot insert duplicate key in object 'dbo.RememberMeDetails'. The duplicate key value is (-).
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:901)
        at com.adventnet.servicedesk.tools.RestoreSDBackup.restoreTableData(RestoreSDBackup.java:1007)
        at com.adventnet.servicedesk.tools.RestoreSDBackup.restoreDatabase(RestoreSDBackup.java:432)
        at com.adventnet.servicedesk.tools.RestoreSDBackup.main(RestoreSDBackup.java:146)
        at com.adventnet.servicedesk.tools.RestoreDialog$5.run(RestoreDialog.java:188)
        at java.lang.Thread.run(Unknown Source)
java.sql.BatchUpdateException: Violation of UNIQUE KEY constraint 'RememberMeDetails_UK2'. Cannot insert duplicate key in object 'dbo.RememberMeDetails'. The duplicate key value is (-).
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:901)
        at com.adventnet.servicedesk.tools.RestoreSDBackup.restoreTableData(RestoreSDBackup.java:1007)
        at com.adventnet.servicedesk.tools.RestoreSDBackup.restoreDatabase(RestoreSDBackup.java:432)
        at com.adventnet.servicedesk.tools.RestoreSDBackup.main(RestoreSDBackup.java:146)
        at com.adventnet.servicedesk.tools.RestoreDialog$5.run(RestoreDialog.java:188)
        at java.lang.Thread.run(Unknown Source)
Unable to restore database : Violation of UNIQUE KEY constraint 'RememberMeDetails_UK2'. Cannot insert duplicate key in object 'dbo.RememberMeDetails'. The duplicate key value is (-).
Violation of UNIQUE KEY constraint 'RememberMeDetails_UK2'. Cannot insert duplicate key in object 'dbo.RememberMeDetails'. The duplicate key value is (-).


C:\ManageEngine\ServiceDesk\bin>


H E L P

                  New to ADSelfService Plus?