Closed lawrencegs closed 8 years ago
Should work now.
TASK [Stouts.jenkins : Wait untils Jenkins web API is available] ***************
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (12 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (11 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (10 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (9 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (8 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (7 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (6 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (5 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (4 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (3 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (2 retries left).
FAILED - RETRYING: TASK: Stouts.jenkins : Wait untils Jenkins web API is available (1 retries left).
fatal: [jobs]: FAILED! => {"attempts": 12, "changed": false, "cmd": "curl --head --silent http://localhost:8080//cli/", "delta": "0:00:00.017769", "end": "2017-01-08 21:31:01.081315", "failed": true, "rc": 0, "start": "2017-01-08 21:31:01.063546", "stderr": "", "stdout": "HTTP/1.1 403 Forbidden\r\nDate"}
This appears to still be broken. When using the v3.4.4
build installed from GitHub, or when using the v3.4.2
version installed from Galaxy, the script keeps failing to talk to the restarted server, because the server returns a 403
error. This is because the curl statement isn't using credentials, so it won't get in.
The server is online and can be accessed from the Web UI, but you need to provide the creds first:
Does the role need to disable auth to run correctly?
@twistedpair That should work thanks to the jenkins.install.runSetupWizard=false
java argument: https://github.com/Stouts/Stouts.jenkins/blob/3.4.4/defaults/main.yml#L65
Maybe you are overriding the jenkins_java_args
variable?
@mickaeltr, you're right, I was. However, that's because I was trying to remove the following line from /etc/default/jenkins
, since it caused classpath exceptions that prevented starting Jenkins.
JENKINS_ARGS="$JENKINS_ARGS --preferredClassLoader=java.net.URLClassLoader"
I'll do some line replace kungfu to get all of these working.
Jan 08, 2017 8:48:12 PM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file /tmp/winstone/jenkins.war
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at Main._main(Main.java:264)
at Main.main(Main.java:112)
Caused by: java.lang.IllegalArgumentException: Unrecognized option: --preferredClassLoader=java.net.URLClassLoader
at winstone.cmdline.CmdLineParser.parse(CmdLineParser.java:53)
at winstone.Launcher.getArgsFromCommandLine(Launcher.java:359)
at winstone.Launcher.main(Launcher.java:332)
... 6 more
I'm not running any other Java processes on this node, but perhaps other people would need that line? Removing it should fix things for anyone else impacted with this exception.
@lauflabs I don't have this in JENKINS_ARGS (see https://github.com/Stouts/Stouts.jenkins/blob/3.4.4/templates/jenkins.j2#L72 ). Maybe you should do a clean install using Stouts.jenkins 3.4.4
I run this on ubuntu 15.04
ansible-playbook -i localhost -c local jenkins.yml
Here is the jenkins.yml playbook
And the result is: