Cannot Start TeamCity 6.0.2 after clean install

We are trying to install TeamCity on windows 7 but no luck so far.

We followed regular Windows installation, chose User Account which is an administrator (We also tried SYSTEM) and changed port to 33, then we get below error:

TeamCity Server Startup Error

An error was encountered during TeamCity server startup

Could not write version - no version table.


java.lang.IllegalStateException: Could not write version - no version table.   at jetbrains.buildServer.serverSide.db.DBSchema.writeDatabaseVersion(DBSchema.java:228)   at jetbrains.buildServer.serverSide.db.DBSchema.populateWithInitialData(DBSchema.java:145)   at jetbrains.buildServer.serverSide.db.DBSchema.createSchema(DBSchema.java:170)   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager$2.run(TeamCityDatabaseManager.java:468)   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withMaintenanceDBF(TeamCityDatabaseManager.java:444)   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.createNewSchemaWithInitialData(TeamCityDatabaseManager.java:466)   at jetbrains.buildServer.serverSide.versioning.VersionManager.ensureActualDatabase(VersionManager.java:434)   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:394)   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerSafe(TeamCityDispatcherServlet.java:24)   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$400(TeamCityDispatcherServlet.java:232)   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$5.run(TeamCityDispatcherServlet.java:2)   at java.lang.Thread.run(Unknown Source)

After stopping servers and restart by typing, runAll.bat stop and runAll.bat start, We get different error, like below:

TeamCity Server Startup Error

An error was encountered during TeamCity server startup

Data parts are inconsistent: the database exists  but the config and version files are absent.

jetbrains.buildServer.serverSide.db.DataPartsInconsistentException: Data parts are inconsistent: the database exists but the config and version files are absent.   at jetbrains.buildServer.serverSide.versioning.VersionManager.checkNeedUpgradeAndVersionMatchingInCaseOfSchemaExists(VersionManager.java:311)   at jetbrains.buildServer.serverSide.versioning.VersionManager.checkVersionsAndUpgradeSchemaIfNeeded(VersionManager.java:354)   at jetbrains.buildServer.serverSide.versioning.VersionManager$2.run(VersionManager.java:415)   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withDB(TeamCityDatabaseManager.java:568)   at jetbrains.buildServer.serverSide.versioning.VersionManager.ensureActualDatabase(VersionManager.java:411)   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:394)   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerSafe(TeamCityDispatcherServlet.java:24)   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$400(TeamCityDispatcherServlet.java:232)   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$5.run(TeamCityDispatcherServlet.java:2)   at java.lang.Thread.run(Unknown Source)


In our .BuildServer (configuration directory) folder, files are buildserver.data, buildserver.lck, buildserver.txt, buildserver.properties and buildserver.script.


Any help will be appreciated,

Regards.
12 comments
Comment actions Permalink

Hi Mary

We didn't see such issue before, so I cannot say for sure what's the reason.

But as it's fresh installation, and you don't need to preserve data, let's delete it and allow the server to recreate configuration and database from scratch.

  1. Stop TeamCity Web Server service.
  2. Run <TeamCity Home>\bin\tomcat6w.exe //ES//TeamCity command. You'll need elevated administrative rights to do this. Start cmd.exe using Run as Administrator.
  3. This dialog allows to configure the service settings. Go to Java tab, and within Java Options box find the last -Dteamcity.data.path property.
  4. This is actual path where the service stores configuration. If you need to change it, you can modify the path here. At the moment our installer suggests a location within user profile by default, but I recommend to change it to C:\TeamCity\.BuildServer (or other folder if you changed installtion path).
  5. Find this dolder on the disk and delete it. At next start the server will completely recreate it.
  6. Check that the service account (or SYSTEM, as default) has enough permissions to modify files there.
  7. Start the service.

If this doesn't help and you continue to get errors, please attach a log from <TeamCity Home>\bin\logs\teamcity-server.log

Thanks
Michael
0
Comment actions Permalink

Hi Michael,

We tried but didn't work. We still get the same error.

Version 5.1.5 is working without error.

Attached the log file, please check it.

