I’m having issues authenticating with the JIRA API using the Python library. Here’s what I’ve tried:
from jira_connection import JIRAConnect
jira = JIRAConnect('https://mycompany.jiraserver.com/')
user = 'myusername'
pwd = 'mypassword'
auth_jira = JIRAConnect(auth=(user, pwd))
But I’m getting this error:
ERROR: Connection failed. Max retries reached.
Details: Failed to establish connection to localhost:2990
Reason: Connection refused
I’m not sure if I’m using the correct server URL or if there’s something wrong with my authentication. Any ideas on how to fix this? I’ve double-checked my credentials and they seem correct. Could it be a firewall issue or am I missing some configuration step?
Hey there! I’ve run into similar issues before when working with JIRA’s API. Based on the error message, it looks like your script is trying to connect to localhost instead of your actual JIRA server. Double-check the server URL you’re using - it should be something like ‘https://mycompany.jiraserver.com’ instead of a local address.
Another thing to consider is whether your JIRA instance uses API tokens for authentication. If so, you’ll need to use that instead of your regular password. It’s usually more secure anyway.
Also, don’t forget to check if there are any firewall rules blocking the connection. I once spent hours debugging only to realize our IT team had recently updated the firewall settings!
If none of that works, try disabling SSL verification temporarily (just for testing, not in production!). Sometimes certificate issues can cause connection problems. Hope this helps you get it sorted!
In my experience, the issue seems to stem from an incorrect server URL configuration, as the error indicates that your code is connecting to localhost. It is important to verify that the URL is accurately set to the actual JIRA server, for example, ‘https://mycompany.jiraserver.com’. Moreover, if your JIRA instance uses API tokens rather than passwords, adjust your authentication method accordingly. Also, consider network restrictions or firewall blocks that might be interfering with the connection. Checking these settings has resolved similar issues for me in the past.
hey, i’ve seen this before. check ur server url, it’s trying to connect to localhost. make sure u use the actual jira server address like ‘https://mycompany.jiraserver.com’. also, double-check if there’s any firewall blocking the connection. hope this helps!