TeamCity on Windows Server 2008 R2 with SQLServer 2008 404 error

Hello,

I was using TeamCity with the integrated database for testing, and now I´m trying to setup TC to use SQL Server 2008. I know it´s not oficcially supported, but since 2008 is fully compatible with 2005 databases, I think the problem is not with the DB.

I have followed the steps described in the online documentation, but i always get a "HTTP Status 404 - The requested resource () is not available.".

Browsing thru the community forums, I´ve tried everything ppl sugested:

- ntlmauth.dll in the bin folder.
- bin folder in the PATH variable.
- login in database.properties in the DOMAIN\\USER format
- login in database.properties in the USER format

But so far, no good. I´m not trying to migrate anything, it´s a clean install. In the log file I get this error:

[2009-09-03 23:39:16,993]   INFO -   jetbrains.buildServer.SERVER - Starting TeamCity server
[2009-09-03 23:39:22,386]   INFO - dServer.serverSide.ServerPaths - TeamCity data path was read from teamcity.data.path
[2009-09-03 23:39:22,387]   INFO - dServer.serverSide.ServerPaths - TeamCity data directory:W:/TeamCityData
[2009-09-03 23:39:22,904]   INFO - erver.serverSide.impl.DBFacade - Connection pool configured (net.sourceforge.jtds.jdbc.Driver, maximum number of connections: 50)
[2009-09-03 23:39:22,905]   INFO - erver.serverSide.impl.DBFacade - Connection pool URL: jdbc:jtds:sqlserver://EVA:1433/TeamCity
[2009-09-03 23:39:23,366]  ERROR -   jetbrains.buildServer.SERVER - Failed to initialize TeamCity server, due to error (enable debug to see the whole stacktrace):
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user 'EVA\TeamCity'.)
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actionManager' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Cannot resolve reference to bean 'buildServer' while setting bean property 'server'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'buildServer' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Cannot resolve reference to bean 'dbFacade' while setting bean property 'db'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbFacade' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [jetbrains.buildServer.serverSide.impl.DBFacade]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user 'EVA\TeamCity'.)
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dbSettings' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serverPaths' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dbSettings' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serverPaths' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean


Anyone got any tips for me? From the log file, the problem seems to be related to user authentication, but I can connect to the database using the 'TeamCity' user without problems.

Thanks

6 comments
Comment actions Permalink

Hi!

Maybe you could try to connect to your SQL Server 2008 database using SQL Server authentication instead of Windows'one.
It worked fine for me.

Regards,

Olivier.

0
Comment actions Permalink

Thanks Olivier, with SQL Server authentication it worked just fine.

We decided to not bother any longer with this issue, since it's working, but any advice on how to get TC working with SQLServer 2008 and windows authentication would be greatly welcome, since all of our policies are Windows based.


But thanks for the tip!

0
Comment actions Permalink

You're welcome!

I've seen that Pavel has updated a corresponding issue in the tracker:
http://www.jetbrains.net/tracker/issue/TW-6482

Olivier.

0
Comment actions Permalink

Yes, seems that Windows/SQL Server 08 will be officially supported in the next version.

I´ve seen your post about x64 issues, and I’m running on a 64 system too, so did you had any troubles setting up mail notifications? I’m struggling here with TC trying to get it to work with Gmail SMTP server. I’ve booted up a virtual machine with an x86 Windows 2008 and mail worked just fine.

0
Comment actions Permalink

Hi!

No I did not have any troubles with mail notifications.
Do the test send worked for you? What error did you get?

Regards,

Olivier.

0
Comment actions Permalink

No, the test did not work for me, and I´ve tried what Alexey Gopachenko suggested in this post, but was unable to send mail from other java applications as well.

This is the error I get:

Connection failed!

javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;  nested exception is: java.io.IOException: Couldn't connect using “javax.net.ssl.SSLSocketFactory" socket factory to host, port: smtp.gmail.com, 465; Exception: java.lang.reflect.InvocationTargetException


My first guess was the firewall. Disabled the firewall and the error was still there. Then I thought that maybe TC was unable to find any Java required lib or something, since this is a clean machine (clean Windows install + TC), so I proceeded to install the latest Java available. No good, still same error. Configuration, internet, SMTP server (Gmail), everything is ok, but the problem persists.

Best Regards,

Hermano Cabral

0

Please sign in to leave a comment.