I’m setting up a docker compose file which starts jenkins, then an agent. I had many errors in my config, so I got a lot of errors when the agent started. Now I fixed them, and I only get this output on my console:
jenkins-node-1 exited with code 0
When running agent.jar on my local machine, the call is blocking and appears in jenkins. But here it just shuts down. That’s my node service so far:
node-1:
image: jenkins/agent
depends_on:
jenkins:
condition: service_healthy
privileged: true
container_name: jenkins-node-1
environment:
- JENKINS_URL=http://jenkins:8080
- JENKINS_AGENT_NAME=node-1
networks:
- jenkins-net
What am I doing wrong here?
2
Answers
I had to add the command to the docker-compose file to actually call the agent:
go to Jenkins -> Manage Jenkins -> Manage Nodes
examine the node that is running everything
Check in it’s configuration to ensure the total # of executors is greater than 0 and that it is online.
Then try redownloading the agent.jar file.
More info on that here:
https://www.edureka.co/community/69051/how-to-increase-no-of-executors-in-jenkins