Showing posts with label jenkins. Show all posts
Showing posts with label jenkins. Show all posts

Monday, 13 June 2016

Slave no longer connects to your Jenkins master - slave-agent.jnlp: 403 Forbidden

Recently I messed up with Jenkins security configuration causing my slave machines to 
no longer connect to the master with the following exception logged:
Failing to obtain http://MY_JENKINS/computer/MY_SLAVE_NAME/slave-agent.jnlp
java.io.IOException: Failed to load http://MY_JENKINS/computer/MY_SLAVE_NAME/
slave-agent.jnlp: 403 Forbidden
 at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:275)
 at hudson.remoting.Launcher.run(Launcher.java:219)
 at hudson.remoting.Launcher.main(Launcher.java:192)
Waiting 10 seconds before retry
 
Check your security configuration settings in Manage Jenkins->Configure global 
security and verify that for Anonymous user you have allowed to connect to slave.
 
 
 

Thursday, 5 February 2015

Jenkins slave's configuration is not recognized? Try restarting the slave.

I had to reconfigure a Jenkins slave, just a change of the Java version. This caused Jenkins master to not recognize the changed Java on the remote end (the slave) and my build had failures thinking that the Java was still the old version.
This you can see in the node's System information link when you click on the node, this is what currently Jenkins thinks is on the remote end, and this may be wrong.

Solution was to simply restart the slave so that Jenkins can pick up the changes in the environment

Wednesday, 6 November 2013

ERROR 267 (0x0000010B) Scanning Source Directory DIRNAME The directory name is invalid. Jenkins

A job that I run on my Jenkins CI suddenly started having this error:

ERROR 267 (0x0000010B) Scanning Source Directory DIRECTORY-PATH The directory name is invalid.


The job was using a robocopy command to find and copy all config.xml files from the JENKINS_HOME/jobs and commit them to the SVN repository for backup.
This job which was causing the issue was a matrix type of job, that was previously running on multiple slave nodes and later was changed to run to a different node, so there were left old folders in the directory:

JENKINS_HOME\jobs\JOBNAME\configurations\axis-label\NODENAME\...

So now I had these folders in that location:
\Old_NODENAME
\Current_NODENAME


What I did was to delete the \Old_NODENAME, as it obviously was not done automatically by Jenkins once I had changed the matrix configuration (the nodes I want the job to run simultaneously)

Then I run the job again, to just make sure it was passing successfully.

I also manually deleted the info about the Old_NODENAME which was stored at the SVN.
After performing these two steps, I run the failing job again, and the error 267 was fixed.

Old and irrelevant content in the job's workspace on JENKINS_HOME/jobs and on the SVN where the job commits, were causing ERROR 267 (0x0000010B) Scanning Source Directory DIRECTORY-PATH The directory name is invalid.

OR

Another reason this error to happen was that the invalid name contained "lastSuccessful". That particular job did not have a link "Last successful artifacts" which usually is present on all jobs and is a link to the last successful build artifacts of that job. In one case such a link was missing for whatever reason, and I had to recreate the job and run it in order to make this link appear in the UI of the job in Jenkins.