I'm able to download from my jenkins controller the different jar names through the /jnlpJars/<name>.jar endpoint
Is there any difference between agent.jar remoting.jar and slave.jar?
Related
I have Jenkins slaves connected with master and after some intervals my Jenkins slave is going to offline and whenever its going to offline I am manually running the Jnlp command(Run from slave command line:
java -jar slave.jar -jnlpUrl http://abc.ap.com:8080/computer/Wkaakkaak/slave-agent.jnlp -secret af95sdsda051229eb57b1d51202e5cf986a1cbcfbb2e0a5130d915ba037297a0 ) in slave machine to connect with master but every time I can't login to slave and run the command.Is there any way to run my Jenkins slave automatically.I have configured slave and the Launch method is launch slave agents via java web start.Don't know how to resolve the issue.Could any one please help me out on this? My Jenkins version is 1.585.
I installed Ansible plugin in Jenkins and I configured.
I created ansible.cfg, hosts and the playbook files.
I pushed those files with directory in Bitbucket.
The issue is when I start a build in Jenkins it says "skipping: no hosts matched" or I have already tested the directory manually and it works.
This is jenkins configuration:
This the error message:
When i execute the ansible-playbook command directly from the folder in Desktop it works.
This is when i executed the command in the jenkins directory
I think you need to provide a credentials owner. When you run it manually you are identified (with an attached ssh key) but Jenkins needs some permissions.
I have a maven built jar file which could be run as a server. I want to use jenkins-pipeline to deploy this jar file onto my windows 2016 server. I started with a freestyle jenkins job, with "Execute Windows batch" configuration:
set BUILD_ID=DontKillMe
start java -jar MyServer.jar
The java process successfully spawned on my windows 2016 server.
When I turned to use jenkins pipeline script with same batch commands, it's not as expected -- the process which should contain java -jar MyServer.jar was never spawned.
The pipeline script I wrote is:
bat '''
set BUILD_ID=DontKillMe
start java -jar MyServer.jar
'''
The reason I want to have jar starts running in another process is that it could release current jenkins build to following steps.
Could anyone please help with a solution? As long as I can spawn up the java process from batch command in jenkins pipeline (better with no parent process), I would be really grateful.
Ok, seems like jenkins is trying to abandon old jenkins users like me, here's the solution provided by jenkins pipeline:
withEnv(['JENKINS_NODE_COOKIE=DontKillMe']) {
bat "start java -jar MyServer.jar"
}
I shutdown jenkins for some purpose. Wonted to launch the jenkins from previous workspace. is there a way to restore the same old jobs?
I am starting jenkins like
java -jar jenkins.war --httpPort=8083 &
But is there a way to provide workspace from commandline?
Workspace is a specific term related to jobs in Jenkins. I think you are looking for JENKINS_HOME. Set the environment variable to the path to the directory that has all your jenkins config and jobs before you start Jenkins.
Yesterday, my jenkins master (v 1.646, linux debian Jessie 8.3) was working and several slaves was connecting on it via the jnlp command:
java -jar slave.jar -jnlpUrl http://myhost:8080/computer/bob-pc.local/slave-agent.jnlp
Now I guess something changed (war update ? plugin update ? security option changed ?) because now my slaves cant connect anymore since the jnlp command is now :
java -jar slave.jar -jnlpUrl http://myhost:8080/computer/bob-pc.local/slave-agent.jnlp -secret rt435te435a208c7201d99f7b1e5dd9c044da86d12efd8527
The -secret ... part of the command is new and I cant figure out which change added this option.
How to allow slaves to connect to jenkins master without "-secret" jnlp option ?
This credential behavior is controlled by Matrix Authorization Strategy Plugin, this plugin is shipped with jenkins by default.
If you are the jenkins administrator, you can turn this off by following these steps:
Manage Jenkins -->Configure Global Security-->Access Control-->Authorization
Either in Matrix-based security or Project-based Matrix Authorization Strategy, make sure you you have checked the Connect options of Slave for Anonymous role.