Error upgrading to latest EAP

Hi

I'm trying to upgrade our TC (Build 6874) to latest EAP and I'm getting a problem when TC tries to update our TeamCity SQL Server 2005 database. Here is part of the error message:

uncategorized SQLException for SQL ; SQL state ; error code ; Invalid object name 'projects'.; nested exception is java.sql.SQLException: Invalid object name 'projects'.

It seems to be looking for a projects table but from inspecting the DB in TeamCity there seems to be no projects table. Is there a workaround? Is my db schema too old?

Find attacthed the log files. Can you please help.

Edited by: Carel Lotz on Oct 5, 2008 12:19 AM



Attachment(s):
localhost.2008-10-04.log
teamcity-server.log
11 comments
Comment actions Permalink

Carel Lotz wrote:

Hi

I'm trying to upgrade our TC (Build 6874) to latest EAP and I'm getting a problem when TC tries to update our TeamCity SQL Server 2005 database. Here is part of the error message:

uncategorized SQLException for SQL ; SQL state ; error code ; Invalid object name 'projects'.; nested exception is java.sql.SQLException: Invalid object name 'projects'.

It seems to be looking for a projects table but from inspecting the DB in TeamCity there seems to be no projects table. Is there a workaround? Is my db schema too old?

Find attacthed the log files. Can you please help.


I can't see any files attached.

--
Alexey Gopachenko
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Alexy, I can see the files attached to original the post. But I attach them again here for your perusal again. Btw, I've tried precisely the same on a separate machine and I'm getting the same error. Thanks.



Attachment(s):
localhost.2008-10-06.log
teamcity-server.log
0
Comment actions Permalink

I've verified that if I setup the machine with an empty TeamCity database everything works fine. Unfortunately we loose all our build history etc. which is not something we would like to do. Please help.

Edited by: Carel Lotz on Oct 6, 2008 6:57 PM

0
Comment actions Permalink

Carel Lotz wrote:

I've verified that if I setup the machine with an empty TeamCity database everything works fine. Unfortunately we loose all our build history etc. which is not something we would like to do. Thanks.


We need log files corresponding to first server start after deploying
new version. You've sent me log dated 2008-10-06 while your first post
is day before that. Either provide corresponding log section or restore
from backup, try again and than send all information you obtain during
first start.

Also:

1. Which version you are upgrading from?
2. Please list contents of ".BuildServer\system\version.dat" file
3. Please verify that you have "projects" table in the DB you connect to.

--
Alexey Gopachenko
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

(Bump) Any news? We don't want to loose our build history

0
Comment actions Permalink

Alexy

sent me log dated 2008-10-06 while your first post
is day before that. Either provide corresponding log section or restore
from backup, try again and than send all information you obtain during
first start.


the files I send the second time around was from a separate machine on which I tried to install the EAP. I had to revert the first machine back to the older version as the team needs the CI server up and running. I am therefore troubleshooting this on a separate machine that does not impact the team and the log files I send the second time around was from this machine. It gives me precisely the same error. I re-attach the log files again from having started the server the first time around.

1. Which version you are upgrading from?

As mentioned in the original post - 3.1.2. EAP (Build 6874).

2. Please list contents of ".BuildServer\system\version.dat" file

Find attached the file

3. Please verify that you have "projects" table in the DB you connect to.

As mentioned in the first post, the database does not contain a projects table. everything was working fine though.

In terms of the upgrade process, here is what I am doing:
1. Make a backup of the existing build configurations, teamcity db and existing build artifacts
2. Install new TeamCity EAP
3. Restore the backup
4. Restore the build configurations and build artifacts
5. Setup TeamCity database.properties file
6. Configure TeamCity to use SQL Server 2005
7. Start TeamCity web server and build agent
8. Navigate to portal site - error occurs as shown in the log files.

Thanks



Attachment(s):
localhost.2008-10-07.log
version.dat
teamcity-server.log
0
Comment actions Permalink

Thanks for the detailed info. Your original post is somehow gone missing
in my newsgroup reader.

Judging from

INFO - rverSide.impl.DatabaseSettings -
External database settings not specified: cannot find
D:\TeamCity.BuildServer\config\database.properties
INFO - jetbrains.buildServer.SERVER -
Starting TeamCity server
INFO - erver.serverSide.impl.DBFacade -
Connection pool configured (org.hsqldb.jdbcDriver, maximum number of
connections: 50)
INFO - erver.serverSide.impl.DBFacade -
Connection pool URL:
jdbc:hsqldb:file:D:/TeamCity.BuildServer/system/buildserver

You've done something wrong with DB config.

So it starts embedded DB but thinks that DB schema is at your current
version (222).

Please ensure that you place proper file to proper place on your step 5.

I suppose this will solver your problem.

Carel Lotz wrote:

Alexy

>> sent me log dated 2008-10-06 while your first post
>> is day before that. Either provide corresponding log section or restore
>> from backup, try again and than send all information you obtain during
>> first start.


the files I send the second time around was from a separate machine on which I tried to install the EAP. I had to revert the first machine back to the older version as the team needs the CI server up and running. I am therefore troubleshooting this on a separate machine that does not impact the team and the log files I send the second time around was from this machine. It gives me precisely the same error. I re-attach the log files again from having started the server the first time around.

>> 1. Which version you are upgrading from?

As mentioned in the original post - 3.1.2. EAP (Build 6874).

>> 2. Please list contents of ".BuildServer\system\version.dat" file

Find attached the file

>> 3. Please verify that you have "projects" table in the DB you connect to.

As mentioned in the first post, the database does not contain a projects table. everything was working fine though.

In terms of the upgrade process, here is what I am doing:
1. Make a backup of the existing build configurations, teamcity db and existing build artifacts
2. Install new TeamCity EAP
3. Restore the backup
4. Restore the build configurations and build artifacts
5. Setup TeamCity database.properties file
6. Configure TeamCity to use SQL Server 2005
7. Start TeamCity web server and build agent
8. Navigate to portal site - error occurs as shown in the log files.

Thanks



--
Alexey Gopachenko
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Alexy

Even if the database.properties file is in the right place I still get the exception. Find attached the log files after I restarted TeamCity with the database.properties file properly configured.



Attachment(s):
teamcity-server.log
localhost.2008-10-07.log
0
Comment actions Permalink

Carel Lotz wrote:

Alexy

Even if the database.properties file is in the right place I still get the exception. Find attached the log files after I restarted TeamCity with the database.properties file properly configured.

And after this point you still have version 222 in your version.dat?...

--
Alexey Gopachenko
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Alexy

After discussing with the team, we decided to drop our existing build history and setup TeamCity from scratch.

Thanks

0
Comment actions Permalink

Carel,

Actually, TeamCity should upgrade to the EAP just fine. There are no known problems with upgrade so far. Your case could be related to non synchronized version.dat file content and database state.

--
Best regards,

Yegor Yarko
Project Manager (TeamCity)
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.