3

ive condensed the problem down into 1 image

evidence of whats happening

theres no space in the name, or any typo like that.

weirdly though it does auto complete, like it kind of knows docker-agent-python is there.

what might be causing this?

what other info would be helpful to provide?

ps

im following everything this tutorial does and im around 45 minutes in.

https://www.youtube.com/watch?v=6YZvp2GwT0A

extra evidence to see if that helps

extra evidence

tgmjack
  • 57
  • 7

1 Answers1

2

The "Using Jenkins agents3" documentation illustrates how to create anew node (cloud):

https://www.jenkins.io/doc/book/resources/node/node-2.png

In Dashboard > Manage Jenkins > Nodes, do check you see it listed:

https://www.jenkins.io/doc/book/resources/node/node-3.png

You should now see This node is being launched..
If that’s not the case, you can now press the Relaunch agent button and wait a few seconds. You can now click on the Log button on the left, then you should receive the message:

Agent successfully connected and online on the last log line.

https://www.jenkins.io/doc/book/resources/node/node-4.png

If your Jenkins controller does not start the agent via ssh, please check the port you configured on your agent. Copy it, and then click on the Advanced…​ button. You will then be able to paste the port number into the Port textfield.

So double-check and try to follow that process, and see if the agent would be available then in your Job definition.


Note: the comments from your video suggests an issue with the image used:

I wasn't able to get jenkins to install python so I couldn't finish the last 2 projects

Same issue but it was the agent, docker agent python, it was messed but ima do another.

The tutorial attempts to replace docker-agent-alpine (in which python3 is not known) by docker-agent-python, which you can see here.
It has a CMD ["/bin/sh"]: as explained in "Dockerfile CMD instruction will exit the container just after running it", try and run it to check its log and see if it is because of that CMD it exits immediately.

For example, jenkins/jnlp-agent-python uses an ENTRYPOINT ["/usr/local/bin/jenkins-agent"] which seems promising.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250