Installing TeamCity first time - get 'SQL error when doing: Connecting to HSQLDB"

Hello,

I am trying to install TeamCity for the first time on a clean VM with windows server 2003.

IIS and SQL Server are not installed on this machine.

I installed TeamCity using the .exe Windows Installer, and went through each step, and did finish. When it launches to localhost, it displays this message:

Ooops, something went wrong...

Error on step: Waiting for a database server...

SQL error when doing: Connecting to HSQLDB
SQL exception: The database is already in use by another process: lockFile: org.hsqldb.persist.LockFile@5820f214[file =C:\Program Files\TeamCity" --StdOutput auto --StdError auto\system\buildserver.lck, exists=false, locked=false, valid=false, ] method: openRAF reason: java.io.FileNotFoundException: C:\Program Files\TeamCity" --StdOutput auto --StdError auto\system\buildserver.lck (The filename, directory name, or volume label syntax is incorrect)

There's more information on the screen that I can paste if neccesary. I have never setup a build/ CI server before(I choose all components during setup, excep removed the java build capability on the final screen).

Any idea why this is happening? What are the pre-requisites for installing TeamCity? Did I need IIS or SQL installed?

Please advise,

Drew

13 comments
Comment actions Permalink

here's the rest of the message on the page, which appears to be a callstack. do I need java installed or something? Is there a page that shows the pre-reqs for TeamCity or step-by-step installation instructuions for someone whose never setup a build server before? Thanks again!

jetbrains.buildServer.serverSide.db.UnexpectedDBException: SQL error when doing: Connecting to HSQLDB
SQL exception: The database is already in use by another process: lockFile: org.hsqldb.persist.LockFile@5820f214[file =C:\Program Files\TeamCity" --StdOutput auto --StdError auto\system\buildserver.lck, exists=false, locked=false, valid=false, ] method: openRAF reason: java.io.FileNotFoundException: C:\Program Files\TeamCity" --StdOutput auto --StdError auto\system\buildserver.lck (The filename, directory name, or volume label syntax is incorrect)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at jetbrains.buildServer.serverSide.db.TeamCityDataSource.checkDatabaseConnection(TeamCityDataSource.java:22)
at jetbrains.buildServer.serverSide.db.TeamCityDataSource.connect(TeamCityDataSource.java:55)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:24)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processServerStartup(TeamCityDispatcherServlet.java:46)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$000(TeamCityDispatcherServlet.java:77)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$1.run(TeamCityDispatcherServlet.java:2)
at java.lang.Thread.run(Thread.java:595)
caused by: java.sql.SQLException: The database is already in use by another process: lockFile: org.hsqldb.persist.LockFile@5820f214[file =C:\Program Files\TeamCity" --StdOutput auto --StdError auto\system\buildserver.lck, exists=false, locked=false, valid=false, ] method: openRAF reason: java.io.FileNotFoundException: C:\Program Files\TeamCity" --StdOutput auto --StdError auto\system\buildserver.lck (The filename, directory name, or volume label syntax is incorrect)
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at jetbrains.buildServer.serverSide.db.TeamCityDataSource.checkDatabaseConnection(TeamCityDataSource.java:22)
at jetbrains.buildServer.serverSide.db.TeamCityDataSource.connect(TeamCityDataSource.java:55)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:24)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processServerStartup(TeamCityDispatcherServlet.java:46)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$000(TeamCityDispatcherServlet.java:77)
at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$1.run(TeamCityDispatcherServlet.java:2)
at java.lang.Thread.run(Thread.java:595)

0
Comment actions Permalink

Could you please provide more details. What installation directory did you chose and what path did you specify for TeamCity data directory?

0
Comment actions Permalink

Hello,

I just used all the default values that the windows.exe had. I even just un-installed, re-booted, and re-installed with same issue - this time being sure I kept all values at default.

Install Location: C:\TeamCity

Components: Build Agent, Core, Windows Service

                    Server, Core, Windows Service

Configuration Directory: C:\Program Files\TeamCity\

TeamCity server port: 80

Build Agent Properties: All default (left env.TEAMCITY_JRE this time)

Star Build Agent Service, Start TeamCity server service

Open TeamCity Web After exit - launches to localhost, and gives the same error....

this is a VMWare using Windows Server 2003, with Windows Server 2003 SP2 installed, as well as .NET Framework 2.0 SP 2, 3.0 SP2 and 3.5 SP1.

It also has McAfee VirusScan Enterprise and McAfee Agent installed, as well as MSXML 6.0 Parser and Adobe Flash Player 10 ActiveX and IE. This is the only things installed on the machine.

EDIT:  I AM USING TeamCity-5.0.1.exe windows installer. I just tried manually installing Java runtime 6.0 as well as appache tomcat 6.0 and set the JRE_HOME environment variable to the JRE path. I'm not sure if I even needed this - it's really not clear I cannot find any step-by-step installation documentation that described what pre-reqs there are and what I need to do for proper setup.. what are these SQL errors about? Do I need to install some kind of SQL Server for TeamCity to run?

Any advice is greatly appreciated!

0
Comment actions Permalink

You've chosen C:\Program Files\TeamCity as TeamCity data directory, but it seems TeamCity itself does not have permissions to write to this directory. If you left installer options as is then TeamCity service is running under the local System account, which may not have permissions to write to Program Files. To fix this, you can open service management console, find there TeamCity server service and change user account under which the service should be run (Properties -> Log On tab).

0
Comment actions Permalink

Pavel,

I did follow those default values.

The local system account definitely should have access to that folder.

However, what I just did was this - set the TeamCity Build Agent Service and TeamCity Web Server services to run under MY local login.

I even went to the data directory and created a new file just to make sure I had rights.

I restarted the services, and browsed back to the web page. Still the same exact error. Any more advice on what this could be? IT seems like there's some kind of SQL Error. Do I need to install some kind of SQL database on the build server? Any pre-requisites you can think of I might need? I did install the java runtim and appache although wasn't sure if I needed that (I also had this issue before/after those installs).

thanks a lot for any guidance.

Drew

0
Comment actions Permalink

Could you please attach the whole teamcity-server.log file?

0
Comment actions Permalink

Please find it attached. Thanks!



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

It seems you have specified " at the end of the TeamCity data path, i.e. you specified C:\Program Files\TeamCity" instead of C:\Program Files\TeamCity

I would recommend to uninstall TeamCity and install it again with correct path.

0
Comment actions Permalink

I see.. so i must have but a quote at the end by accident.. I will reinstall..

Also.. before I do this - what are the pre-reqs for TeamCity. do I need to install java runtime? Appache? or does TeamCity come with pre-reqs out of the box and I can install on an empty server?

thanks!

0
Comment actions Permalink

Pavel,

Actually, I did not do that...

I took screenshots of every single install step the second time, in case I needed to provide them to you or others for help.

Take a look - theres no quotation here at all.. I do not think this is the issue... See attached screenshot..



Attachment(s):
setupPIc.png
0
Comment actions Permalink

Ok, I see. Please remove trailing back slash from the TeamCity data path, this should help. As for pre-requisites, Java & Tomcat are bundled with TeamCity, so you do not need to install them.

0
Comment actions Permalink

Thanks! That Worked! Dont know why though it would cause an issue - the default value had the trailing back slash. But thanks agian!

Drew

0
Comment actions Permalink

My question is some what related. I get this error message after fresh installation of TeamCity 5.x

Error on step: Waiting for a database server...

SQL error when doing: Connecting to HSQLDB
SQL exception: User not found: SA

I am not using any database and took defaults during the installation. What am I doing wrong?
0

Please sign in to leave a comment.