trouble upgrading from 5.1.3 to 6.5.1 (linux)

Hi guys,

I've carefully followed the upgrade steps (at least I think I did).   I started up the tomcat & teamcity server.

I got a prompt to "Enter the Maintenance Authentication Token".  I found the authentication token inside

the teamcity-server.log file.  I copy/pasted the token but it complains that it's an "Invalid token".  I've

tried this multiple times.  All no good.

Here's an output from the teamcity-server.log file:

-----------------------------

[2011-07-06 01:16:59,346]   INFO -   jetbrains.buildServer.SERVER - Starting TeamCity server
[2011-07-06 01:16:59,519]   INFO -   jetbrains.buildServer.SERVER - TeamCity version: 6.5.1 (build 17834), data format version 454
[2011-07-06 01:16:59,528]   INFO -   jetbrains.buildServer.SERVER - TeamCity data directory: /root/.BuildServer
[2011-07-06 01:16:59,971]   INFO -   jetbrains.buildServer.SERVER - Data directory format version: 378
[2011-07-06 01:17:00,554]   INFO -   jetbrains.buildServer.SERVER - Database type: HSQL
[2011-07-06 01:17:00,554]   INFO -   jetbrains.buildServer.SERVER - Database connection URL: jdbc:hsqldb:file:/root/.BuildServer/system/buildserver
[2011-07-06 01:17:01,686]   INFO -   jetbrains.buildServer.SERVER - Database system: HSQL Database Engine 1.8.1
[2011-07-06 01:17:01,696]   INFO -   jetbrains.buildServer.SERVER - Database driver: HSQL Database Engine Driver 1.8.1
[2011-07-06 01:17:01,696]   INFO -   jetbrains.buildServer.SERVER - Database format version: 378
[2011-07-06 01:17:01,698]   INFO -   jetbrains.buildServer.SERVER - Administrator login is required from web UI using authentication token: 6751202956783954508

----------------------------

Can anyone help?

Thanks!

Sunny

11 comments
Comment actions Permalink

Not sure what can be wrong here. Just for the case, is it possible that you are using the wrong teamcity-server.log? Or maybe there is some space character at the end of the token? I would also try to enter the token letter by letter, without copy / paste.

0
Comment actions Permalink

Hi Pavel,

Yes I have already tried all of what you suggested multiple times.  I've also made sure that it's the correct teamcity-server.log.  I was doing a 'tail' on the log while performing all of the activities.  So I can confirm that it's the correct log file and the correct token.   Any other idea?   Any way to get around this problem?

thanks,
Sunny

0
Comment actions Permalink

What browser do you use? Have you tried to do it from another machine, another browser?

0
Comment actions Permalink

I've used both FireFox (3.6.18) and IE8.  The upgrade instruction I followed is from http://confluence.jetbrains.net/display/TCD65/Upgrade (Manual Upgrading on Linux) section.

Let me give you a rundown on what I did to upgrade.  It could be that I'm doing something completely brain-dead (as I'm not a java/tomcat person).

1. downloaded teamcity-6.5.1.tar.gz
2. I saw that the previous (5.1.1) version was installed in /root/TeamCity.  So I've renamed /root/TeamCity to /root/TeamCity.orig
3. I've unpacked teamcity-6.5.1.tar.gz so that it matches the previous installation path (/root/TeamCity).
4. Then I tried restarting tomcat and Teamcity and noticed that it didn't work (it still showed older version of Teamcity)
5. Then I found that there's TeamCity webapps package in /usr/local/tomcat/webapps/ROOT   (I also saw ROOT.war in the webapps folder)
6. So then I renamed /usr/local/tomcat/webapps to /usr/local/tomcat/webapps.orig
7. Then I copied /root/TeamCity/webapps into /usr/local/tomcat/webapps
8. Then I tried restarting tomcat/teamcity again.  
9. This is where I encountered the problem I described (authentication token not working).
10.  Occassionally I was seeing that it was complaining about HSQL being locked.  I would then manually remove the /root/.BuildServer/system/buildserver.lck file

Does this help?   Thanks for the continued effort!

regards,
Sunny

0
Comment actions Permalink

If you are sure there are no other TeamCity instances running and you have backup, you can try to stop TeamCity, remote .lck file and then start TeamCity again.

0
Comment actions Permalink

Yes... just one instance of TeamCity running.  Removing the .lck file takes me

to that original problem of authentication token not working.  Any idea?   There's

gotta be a way to upgrade from 5.1.1 to the latest version.  Do all of the steps I've taken look okay?

0
Comment actions Permalink

Could you please check are there any JS errors in the browser? In Firefox you can see them in Error Console.

0
Comment actions Permalink

I've done run this tests on multiple browsers and multiple machines.  And I have not seen any JS errors.  I really don't think the problem is on my client/browser side.   When TeamCity generates the authentication token, where does it save it to?   I can't help but to think that somehow when I enter the authentication token on my browser, the backend process that handles the form input is not looking (or unable to access) at the same place to verify the token.   Is there some sort of config/parameter I need to update inside the tomcat/webapps/ROOT folder?   Any other configuration I am forgetting to update?  

0
Comment actions Permalink

If you are using FireFox, try this workaround: open the following URL in the other browser tab: http://<TeamCity host>/maintenance/ajax.html?maintenance-authentication-token=<token from the log>
Such request should make you authenticated, after that you can try to refresh page which asks you to enter maintenance token.

0
Comment actions Permalink

I'm not sure what exactly fix it.  Your suggestion didn't work the first or the second time.  After that I decided to redo everything from scratch.  Still didn't work.  But the URL you gave me seemed to authenticate me this time.  How bizarre is that!  Anyway, now I'm past that authentication issue and TeamCity seems to have started up okay.

I can see all of my projects and stuff on the Web GUI.  But I see a whole bunch of "VCS problem" messages next to almost every project.  Clicking on the details tab shows that "authorization failed".   I had never seen this before.   Can you help once more?

thanks!
Sunny

0
Comment actions Permalink

Can you provide full error message? Or send it to teamcity-feedback@jetbrains.com

0

Please sign in to leave a comment.