【问题标题】:JenkinAPI error with server.get_jobs "max retries exceeded with url"JenkinAPI 错误与 server.get_jobs \"最大重试次数超过 url\"
【发布时间】:2022-12-16 03:29:13
【问题描述】:

从新年伊始,我无法使用可以在此处找到的经典示例从我的 Jenkins 中提取工作信息:https://jenkinsapi.readthedocs.io/en/latest/using_jenkinsapi.html#example-2-get-details-of-jobs-running-on-jenkins-server。代替它们,我收到以下错误:

requests.exceptions.ConnectionError:HTTPSConnectionPool(主机=, port=): 最大重试次数超过 url: /job/<JOB_NAME>/api/python?tree=allBuilds%5Bnumber%2Curl%5D(由 ReadTimeoutError("HTTPSConnectionPool(host=, port=): 读取 时间到。 (读取超时=10)”))

感谢您的任何建议。

【问题讨论】:

    标签: jenkins jenkins-api


    【解决方案1】:

    如果您要连接的主机不可用,您将收到此错误。

    我建议尝试一些网络测试以确保主机可见: 在哪里:
    ReadTimeoutError("HTTPSConnectionPool(host='myhost.something.com', port=1234)

    尝试 netcat 或跟踪路径:
    -> nc -w 5 -vz myhost.something.com 1234
    Ncat:版本 7.50 (https://nmap.org/ncat)
    Ncat:连接到 10.11.12.13:1234。
    Ncat:发送 0 个字节,在 0.01 秒内接收到 0 个字节。

    -> tracepath -p 33434 myhost.something.com

    【讨论】:

      猜你喜欢
      • 2018-06-21
      • 2022-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-30
      相关资源
      最近更新 更多