0

I am using jenkins package of python to fetch job details from jenkins server. For most of the servers I am able to fetch the job data but for few servers I am getting below error.

Unable to authenticate with any scheme: auth(kerberos) HTTPConnectionPool(host='xxxxxxxx', port=8080): Max retries exceeded with url: /api/json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb1d4b55898>: Failed to establish a new connection: [Errno 111] Connection refused',)) auth(anonymous) HTTPConnectionPool(host='xxxxxxxx', port=8080): Max retries exceeded with url: /api/json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb1cbce20f0>: Failed to establish a new connection: [Errno 111] Connection refused',))

I have below code where the error is occuring.

server_object = jenkins.Jenkins("http://"+["jenkins_hostname"]+":"+['jenkins_port'], username=xxxxx, password=xxxxx, timeout=120,)

I tried to login in to the server with userid and password, Its working when using browser. I am not able to figure out what exactly the issue as I am able to login in to the jenkins using browser. Now I am stuck as this error is not coming for all servers. Please help in resolving the error.

Nilesh
  • 69
  • 1
  • 11

0 Answers0