Migrate server from Windows to Linux issues

I'm having a nightmare with migrating our Test Windows YouTrack server over to our Linux machine.

We've been running with YouTrack for a few months now, and have decided to purchase a license, we're now planning to migrate this server over to our Linux machine for the final rollout. This is causing us problems.

Steps Taken
  • TeamCity JAR running on Linux correctly
    • Blank server with our new license enabled

  • Copied the C:\teamsysdata folder from the Windows machine onto the Linux machine

  • Provided full root privileges to the new teamsysdata folder (matching the user)
  • Deleted the .youtrack folder
  • Removed any *.lck files within teamsysdata

  • Restarted the linux server, and we have a raft of Java errors, the first of which suggesting the following..
2013-05-14 11:03:11.953:WARN::unavailable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transientEntityStore' defined in file [/root/.youtrack/work/jetty-0.0.0.0-80-youtrack-4.2.1.jar--any-/webapp/WEB-INF/classes/jetbrains/charisma/persistent/storeConfigurationDatabase.xml]: Cannot resolve reference to bean 'persistentEntityStore' while setting bean property 'persistentStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'persistentEntityStore' defined in file [/root/.youtrack/work/jetty-0.0.0.0-80-youtrack-4.2.1.jar--any-/webapp/WEB-INF/classes/jetbrains/charisma/persistent/storeConfigurationDatabase.xml]: Cannot resolve reference to bean 'persistentDataEnvironment' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'persistentDataEnvironment' defined in file [/root/.youtrack/work/jetty-0.0.0.0-80-youtrack-4.2.1.jar--any-/webapp/WEB-INF/classes/jetbrains/charisma/persistent/exodusDataEnvironmentConfiguration.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [jetbrains.exodus.env.Environment]: Constructor threw exception; nested exception is jetbrains.exodus.exceptions.ExodusException: Exodus 1.0.0: Unexpected file length, address = 0


After spending a good few hours searching the forums for a fix, or something similar, we decided it may be easier just to run YouTrack2YouTrack.py.

This fails with the following output having not managed to import a single issue.
Import issue link types Error for [/admin/issueLinkType/Depend?inwardName=depends+on&directed=true&outwardName=is+required+for]: 409: Conflict: Issue link type [ Depend ] already exists. Error for [/admin/issueLinkType/Duplicate?inwardName=duplicates&directed=true&outwardName=is+duplicated+by]: 409: Conflict: Issue link type [ Duplicate ] already exists. Error for [/admin/issueLinkType/Relates?inwardName=relates+to&directed=false&outwardName=relates+to]: 409: Conflict: Issue link type [ Relates ] already exists. Error for [/admin/issueLinkType/Subtask?inwardName=subtask+of&directed=true&outwardName=parent+for]: 409: Conflict: Issue link type [ Subtask ] already exists. Create project stub [BlitzTech] Create project lead [lhomewood] None Traceback (most recent call last):   File "youtrack2youtrack.py", line 253, in <module>     main()   File "youtrack2youtrack.py", line 25, in main     youtrack2youtrack(source_url, source_login, source_password, target_url, target_login, target_password, project_ids)   File "youtrack2youtrack.py", line 147, in youtrack2youtrack     target.createCustomField(source_cf)   File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 643, in createCustomField params)   File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 655, in createCustomFieldDetailed urllib.urlencode(params), )

It seems to have created the project, a lead, and some usergroups, but has only managed to import the non-custom fields.
8 comments
Comment actions Permalink
Tried again with a clean server and got this error.

Traceback (most recent call last):   File "youtrack2youtrack.py", line 253, in <module>     main()   File "youtrack2youtrack.py", line 25, in main     youtrack2youtrack(source_url, source_login, source_password, target_url, target_login, target_password, project_ids)   File "youtrack2youtrack.py", line 147, in youtrack2youtrack     target.createCustomField(source_cf)   File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 643, in createCustomField     params)   File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 655, in createCustomFieldDetailed     urllib.urlencode(params), )   File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 77, in _put     return self._reqXml('PUT', url, '<empty/>\n\n')   File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 54, in _reqXml     response, content = self._req(method, url, body, ignoreStatus)   File "C:\Users\buildbot\Downloads\youtrack-rest-python-library-master\youtrack-rest-python-library-master\python\youtrack\connection.py", line 47, in _req     raise youtrack.YouTrackException(url, response, content) youtrack.YouTrackException: Error for [/admin/customfield/field/Requested%20For?defaultBundle=requestedfor_bundle&attachBundlePolicy=0&isPrivate=false&type=enum%5B%2A%5D&autoAttached=true&defaultVisibility=false]: 400: Bad Request: Can't find enumeration with name [requestedfor_bundle]


requestedfor_bundle is a custom bundle in our YouTrack server, shouldn't the YouTrack2Youtrack script handle the copying of these onto the newer one?
0
Comment actions Permalink
Hi Jim,

Hope this nightmare is going to be finished )

I assume, the best way in your case is to make a YouTrack backup on your Win machine (from Administration-> Database export), and then utilize it on Linux. It will run correctly.

Speaking of issues causes, seems that database is corrupted (after moving to Linux), this is the message saying about this:
[jetbrains.exodus.env.Environment]: Constructor threw exception; nested exception is jetbrains.exodus.exceptions.ExodusException: Exodus 1.0.0: Unexpected file length, address = 0
prettyPrint();

Regarding YouTrack2YouTrack import, please check that URL is correctly. Please note, that script won't import Agile board configuration.

I recommend you to try variant with backup first.

Thank you.
0
Comment actions Permalink
Thanks for this info, we'll try your first approach now.
Hopefully the database isn't actually corrupted, as we're running it fine on Windows still.

The Youtrack2Youtrack import was our last attempt of making things work before attempting to contact you.

We'll let yo know how we get on.
0
Comment actions Permalink
Jim,

Yes, I understand that YouTrack2YouTrack import was your last attempt. But, I just want to warn you that, it's not a good idea in your case.
So, I'll be waiting for you with results of backup utilizing.

Thank you.
0
Comment actions Permalink
Jim,

I've created a task http://youtrack.jetbrains.com/issue/JT-19734 . It'll be helpful.
0
Comment actions Permalink
Thanks for this extra info, I'm just following this up with our IT department who control the Linux machine.
0
Comment actions Permalink
We've attempted to connect to a database backup from last night, and everything worked correctly.

Such a simple fix in the end.

Thank you Andrey.
0
Comment actions Permalink
Jim,

That's great.
Thank you for commenting related issue.
0

Please sign in to leave a comment.