Hi all,
I have some troubles to make the agent run. I’m running the agent on Windows. The agent configuration is the following:
Name: agent1
Number of executors: 1
Remote root directory: C:\Users\user\jenkins-agent
Labels: pythonCookies (same name as the task)
Usage: Only build jobs with labels expressions matching this node
Launch method: Launch agent by connecting it to the controller
Enable Disable WorkDir
Internal data directory: remoting
Enable Use WebSocket
Availability: Keep this agent online as much as possible
Inside C:\Users\user\jenkins-agent I do have the following files (after executing jenkins-agent.exe in cmd administrator):
The configuration of the jenkins-agent.xml file is:
<service>
<id>jenkins8080agent</id>
<name>Jenkins Agent for jenkins:8080</name>
<description>This service is a service created from a minimal configuration</description>
<executable>C:\Program Files\Java\jdk-17\bin\java.exe</executable>
<argument>-jar C:\Users\user\jenkins-agent\agent.jar -jnlpUrl http://localhost:8080/rparada/manage/computer/agent1/jenkins-agent.jnlp -secret 634e49160f5806a9f17fcb0dc97c98d78b8bcecb3cdf3e518cfed4c5398d5d3</argument>
<log mode="roll" />
<onfailure action="restart" />
</service>
However, I get this error:
Unrecognized option: -jar C:\Users\user\jenkins-agent\agent.jar -jnlpUrl http://localhost:8080/rparada/manage/computer/agent1/jenkins-agent.jnlp -secret 634e49160f5806a9f17fcb0dc97c98d78b8bcecb3cdf3e518cfed4c5398d5d3
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
If I try to access through the following link:
http://localhost:8080/rparada/manage/computer/agent1/jenkins-agent.jnlp?encrypt=true
I get this error:
I’ve been following this video How to Install Jenkins Agent on Windows - YouTube
Unfortunately, I cannot make it work.
Please, I would like some guidance.
Thanks