Comments (9)
this is normal, if catch such exception, the while will be dead loop. you should clean the build from queue.
from api4jenkins.
Hi @joelee2012 the jenkins instance is used by more than 200 person, and I'm not the owner/admin of the jenkins.
There isn't a way to ignore the zombie jobs when I'm trying to get my build instance?
Thanks you
from api4jenkins.
can you verify if the fix works ? cause i don't have env to verify
from api4jenkins.
@lucatamtam are you able to verify ? i can't reproduce the issue
from api4jenkins.
hi @joelee2012 yes the fix is working thanks you
from api4jenkins.
I get the same error sometimes and other times it doesn't error but it takes 3-4 minutes to get the response. When I test my Jenkins with manual api calls it works absolutely fine. Also, interestingly I have 3 different Jenkinses and only have problems with one (all are identical in terms of config)
from api4jenkins.
@JakubBiel you can enable debug log to check what happened during error/long time response.
from api4jenkins.
build = item.get_build()
DEBUG:api4jenkins.requester:GET: https://'url'/queue/item/528362/api/json with parameters: {'headers': {'Jenkins-Crumb': 'crumb'},
'params': {'depth': 0}}
DEBUG:urllib3.connectionpool:https://'url':443 "GET /queue/item/528362/api/json?depth=0 HTTP/1.1" 200 628
DEBUG:api4jenkins.requester:Response: <Response [200]>
DEBUG:api4jenkins.requester:GET: https://'url'/queue/item/528362/api/json with parameters: {'headers': {'Jenkins-Crumb': 'crumb'},
'params': {'depth': 0, 'tree': '_class'}}
DEBUG:urllib3.connectionpool:https://'url':443 "GET /queue/item/528362/api/json?depth=0&tree=_class HTTP/1.1" 200 63
DEBUG:api4jenkins.requester:Response: <Response [200]>
DEBUG:api4jenkins.requester:GET: https://'url'/computer/api/json with parameters: {'headers': {'Jenkins-Crumb': 'crumb'},
'params': {'depth': 2,
'tree': 'computer[executors[currentExecutable[url]],oneOffExecutors[currentExecutable[url]]]'}}
DEBUG:urllib3.connectionpool:https://'url':443 "GET /computer/api/json?depth=2&tree=computer%5Bexecutors%5BcurrentExecutable%5Burl%5D%5D%2ConeOffExecutors%5BcurrentExecutable%5Burl%5D%5D%5D HTTP/1.1" 200 327
DEBUG:api4jenkins.requester:Response: <Response [200]>
DEBUG:api4jenkins.requester:GET: https://'url'/job/'project'/job/main/23/api/json with parameters: {'headers': {'Jenkins-Crumb': 'crumb'},
'params': {'depth': 0, 'tree': '_class'}}
DEBUG:urllib3.connectionpool:https://'url':443 "GET /job/'project'/job/main/23/api/json?depth=0&tree=_class HTTP/1.1" 200 72
DEBUG:api4jenkins.requester:Response: <Response [200]>
DEBUG:api4jenkins.requester:GET: https://'url'/job/'project'/job/main/23/api/json with parameters: {'headers': {'Jenkins-Crumb': 'crumb'},
'params': {'depth': 0}}
hangs for 4 minutes
DEBUG:urllib3.connectionpool:https://'url':443 "GET /job/'project'/job/main/23/api/json?depth=0 HTTP/1.1" 200 4993
DEBUG:api4jenkins.requester:Response: <Response [200]>
DEBUG:api4jenkins.requester:GET: https://'url'/job/'project'/job/main/23/api/json with parameters: {'headers': {'Jenkins-Crumb': 'crumb'},
'params': {'depth': 0, 'tree': 'queueId'}}
DEBUG:urllib3.connectionpool:https://'url':443 "GET /job/'project'/job/main/23/api/json?depth=0&tree=queueId HTTP/1.1" 200 89
DEBUG:api4jenkins.requester:Response: <Response [200]>
DEBUG:api4jenkins.requester:GET: https://'url'/job/'job'/job/master/5/api/json with parameters: {'headers': {'Jenkins-Crumb': 'crumb'},
'params': {'depth': 0, 'tree': '_class'}}
DEBUG:urllib3.connectionpool:https://'url':443 "GET /job/'job'/job/master/5/api/json?depth=0&tree=_class HTTP/1.1" 200 72
DEBUG:api4jenkins.requester:Response: <Response [200]>
DEBUG:api4jenkins.requester:GET: https://'url'/job/'job'/job/master/5/api/json with parameters: {'headers': {'Jenkins-Crumb': 'crumb'},
'params': {'depth': 0, 'tree': 'queueId'}}
DEBUG:urllib3.connectionpool:https://'url':443 "GET /job/'job'/job/master/5/api/json?depth=0&tree=queueId HTTP/1.1" 200 89
DEBUG:api4jenkins.requester:Response: <Response [200]>
[SUCCESS] You have successfully triggered the job.
Not sure why it queries https://'url'/job/'project'/job/main/23/api/json
instead of the queue item which is the case in my other Jenkinses that work fine.
from api4jenkins.
I realised that the 'project' in https://'url'/job/'project'/job/main/23/api/json
is a different one to the one that is being triggered here. Any idea why the module does this?
Update:
Turned out there was another job running since last month that messed up the executor. Apologies for the trouble :p
from api4jenkins.
Related Issues (20)
- getting jsondecode error HOT 5
- add return type to methods like get_job HOT 1
- get all the configuration properties from a job ? HOT 1
- Build number included string occured error. HOT 5
- Approving the Pending Input is not working when Jenkins runs on Subpath HOT 1
- In Jenkins(jenkins_url, auth=(user,token)), jenkins_url changes port to 80 HOT 2
- proxy agent setting HOT 7
- Build job with files. HOT 10
- v1.13 job.get_build(build_number) return None , v1.12 OK HOT 1
- Change node's labels by which api? HOT 2
- Is the library thread-safe? HOT 1
- Please document 100 job limit on get_build(number) HOT 1
- jenkins.get_job().build(with parameters) HOT 2
- Cannot get the specify build use get_build(number) HOT 3
- Unable to store secret file credentials correctly HOT 1
- [FEATURE REQUEST] Credentials domains HOT 2
- v2.0.0 syntax errors when using Python 3.7 due to walrus operator HOT 2
- Unable to control the logger from v.2.0.0 or newer HOT 3
- ResourceWarning: unclosed socket in pytest HOT 3
- WorkflowJob object has no attribute 'get_build' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api4jenkins.