java.lang.ClassNotFoundException: TeamcityTaskListener$TeamCityOutputListener
Hello,
I'm using TC 2018.1 and from time to time (quite often recently) out of nowhere some agents cannot start a build and I got:
[11:10:11][Step 2/4] java.lang.ClassNotFoundException: TeamcityTaskListener$TeamCityOutputListener
[11:10:11][Step 2/4]
[11:10:11][Step 2/4] Process exited with code 1
[11:10:11][Step 2/4] Gradle failure report
[11:10:11][Gradle failure report] FAILURE: Build failed with an exception.
[11:10:11][Gradle failure report]
[11:10:11][Gradle failure report] * Where:
[11:10:11][Gradle failure report] Initialization script '/apps/tcity/agent/plugins/gradle-runner/scripts/init.gradle' line: 232
[11:10:11][Gradle failure report]
[11:10:11][Gradle failure report] * What went wrong:
[11:10:11][Gradle failure report] Failed to notify task execution listener.
[11:10:11][Gradle failure report] > TeamcityTaskListener$TeamCityOutputListener
[11:10:11][Gradle failure report]
[11:10:11][Gradle failure report] * Try:
[11:10:11][Gradle failure report] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[11:10:11][Gradle failure report]
[11:10:11][Gradle failure report] * Get more help at https://help.gradle.org
[11:10:11][Gradle failure report]
[11:10:11][Gradle failure report] BUILD FAILED in 6s
[11:10:11][Step 2/4] Process exited with code 1
All builds become red and you know that's not so great. Literally there is no info on the internet about this error. After some time agents are back to normal and TC is green until this happens again.
From time to time gradle cache folder is deleted but I don't think it's connected to this error but I mention this just in case.
Does anyone know what could be wrong?
I'm using gradle 4.10.3
Thanks for any help
Please sign in to leave a comment.
Hi, and sorry for the delay. Adding --stacktrace or --debug would be quite helpful in understanding what exactly is going on.
Beyond that, I'd recommend following this steps: https://www.jetbrains.com/help/teamcity/common-problems.html#CommonProblems-BuildworkslocallybutfailsormisbehavesinTeamCity, including reporting it to our tracker if this replicates consistently.
I have also been unable to find any trace of this issue before, so until we get some more detailed data (debug logs, etc) it's going to be quite hard to figure out what is going on.
In the meantime, I'd recommend upgrading to newer releases, where a number of fixes have been introduced.