TeamCity sends inadequate responses after Selenium tests

I have a TeamCity 7.0.2 at CentOS 6.2 server without X  Server. I've installed x11-fonts*, xvfb, firefox, xauth, extracted env.  variable DISPLAY=localhost:1, and started xvfb.
After that I could start Selenium tests using maven. Tests are  executed, but there's an issue with TeamCity. Usually TeamCity starts  behaves absolutely inadequate (it confuses images at the page, sends xml  or strange text with ampersands and numbers in responses and is a bit  slower), also tests are executed 4 times slower (1h 15m) at server than  at tester Windows 7-based machine (25m).
It worth to notice that tests launch two Jetty servers for tested  application (one for REST-services application and another for client).  In TeamCity I set JVM command line parameters: -Xms256m -Xmx1224m  -XX:MaxPermSize=320m, and Additional Maven command line parameters ends  with "-DMAVEN_OPTS=-Xmx1024m" (without quotes).
Also both web-services and TeamCity uses the same Oracle server (but different Oracle users).
Finally TeamCity and its build agent is at the same server.
Server has only 4GB of RAM, but during testing there're 400MB of RAM  and 1.2GB of swap. TeamCity and Firefox uses about 65% of CPU during  testing. There's no firefox process after end of testing.
My knowledge about Selenium is weak. I only know that we use 2.20.0 version of selenium-java maven dependency.
Please help me to determine why TeamCity sends wrong responses after  Selenium tests. I've tried to give you all information I have, but feel  free to ask me for more information.

This question is duplicaiton of question at serverfault.com
UPD: Even without selenium tests this issue happens.

2 comments
Comment actions Permalink

Dmitry,

Any tests or other build steps are executed by separate process, and maybe on other conputers. Tests may fail, but they should not affect the web server in such way.
Please check teamcity-servel.log, are any errors or exceptions there?

0
Comment actions Permalink

Michael,

yes, I found there several errors of these two types:
1)

[2012-06-15 14:30:11,652]  ERROR -   jetbrains.buildServer.SERVER - Error java.util.NoSuchElementException while processing request: POST '/teamcity/runtimeError.jsp?buildId=392&counter=12797', from client 100.100.100.100, authenticated as username
java.util.NoSuchElementException
        at jetbrains.buildServer.serverSide.buildLog.FilteredIterator.next(FilteredIterator.java:5)
        at jetbrains.buildServer.serverSide.buildLog.FilteredIterator.next(FilteredIterator.java:6)
        at jetbrains.buildServer.controllers.viewLog.CountingIterator.next(CountingIterator.java:9)
        at jetbrains.buildServer.controllers.viewLog.IncrementalBuildLogController.advanceIteratorUntil(IncrementalBuildLogController.java:2)
        at jetbrains.buildServer.controllers.viewLog.IncrementalBuildLogController.getModelForAll(IncrementalBuildLogController.java:38)
        at jetbrains.buildServer.controllers.viewLog.IncrementalBuildLogController.doHandle(IncrementalBuildLogController.java:13)
        at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.java:74)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.java:307)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at jetbrains.buildServer.web.DisableSessionIdFromUrlFilter.doFilter(DisableSessionIdFromUrlFilter.java:8)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at jetbrains.buildServer.web.DiagnosticFilter.runChainWithModifiedThreadName(DiagnosticFilter.java:9)
        at jetbrains.buildServer.web.DiagnosticFilter.doFilter(DiagnosticFilter.java:64)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)TeamCity server connected to the same database.


2) Sometimes when I did
$ sudo service teamcity restart
I got

[2012-06-15 21:20:38,339]   WARN - ide.db.TeamCityDatabaseManager - TeamCity server that is currently working:
        Starting code = 1696588899
        Starting time = 2012-06-15 21:20:18.0
        IP address = 127.0.0.1
        Application info = Apache Tomcat/7.0.23
[2012-06-15 21:20:38,342]  ERROR -   jetbrains.buildServer.SERVER - Attempt to start more than one TeamCity server connected to the same database.



And yes, selenium tests aren't executed now, but the issue still appears.

0

Please sign in to leave a comment.