4.5 => 5.0 Upgrade Fails ERROR: relation "vcs_settings_hash" does not exist

PostgreSql 8.3 DB
Upgrade and server fails to start:

aused by: org.postgresql.util.PSQLException: ERROR: relation "vcs_settings_hash" does not exist
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:344)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
    at jetbrains.buildServer.serverSide.impl.query.GenericQuery$7.action(GenericQuery.java:2)
    at jetbrains.buildServer.serverSide.impl.query.GenericQuery$8.apply(GenericQuery.java:5)

Not good.  Any help would be much appreciated.

Todd

14 comments
Comment actions Permalink

Please take a look at our upgrade steps: http://confluence.jetbrains.net/display/TCD5/Upgrade
Did you follow the instructions? Can you describe how did you upgrade?

0
Comment actions Permalink

Yes I read the docs.  This servers has been successfully upgraded from version 3.0 to 4.5 and moved to PostgreSql w/o problem.
This is a windows box and I ran the windows installer, which first uninstalled the previous version, and then ran the install.

0
Comment actions Permalink

Could you please provide teamcity-server.log?

0
Comment actions Permalink

teamcity-server.log attached.



Attachment(s):
teamcity-server.log.zip
0
Comment actions Permalink

Did you modify .BuildServer/system/version.dat file before or after upgrade? In case if you have backup could you please provide content of the version.dat file from version 4.5?

0
Comment actions Permalink

I didn't modify that file, on purpose at least.

As will all things this week my backup doesn't seem to contain that file.  Neither does the running directory?  Should it?

0
Comment actions Permalink

Hi Todd,

how did you do this backup? are there other backups - could you please check them for the 'version.dat' file?

It seams that upgrade or migration has been done incorrectly, and some operations (on upgrade or migration) were failed.
Could you please describe how did you do upgrade to 4.5 and migration to Postgress?

Thanks,
Leonid

0
Comment actions Permalink

Turns out my automated backup has been failing copying files for a while so I do not have a backup.

The Postgres conversion was done over a year ago on version 3.x.  Upgrades to 4.0 and 4.5 were done by running the installer.

It looks like I have a complete <TeamCityData>\config directory from version 4.5, and that's about it.  From what I understand that should contain my build configurations.  I also have the Postgres database.  I really just need to get the server back up, and I'm willing to start from zero at this point if I have to.  Is there anything I can use to in the config directory to make it quicker?

Thanks.

0
Comment actions Permalink

Hi Todd,

It seems the new installation of TeamCity works with the different data directory than the former one. Could you please look the right directory through the whole your disk (it should contain a 'version.dat' file, for instance)?

If the current directory is in fact right, could you please provide me with the former logs ('teamcity-server.log*' files), one or several of them should contain lines like 'Start applying converter'. If successfull, I can explain you how to solve this problem.

> I really just need to get the server back up, and I'm willing to start from zero at this point if I have to.  Is there anything I can use to in the config directory to make it quicker?

In order to do it we should need the version of config files – in this case it is possible to make the 'version.dat' file manually and start TeamCity.
These version can be found in log files in lines like 'Start applying converter'.

Thanks,
Leonid

0
Comment actions Permalink

I searched the entire system.  There is no file named version.dat.
I've grepped through the entire TeamCity directory and sub-directory there is no file that contains "Start applying converter".  There is only one TeamCity-Sever.log file, which I've already attached.

The previous version that was working was 4.5.5.

0
Comment actions Permalink

Hi Todd,

we can suppose that the version of the configuration files is 4.5.x (internal number is 280). So we can try to do the following:

1. shut down TeamCity if it is running, backup the existent configuration files (better to backup the whole TeamCity data directory) and database;

2. make a new 'version.dat' file with the following content:

version.nr=280

ensure that this string doesn't contain any spaces (even tailing ones);

3. start the TeamCity server (version 5.x) – it should upgrade data (both database and configuration files) on starting.

Hope it will help. If it fail, please provide me with teamcity-server.log files.

Best regards,
Leonid

0
Comment actions Permalink

P.S. the version.dat file should be placed in the <TeamCity_data>/system directory.

0
Comment actions Permalink

That worked!  TeamCity is back from the dead!
Now to fix my backup problem.

Where do I send the pizza?
Thanks,
Todd

0
Comment actions Permalink

Hi Todd,

you can use the maintainDB utility to backup TeamCity data since 5.0:
http://confluence.jetbrains.net/display/TCD5/Backing+up+TeamCity+Data

Regards,

Leonid

0

Please sign in to leave a comment.