Regards,

Mary



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

Mary,

Thanks for the log. We'll need some additional information:

  1. Output of dir D:\TeamCityServerConfiguration\system command - a list of files there with its size
  2. Content of D:\TeamCityServerConfiguration\system\buildserver.script file



Thanks
Michael
0
Comment actions Permalink

Hi Michael,

This is the directory listing:

Directory of D:\TeamCityServerConfiguration\system

02/09/2011  09:57 AM    <DIR>          .
02/09/2011  09:57 AM    <DIR>          ..
02/08/2011  01:36 PM             4,603 buildserver.backup
02/08/2011  01:33 PM         1,048,576 buildserver.data
02/09/2011  09:57 AM                 0 buildserver.lck
02/09/2011  09:57 AM               150 buildserver.log
02/09/2011  09:57 AM               492 buildserver.properties
02/08/2011  01:36 PM            23,111 buildserver.script
               6 File(s)      1,076,932 bytes
               2 Dir(s)  155,785,076,736 bytes free




Attached the buildserver.script file.


Still having the issue.

Thanks,
Mary

Attachment(s):
buildserver.script.zip
0
Comment actions Permalink

Hi Mary

Unfortunately, I still cannot reproduce this behavior.
From these logs I can see the database is created successfully, but the server cannot access it later.

Could you change a Data directory to a location on C: drive? Just for test, we'll move it to desired place later.

Also, you said version 5.1 was used before. Was it installed on the same machine? Did you uninstall it or just point 6.0 installer to a new location?

Thanks

0
Comment actions Permalink

Hi Michael,

We also installed TeamCity 2 times in C drive after that we installed it to D drive. So that does not solve the problem.

After 3 or 4 clean installation, we downloaded 5.1.5 version, uninstalled TC6 and installed version 5. We used the same machine but got the same error message about TC6 in 2 different machines.

Thanks

0
Comment actions Permalink

Hi Mary

Sorry to hear you still experience this issue. We'd like to help resolve it, but will need additional input.
Please

  1. Stop TeamCity Server service
  2. delete data directory (D:\TeamCityServerConfiguration) from disk
  3. Start the service
  4. Reproduce the issue
  5. Ensure the service is stopped
  6. Archive content of D:\TeamCityServerConfiguration folder and upload it to our ftp, here are instructions.

Thanks
0
Comment actions Permalink

and also, all the files from <TeamCity Home>\logs fiolder.

Thanks!

0
Comment actions Permalink

Hi Michael,

Suprisingly it works. An "Upgrade" console window appeared and it worked after that.

Anyway thanks for your help

0
Comment actions Permalink

Hi

Glad to hear it resolved now. Fell free to ask any other any other questions you may have.
As you can see, problems like that could take a time, if they are not reproduced easely. But I'll do my best.

Thanks
Michael

0
Comment actions Permalink

Hi Michael,

I am having this same issue after I have installed a clean copy of TeamCity. I get following exception :

java.lang.IllegalStateException: Could not write version - no version table.
   at jetbrains.buildServer.serverSide.db.DBSchema.writeDatabaseVersion(DBSchema.java:228)
   at jetbrains.buildServer.serverSide.db.DBSchema.populateWithInitialData(DBSchema.java:145)
   at jetbrains.buildServer.serverSide.db.DBSchema.createSchema(DBSchema.java:170)
   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager$2.run(TeamCityDatabaseManager.java:468)
   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withMaintenanceDBF(TeamCityDatabaseManager.java:444)
   at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.createNewSchemaWithInitialData(TeamCityDatabaseManager.java:466)
   at jetbrains.buildServer.serverSide.versioning.VersionManager.ensureActualDatabase(VersionManager.java:434)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:145)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerSafe(TeamCityDispatcherServlet.java:263)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$400(TeamCityDispatcherServlet.java:183)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$5.run(TeamCityDispatcherServlet.java:2)
   at java.lang.Thread.run(Unknown Source)


I am trying to evaluate TeamCity for our company but no luck so far. What do you suggest?

Regards

0

Please sign in to leave a comment.