Git Product home page Git Product logo

Comments (9)

joelee2012 avatar joelee2012 commented on July 18, 2024

this is normal, if catch such exception, the while will be dead loop. you should clean the build from queue.

from api4jenkins.

lucatamtam avatar lucatamtam commented on July 18, 2024

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.

joelee2012 avatar joelee2012 commented on July 18, 2024

can you verify if the fix works ? cause i don't have env to verify

from api4jenkins.

joelee2012 avatar joelee2012 commented on July 18, 2024

@lucatamtam are you able to verify ? i can't reproduce the issue

from api4jenkins.

lucatamtam avatar lucatamtam commented on July 18, 2024

hi @joelee2012 yes the fix is working thanks you

from api4jenkins.

JakubBiel avatar JakubBiel commented on July 18, 2024

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.

joelee2012 avatar joelee2012 commented on July 18, 2024

@JakubBiel you can enable debug log to check what happened during error/long time response.

from api4jenkins.

JakubBiel avatar JakubBiel commented on July 18, 2024
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.

JakubBiel avatar JakubBiel commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.