Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61126

response error when looking jenkins queue for build number

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • workflow-api-plugin
    • None

      Hello! 

      My python script executes a job, and i wait «Location»  (response.headers.get('Location’)) in header response. It’s a number of task in queue. And with this number i can control job status.

      But i have error, because i don't get anything in response and i don’t control process. My script is failed, but job is run!

      And then often recieve same error then i look queue for build number

      2020-01-24 09:10:33,767 [actions:INFO] actions:add_dns:14

      {'ip': '10.10.10.10', 'hostname': ’serv1', 'joindomain': ‘[d|http://delta.sbrf.ru/]om1.ru', 'operation_id': 988543, 'domain': ‘dom1', 'endpoint': 'api/v1/dns', 'method': 'post'}

      2020-01-24 09:10:33,767 [dns:INFO] dns:dns_change:166 DNS request data: {'name': ’serv1', 'ip': ’10.10.10.10', 'domain': ‘dom1.ru', 'r_type': ['A'], 'action': 'add'}

      2020-01-24 09:10:33,767 [dns:DEBUG] dns:jj_build:88 POST to addr: https://jenkins/job/u/job/u_dns/

      2020-01-24 09:10:33,767 [dns:DEBUG] dns:jj_build:89 posted data: [{'name': ’serv1', 'ip': ’10.10.10.10', 'domain': ‘dom1.ru', 'r_type': ['A'], 'action': 'add'}]

      -> POST request on build:

      2020-01-24 09:10:34,808 [urllib3.connectionpool:DEBUG] connectionpool:_make_request:396 https://jenkins:443 "POST /job/u/job/u_dns/buildWithParameters?token= dvkaklvakjvnkajvnkajnvkjankvjn&data=%5B%7B%22name%22:%20%22serv1%22,%20%22ip%22:%20%2210.10.10.10%22,%20%22domain%22:%20%22dom1.ru%22,%20%22r_type%22:%20%5B%22A%22%5D,%20%22action%22:%20%22add%22%7D%5D HTTP/1.1" 201 0

      -> looking queue -  request for build number:

      2020-01-24 09:10:38,332 [urllib3.connectionpool:DEBUG] connectionpool:_make_request:396 https://jenkins:443 "GET /queue/item/474773/api/json HTTP/1.1" 200 491

      -> and now failed on bad response

      2020-01-24 09:10:38,333 [dns:ERROR] dns:dns_change:194 Failed to build jj-job: 'NoneType' object has no attribute 'get'

      2020-01-24 09:10:38,334 [celery.app.trace:ERROR] trace:_log_error:256 Task celery_tasks.add_dns_task[75ed07b9-3c4a-4aeb-ba38-013807332702] raised unexpected: TypeError("'bool' object is not subscriptable",)

            Unassigned Unassigned
            grigoriyt Grigoriy Tutukin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: