TeamCity: Upgrading from 1.0 -> 1.1.1

Hi

I've just upgraded my install as stated on a Suse box. However, I get an out of memory error during startup. This has something to do with the database in my old .BuildServer directory - if I remove it and let TeamCity make a new one everything seems fine.

The error, from teamcity.log is as follows:

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (error in script file line: 48 out of memory)
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (error in script file line: 48 out of memory)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:112)
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy.getConnection(TransactionAwareDataSourceProxy.java:107)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:112)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at jetbrains.buildServer.serverSide.impl.ConnectionPool.alloc(ConnectionPool.java:8)
at jetbrains.buildServer.serverSide.impl.DBFacade.createDatabase(DBFacade.java:34)
at jetbrains.buildServer.serverSide.impl.DBFacade.(DBFacade.java:49) at jetbrains.buildServer.serverSide.impl.BuildServerImpl.initServer(BuildServerImpl.java:638) at jetbrains.buildServer.serverSide.impl.BuildServerImpl.]]>(BuildServerImpl.java:155)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:171)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:78)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:703)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:358)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


Is there a way I can upgrade without losing all my projects/build history?

Thanks

Paul

3 comments
Comment actions Permalink

Hi Paul,

Paul Brooks wrote:

Hi

I've just upgraded my install as stated on a Suse box. However, I get an out of memory error during startup. This has something to do with the database in my old .BuildServer directory - if I remove it and let TeamCity make a new one everything seems fine.


Please run ls -l in .BuildServer/system directory and attach results here - I suppose database
could have been corrupted upon server shutdown.


The error, from teamcity.log is as follows:

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (error in script file line: 48 out of memory)
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (error in script file line: 48 out of memory)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:112)
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy.getConnection(TransactionAwareDataSourceProxy.java:107)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:112)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at jetbrains.buildServer.serverSide.impl.ConnectionPool.alloc(ConnectionPool.java:8)
at jetbrains.buildServer.serverSide.impl.DBFacade.createDatabase(DBFacade.java:34)
at jetbrains.buildServer.serverSide.impl.DBFacade.<init>(DBFacade.java:49)
at jetbrains.buildServer.serverSide.impl.BuildServerImpl.initServer(BuildServerImpl.java:638)
at jetbrains.buildServer.serverSide.impl.BuildServerImpl.<init>(BuildServerImpl.java:155)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:171)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:78)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:703)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:358)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


Is there a way I can upgrade without losing all my projects/build history?

Thanks

Paul



--
Kirill Maximov
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Hi Kirill

Unfortunately I've copied (and not moved) the .BuildServer directory to a backup area while trying to get it to work. All of the timestamps have been reset. Here's an excerpt anyway...

drwxr-xr-x 2 pbrooks users 120 2006-11-16 10:40 826
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 827
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 828
drwxr-xr-x 2 pbrooks users 120 2006-11-16 10:40 829
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 830
drwxr-xr-x 2 pbrooks users 120 2006-11-16 10:40 831
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 832
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 833
drwxr-xr-x 2 pbrooks users 120 2006-11-16 10:40 834
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 835
drwxr-xr-x 2 pbrooks users 120 2006-11-16 10:34 98
-rw-rr 1 pbrooks users 144726 2006-11-16 10:40 buildserver.backup
-rw-rr 1 pbrooks users 1048576 2006-11-16 10:40 buildserver.data
-rw-rr 1 pbrooks users 418 2006-11-16 10:40 buildserver.properties
-rw-rr 1 pbrooks users 5745 2006-11-16 10:40 buildserver.script
drwxr-xr-x 2 pbrooks users 312 2006-11-16 10:40 changes
-rw-rr 1 pbrooks users 130 2006-11-16 10:40 license.keys
drwxr-xr-x 102 pbrooks users 2448 2006-11-16 10:40 messages
-rw-rr 1 pbrooks users 3871 2006-11-16 10:40 rememberMe.xml
-rw-rr 1 pbrooks users 4580 2006-11-16 10:40 responsibles.xml
-rw-rr 1 pbrooks users 74 2006-11-16 10:40 version.dat

When I did the shutdown before the upgrade, it looks as though a single java process was left hanging around as I had to kill it manually when the builds wouldn't run. I suspect you're right and the database is corrupted.

Do I need to dig out the filesystem backup for this or is there a quick way to rebuild the database?

Thanks

Paul

0
Comment actions Permalink

Paul Brooks wrote:

Hi Kirill

Unfortunately I've copied (and not moved) the .BuildServer directory to a backup area while trying to get it to work. All of the timestamps have been reset. Here's an excerpt anyway...

drwxr-xr-x 2 pbrooks users 120 2006-11-16 10:40 826
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 827
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 828
drwxr-xr-x 2 pbrooks users 120 2006-11-16 10:40 829
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 830
drwxr-xr-x 2 pbrooks users 120 2006-11-16 10:40 831
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 832
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 833
drwxr-xr-x 2 pbrooks users 120 2006-11-16 10:40 834
drwxr-xr-x 2 pbrooks users 80 2006-11-16 10:40 835
drwxr-xr-x 2 pbrooks users 120 2006-11-16 10:34 98
-rw-rr 1 pbrooks users 144726 2006-11-16 10:40 buildserver.backup
-rw-rr 1 pbrooks users 1048576 2006-11-16 10:40 buildserver.data
-rw-rr 1 pbrooks users 418 2006-11-16 10:40 buildserver.properties
-rw-rr 1 pbrooks users 5745 2006-11-16 10:40 buildserver.script
drwxr-xr-x 2 pbrooks users 312 2006-11-16 10:40 changes
-rw-rr 1 pbrooks users 130 2006-11-16 10:40 license.keys
drwxr-xr-x 102 pbrooks users 2448 2006-11-16 10:40 messages
-rw-rr 1 pbrooks users 3871 2006-11-16 10:40 rememberMe.xml
-rw-rr 1 pbrooks users 4580 2006-11-16 10:40 responsibles.xml
-rw-rr 1 pbrooks users 74 2006-11-16 10:40 version.dat

When I did the shutdown before the upgrade, it looks as though a single java process was left hanging around as I had to kill it manually when the builds wouldn't run. I suspect you're right and the database is corrupted.

Do I need to dig out the filesystem backup for this or is there a quick way to rebuild the database?


You can try to truncate buildserver.data file to zero size before starting the server
(but don't delete it at all).
It should be restored from buildserver.backup file, thought it may take noticable time.

Hope this helps,
KIR

--
Kirill Maximov
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.