Installing gradle 4.8.1 have broken TeamCity 9 installation


(Govan Marounsi) #1

For few days ago I installed gradle on our buildserver which our TeamCity server is running on too.
Today I noticed that TeamCity is not working anymore and I am getting this error on connection page:

This site can’t be reached
temamcity-server refused to connect.
ERR_CONNECTION_REFUSED

After digging into logs I found just one warningabout connection inside teamcity-agent.logs and nothing inside teamcity-server.logs. The log messag is this:

[2018-06-21 20:27:51,440]   WARN - buildServer.AGENT.registration - Failed to resolve server communication protocol. Will try all protocols: java.net.ConnectException: Connection refused (Connection refused) (enable debug to see stacktrace) 

The warning is repeating several times but the first time it appears in the log is exactly after installation of Gradle.
I restarted TeamCity server but nothing has changed. I checked ports but I couldn’t find any conflict.
The system is linux and for installing gralde I just download the zip file and unziped it in /opt/gradle’ and then I added a symlink in /usr/bin. Gradle is working without problem. Somebody knows that how can Gradle installation create problem for Teamcity ?


(René Groeschke) #2

I’m not aware of how a installation of gradle can cause these teamcity issues. Did you change any path or any other environment variables as part of the installation? Just to be on the very safe page, can you verify you don’t have any gradle processes (daemons) running to see if that makes a difference (it shouldn’t though)


(Govan Marounsi) #3

Tahnks for answer. The only thing I did was to add these liens to my users .bashrc
GRADLE_HOME=/opt/gradle-4.8.1
export PATH=$PATH:$GRADLE_HOME/bin
GRADLE_HOME=/opt/gradle-4.8.1

Then gradle worked for my user but not for others so I added a symlink to gradle path and put it under /usr/bin
No daemon is running.
No Gradle daemons are running.

Only Daemons for the current Gradle version are displayed. See https://docs.gradle.org/4.8.1/userguide/gradle_daemon.html#sec:status

But I am sure that teamcity is down after installing gradle. One line before the warning line is information about teamcity agent. I noticed that gradlerunner is one of available runners.
AvailableRunners=[Ant, Duplicator, gradle-runner, Inspection, Ipr, JPS, Maven2, rake-runner, SBT, simpleRunner]
I wonder if Gradle 4.8.1 is working with team city 9