-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Get Jenkins CLI" failes with a 503 from localhost #15
Comments
I think Jenkins just wasn't online yet. A second call to provision works. Doesn't look like anisble's get_url has a retry/timeout option either. |
@sumdog see line 18 in my PR: |
I tried the @danvaida pull request references above, but even if I set the timeout to 50000, I still get the 503; service unavailable. A second provision works fine. I have a feeling ansible needs a retry option for the get_url for this to work sanely. Either that or we need to consider shelling out to wget. |
@sumdog What version of Ansible are you using? Have you experienced any network quirks with the target box? Works totally fine for me. Shelling it out is not so "ansiblish" :) |
added timeout to get_url. Req. Ansible 1.8+. Solves issue ICTO#15
@danvaida I got the 503 consistently on both my work machine (i7, 16GB ram, SSD) and my home laptop (i5, 8GB ram). I my case the timeout=xx that didn't fix the issue either. I think timeout would work if it were simply waiting, but I'm actually getting a 503 returned. I have a feeling it's simply Jenkins not coming up fast enough in my VM. A second request always works. In the following commit I have an ugly hack that works: I'm not going to issue a pull request because it is pretty ugly. I'll leave this comment here through in case anyone else is interested. This might not be fixable unless a feature request is put in to Ansible to add a retry to get_url that can also deal with retrying on 5xx responses. |
@sumdog Not necessarily :)
There. That should fix this corner case. LE: see respective lines in my commit: danvaida@dbbb8db |
So I'm using this plugin via Vagrant (created an ansible/roles directory; my .yml that includes the ansible-jenkins role is in ansible. Vagrant file is in .)
I see the following:
Seems to be failing here where you get the CLI jar file from the running Jenkins instance:
Not sure if something is different with the new Jenkins version... leaving work right now but I'll try to figure this out when I get home and get up a patch.
The text was updated successfully, but these errors were encountered: