TC not starting when going from java8 to 11

Answered

Hi, I found this https://teamcity-support.jetbrains.com/hc/en-us/community/posts/4408917952402 but it did not solve my issue. 

I have tried all I can think of, setting JAVA_HOME, TEAMCITY_JRE, removing the TeamCity\jre directory, replacing the content in TeamCity\jre that was java8 with the java11 content. etc etc. I see that the JAVA runtime is started when I restart teamcityserver (I have stopped all agents to avoid to much going on at once). Problem is that the "OpenJDK Platform Binary" (which I see is run from the path I set in environment variables, Home and tc_jre go to the same path) is running at 90% of cpu, and just stays there. Not able to get the Temcity-gui up and running; "talking too long to respond". The teamcity-server is running on a Windows Server 2012 R2. Out of ideas now, do you have any input please? FYI; I have read https://www.jetbrains.com/help/teamcity/how-to.html 

0
5 comments

Working now; I had downloaded zip file from here: http://jdk.java.net/java-se-ri/11
It obviously is missing some files, because I found another zip file here: https://docs.microsoft.com/en-us/java/openjdk/download and this one contains 4 more files. I pasted the content over to the TeamCity\jre folder and restarted the TC-server. 

GUI is now loaded, but started out superslow as there are two java-processes that are being started together with teamcity. One is running on 70-90% of cpu capacity, the other between 2% and 10%. It took about 30 minutes before this cooled off. I then copied the same files over to all agents in their jre-folders, and now all seems to be fine (~10 minutes after service start)

Would be great if you could link to some appropriate sources for java, and not just write "Please update to version 11". I have spent hours making this work.

0

Hi Gard,

 

there are multiple releases of the JRE by many different vendors and we haven't been able to verify all of them, so while most should work fine as long as they keep the spec in line, we cannot guarantee they'll all work. We currently ship amazon's corretto so if you are having issues with the JVM you might want to check that one. This said, the process is very straight forward for a working installation. It only needs to replace the jre folder if needed (stop the server before, restart it afterwards), or to install the new Java 11 and set the appropriate parameters. 

 

This said, modifying the JVM should not lead to big changes in performance normally, so what you are observing is probably due to a side issue. We would recommend checking under administration - Diagnostics the graphs for memory/cpu usage and see if there is anything there. You can also check the logs folder if a folder for thread dumps on the date has been created, which is set up automatically when teamcity detects that certain actions take longer than expected or other performance issues happen.

 

A rather common cause for this issue is that you might have replaced an older 32 bit jvm with the 64 bit one. Since the architecture uses roughly double the amount of memory, and java processes require setting the memory allocation at start explicitly through the -Xmx parameter, it's likely you were already above 50% usage on the process before and the change has pushed it to the limit. This can be observed in the diagnostics elements I mentioned above and can be adjusted if necessary following this steps: https://www.jetbrains.com/help/teamcity/configure-server-installation.html#Configure+Memory+Settings+for+TeamCity+Server

0

Thanks, I appreciate your thorough answer. That said, I didn't find the process very straight forward at all. I almost never touch the teamCity installation, I have no knowledge of Java and it's quirks. I find it rather odd that I should have to worry about what version of Java you are dependent on at all. In my mind; when I install an upgrade, it should just install whatever it needs. I am not very interested in if you use version x or y of any lib or fw or platform. And that I have to spend time on figuring out what to install and where to put it, and also repeat the process for each agent is beyond me. 

Br
-Gard Ellefsen

0

I also ran into this issue and agree with Gard's assessment. 

Simple answer, install a JRE (Amazon's in my case) and copy the contents into the TeamCity JRE folder (e.g. C:\TeamCity\jre) after backing it up.  I installed it according to the Amazon instructions and it set the JAVA_HOME, but while TeamCity started the web interface did not. 

As a non-Java developer, I'm sure this could be debugged and resolved, but I use TeamCity because it just works.

 

1

Thanks for your feedback, it is appreciated. I've passed it to development and we are considering possible approaches for more automated approaches to upgrading java, similar to our own auto upgrade, but it is not a trivial task, particularly given the wide array of platforms it can be installed in. In the meantime we are modifying the message to link to our documentation so that it's easier to access, and we'll review the upgrade article to see if it can be improved as well.

 

As a general rule, while the issues are java-specific, they are located in log files that should be reasonably easy to read, and we usually have good articles in our documentation related to those error messages. Other than that, we can only suggest writing us and we'll try to get you back up and running.

0

Please sign in to leave a comment.