Hi,
I am unable to see disable workdir and internal data directory option in launch agent by connecting it to the controller while launching windows node on jenkins.
I am trying it from 2 days and unable to connect it.
Also, from my windows node I’m getting an error message as similar to the below :
INFO: Terminated
..........hudson.remoting.JarCacheSupport$1 run
WARNING: Failed to resolve a jar 06bcb4519543f5ec83cf9d6da9f6cfbe
java.io.IOException: Failed to write to C:\Users\Administrator\.jenkins\cache\jars\06\BCB4519543F5EC83CF9D6DA9F6CFBE.jar
at hudson.remoting.FileSystemJarCache.retrieve(FileSystemJarCache.java:133)
disable workdir and 2) internal data directory
when I’m choosing the option in launch agent by connecting it to the controller while launching windows node on jenkins.
No, that would be trying to fix the wrong problem. The reason C:\Users\Administrator\.jenkins was picked as a default location for the JAR cache is because the workdir was not enabled. Using a workdir solves these issues by putting everything inside the agent root directory, where your account would presumably already have the right permissions.
Inbound agent launch options are not determined by the controller GUI, because the controller does not launch it. Run java -jar agent.jar to see the list of options, including -workDir.
C:\jenkins\remote-root-dir>java -jar agent.jar -url http://13.232.226.131:8080/ -secret 47fd45b7cea893a34f9ea685fcce63d2c134d3c7629a0d01f77df47ae9db599d -name "Windows_agent" -workDir "C:\jenkins\remote-root-dir"
Feb 29, 2024 4:14:55 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using C:\jenkins\remote-root-dir\remoting as a remoting work directory
Feb 29, 2024 4:14:55 PM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to C:\jenkins\remote-root-dir\remoting
Feb 29, 2024 4:14:55 PM hudson.remoting.Launcher createEngine
INFO: Setting up agent: Windows_agent
Feb 29, 2024 4:14:55 PM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 3206.vb_15dcf73f6a_9
Feb 29, 2024 4:14:55 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using C:\jenkins\remote-root-dir\remoting as a remoting work directory
Feb 29, 2024 4:14:56 PM hudson.remoting.Launcher$CuiListener status
INFO: Locating server among [http://13.232.226.131:8080/]
Feb 29, 2024 4:14:56 PM hudson.remoting.Launcher$CuiListener status
INFO: Could not locate server among [http://13.232.226.131:8080/]; waiting 10 seconds before retry
java.io.IOException: http://13.232.226.131:8080/tcpSlaveAgentListener/ is invalid: 404 Not Found
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:222)
at hudson.remoting.Engine.innerRun(Engine.java:809)
at hudson.remoting.Engine.run(Engine.java:563)