Will installation from the installer remove all my data and configuration from previous version?

Hello. I have an issue with my TeamCity instance.

It is not starting anymore and I can see the following logs:

30-May-2019 09:01:53.820 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [jetbrains.buildServer.web.TCServletContextListener]
java.lang.ClassNotFoundException: jetbrains.buildServer.web.TCServletContextListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1344)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1172)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:546)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:527)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4734)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5278)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

So I believe something happened with TeamCity itself and I need to re-install it to fix the issue.

I have tried to test if I can use DataFiles so I have installed same version of TeamCity on another VM and after installation I turned TeamCity service off, replaced data directory files and turned TeamCity on.

Now it says different error at startup (in Web interface):

Unexpected exception: SQL error when doing 'Taking a connection from the data source': java.sql.SQLException: error in script file line: C:\ProgramData\JetBrains\TeamCity\system\buildserver 384. Caused by: org.hsqldb.HsqlException: error in script file line: C:\ProgramData\JetBrains\TeamCity\system\buildserver 384
Current Startup State
Startup status
Current step: TeamCity server startup error
Next step: not defined yet
Data Directory
Directory path: C:\ProgramData\JetBrains\TeamCity exists
Database properties file exists
Internal database file: 2.3.2
Database
Database type: default (using internal database)
Database connection URL: jdbc:hsqldb:file:C:/ProgramData/JetBrains/TeamCity/system/buildserver
Versions
Software version: 875
Data directory version: 875
Database version: unknown
Logs
Logs path: C:\TeamCity\logs

What should be my next steps?

0
2 comments

Hi Alexander,

 

First, answering your title, TeamCity has a difference between the data directory and installation directory. The basic configuration about the web server is kept in the installation directory, but all data, including connection to the database, the database (if you are using the internal one), artifacts, project configuration, etc. are stored in the data directory. The installer will override the installation directory, and uninstalling should offer to remove or keep the data (directory), so you should be able to retain it just fine.

 

Regarding the text of the message, I'm not sure the issue is the same on both sides. Do you also use the internal database in your initial installation, or did you move to an external one? It's not recommended to keep the internal one beyond test purposes: https://www.jetbrains.com/help/teamcity/migrating-to-an-external-database.html

 

The first error message seems to imply that a full class is missing, which might indicate corruption, or some problem with the installation. If you installed a newer version over the old one without removing the installation folder of the old one this might lead to issues, so it would be recommended to remove it entirely and reinstall over it.

From the second error message, it would seem like the database is corrupted, which might have happened during copying, or might be as well an issue on the original, but with the current data, this wouldn't be enough to troubleshoot it. It might as well be something with permissions

 

The next step would be to, if you still have the data, collect the full server logs from the original one and forward them to us via the Submit a Request button on top of this page so that we can review it and see what's going on. This said, the error messages seem to imply that there is something wrong with the files themselves, so reinstalling might help in the first case (reinstalling will not impact the current database and thus it won't help with the second issue)

0
Avatar
Permanently deleted user

Thank you for your answer. In my case the issue was with broken file system. I was able to recover everything from a backup.

0

Please sign in to leave a comment.