Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×I need help with below error,
Jira hosted on SSO Okta and when I try to fetch JIra data using bearer token i see error below, Please i need urgent help with this
An error occurred during the request: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None
Hi @rAJ
It seems to be a network / TLS / proxy issue rather than an HTTP 401 or 403.
From the same host, you can simply run a curl command to https://jira.vtxxxxx.net/rest/api/2/serverInfo , if this also resets, it’s network/TLS/proxy, not your code.
hi @Tuncay Senturk _Snapbytes_ I was able to run curl command successfully, and also able to fetch Jira data using curl subprocess from Python script as well, But unable to fetch using requests library. I need it to work for prod env
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks—that narrows it down a lot.
If curl works but requests not, it can be CA trust issue or proxy problem. You may need to import ca-bundle cert file for a hardened requests session.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tuncay Senturk _Snapbytes_ Tried CA bundle and proxy as well, below is script and now i see ERROR:root:HTTPSConnectionPool(host='XXX.XXX.net', port=443): Max retries exceeded with url: /rest/api/2/issue/XXX-213207 (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable'))
if I comment proxy , error is DEBUG:urllib3.connectionpool:Starting new HTTPS connection (6): xxx.xxx.net:443 ERROR:root:Connection reset (10054) — often WAF/TLS/UA/cipher mismatch: HTTPSConnectionPool(host='xx.xx.net', port=443): Max retries exceeded with url: /rest/api/2/issue/xx-213207 (Caused by ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your logs tell something. Sorry if I'm misleading you though
With proxy, 503 service unavailable - the proxy is rejecting CONNECT to your Jira. Mostly, it needs enterprise authentication (Kerberos/NTLM) or the Jira host isn’t allowed.
Without proxy. 10054 Connection reset - something (WAF or load balancer) is closing the connection for Python's request (even though curl works)
So, I'd suggest bypassaing the corporate proxy for Jira and match crul's ca/tls settings (if that works :) )
Otherwise, if you must use the proxy, you may use Kerberos/NTLM auth instead of basic credentials.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
final summary of what the most recent logs confirm about both options:
curl
's Settings
This option was successful in bypassing the proxy. The logs showed the proxy environment variables were None
. However, the script failed with a ConnectionResetError
,
This option was never successfully tested in trials. causing the script to fail with a 503 Service Unavailable
error before the Kerberos authentication could even be initiated. most recent logs show the correct behavior for bypassing the proxy, but not for Kerberos, as we never reached the point where that code would be executed successfully.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.