0

I have a jenkins instance installed on a oracle linux box, and I have attached a windows node to that using the method "Launch agent by connecting to the controller" This windows is also a remote server which I access from Remote Desktop Connection Manager(RDC). The issue is to connect the node to jenkins, every time I need to login to the windows server from RDC and execute the agent.jar file with a following like command

java -jar agent.jar -jnlpUrl http://serverIP:8000/jenkins/manage/computer/my-project/jenkins-agent.jnlp -secret @secret-file -workDir "H:\Jenkins_slave" 

if I close the cmd window or close the RDC session, this node get disconnected from jenkins. How I can keep this node always connected even if my session on RDC expires/close the cmd window ??

  • [Install the agent as a service](https://stackoverflow.com/a/60399024/7571258) (using the jenkins service wrapper). If this doesn't work, you could try to run it via scheduled task. – zett42 Mar 28 '23 at 16:53
  • If you're on windows you could download the jnlp file on to your server and run it as you would run an ordinary exe. This should configure everything for you automatically. – M B Mar 29 '23 at 04:25

0 Answers0