No idle compatible agents which can run this build
Answered
Hey, I have been following the next tutorial for making an EchoRunner plugin for TeamCity.
https://www.youtube.com/watch?v=M_ip2u-o9zY&ab_channel=JetBrainsTV
and I do like what the video says, but when I am trying to run a build with the EchoRunner plugin, I get this message:
"Unknown, there are no idle compatible agents which can run this build"
and then when I am searching for the reason for that, under agents:
what could be the problem?
Please sign in to leave a comment.
Here are the related docs:
https://plugins.jetbrains.com/docs/teamcity/build-runner-plugin.html#Agent-side+part+of+the+runner
https://javadoc.jetbrains.net/teamcity/openapi/current/jetbrains/buildServer/agent/runner/CommandLineBuildServiceFactory.html
Also, feel free to share your plugin code.
Hey!
Thank you for the response!
I did exactly as in the tutorial
agent-side factory - EchoFactory:
EchoService:
Thank you for the help :).
The code looks fine. After a new plugin is installed on the server, the agent needs to upgrade to install the agent side of the plugin. Perhaps the agent did not have time to upgrade when you took the screenshot. You can verify if the plugin was delivered to the agent by checking the
<agent_home_dir>/plugins
directory. If the agent side of the plugin is still not on the agent, you can try to manually restart the agent. If that doesn't help either, try coping the agent side of the plugin from your plugin package (something along the lines of<your-plugin>.zip/agent/<your-plugin>-agent.zip
) to the<agent_home_dir>/plugins
directory and restart the agent again.Normally, you shouldn't need to do that, however. The server should tell the connected agents to upgrade when there are new plugins that should be distributed to the agents.
Do I need to install the agent? or its suppose to work with the default agent?
It suppose to be at the /TeamCity_plugin/_plugin2/servers/2022.10/buildAgent/plugins/_plugin2-agent
because it looks like everything is there
And when I will succeed to make this plugin work... I need to have the option to let the user add a file to this upload? Do you know if there is a way it do it? Because I saw that the map with all the parameters are <string, string >
Thank you!
Hi! When you package your plugin with maven, it should create a file named
<your-plugin>.zip
. Look inside that file, and find the<your-plugin>-agent.zip
under theagent
folder. What is the content of the<your-plugin>-agent.zip
archive? The<agent_home_dir>/plugins/<your-plugin>-agent
folder should have the same content.Regarding the question, "I need to have the option to let the user add a file to this upload?", I am not sure I understand it. Could you rephrase it?
Hi Anatoly,
Yes everything looks fine.
when i deleted from my editEchoParameters.jsp the line:
suddenly I succeed to run this Build with the Echo runner, but i get an error(log is added)
here is the repository in git...
https://github.com/idanhauser/teamcity-echo
Thank you so much!
log of the failed run
Build 'MyProject / Build' #3
Triggered 2023-01-08 09:05:23 by 'admin'
Started 2023-01-08 09:05:23 on agent 'Default Agent'
Finished 2023-01-08 09:05:23 with status FAILURE 'Cannot start build runner'
TeamCity URL http://localhost/viewLog.html?buildId=3&buildTypeId=MyProject_Build
TeamCity server version is 2022.10 (build 116751), server timezone: IST (UTC+02:00)
[09:05:23]E: bt2
[09:05:23]i: TeamCity server version is 2022.10 (build 116751)
[09:05:23] : The build is removed from the queue to be prepared for the start
[09:05:23] : Starting the build on the agent "Default Agent"
[09:05:23]i: Agent time zone: Asia/Jerusalem
[09:05:23]i: Agent is running under JRE: 11.0.17+8
[09:05:23] : Updating tools for build
[09:05:23] : [Updating tools for build] Tools are not required for the build
[09:05:23] : Clearing temporary directory: /Users/idanhauser/Servers/TeamCity/buildAgent/temp/buildTmp
[09:05:23] : Publishing internal artifacts
[09:05:23] : [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[09:05:23] : [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisherImpl]
[09:05:23]i: [Publishing internal artifacts] Will publish 1 artifact(s) to TeamCity node with id MAIN_SERVER
[09:05:23] : Full checkout enforced. Reason: [Checkout directory is empty or doesn't exist]
[09:05:23] : Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist
[09:05:23] : Checkout directory: /Users/idanhauser/Servers/TeamCity/buildAgent/work/d1df6864f98d2599
[09:05:23] : Build preparation done
[09:05:23]E: Step 1/1: echo (Echo Runner)
[09:05:23]W: [Step 1/1] java.lang.IllegalArgumentException: Argument for @NotNull parameter 'parameter' of com/intellij/execution/configurations/GeneralCommandLine.addParameter must not be null
at com.intellij.execution.configurations.GeneralCommandLine.$$$reportNull$$$0(GeneralCommandLine.java)
at com.intellij.execution.configurations.GeneralCommandLine.addParameter(GeneralCommandLine.java)
at com.intellij.execution.configurations.GeneralCommandLine.addParameters(GeneralCommandLine.java:82)
at jetbrains.buildServer.agent.runner2.GeneralCommandLineFactory.intializeCommandline(GeneralCommandLineFactory.java:81)
at jetbrains.buildServer.agent.runner2.GeneralCommandLineFactory.<init>(GeneralCommandLineFactory.java:38)
at jetbrains.buildServer.agent.runner2.GenericCommandLineBuildProcess.executeProcess(GenericCommandLineBuildProcess.java:82)
at jetbrains.buildServer.agent.runner2.GenericCommandLineBuildProcess.waitFor(GenericCommandLineBuildProcess.java:289)
at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(CallRunnerStage.java:61)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:27)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:76)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:35)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:43)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:25)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeRunnerStep(ForEachBuildRunnerStage.java:158)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.runStep(ForEachBuildRunnerStage.java:143)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeBuildRunners(ForEachBuildRunnerStage.java:93)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:47)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:33)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:76)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:35)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:88)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:59)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:340)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:62)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:289)
at java.base/java.lang.Thread.run(Thread.java:829)
[09:05:23]E: [Step 1/1] Failed to start build runner 'echoRunnerType'
[09:05:23]E: [Step 1/1] Step echo (Echo Runner) failed with unexpected error
[09:05:23] : Publishing internal artifacts
[09:05:23] : [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[09:05:23] : [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisherImpl]
[09:05:23]i: [Publishing internal artifacts] Will publish 1 artifact(s) to TeamCity node with id MAIN_SERVER
[09:05:23] : Build finished
hey!
Thank you @Anatoly, it works now.
I would like to add an option to add a file to the plugin. Can you tell me how to do this in JSP and how to retrieve it in Java?
something like that:
Also, I am trying to make a string label a password but when I use
instead of
I am unable to receive the data in Java. how do i do it?
Thank you for your help.
Idan