Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Perl JIRA::REST API gets stopped working

PaulS January 26, 2024

This was working about a month ago but now it returns two errors...

 

JIRA::REST Error[500 - Internal Server Error]:

Can't connect to stratustech.atlassian.net:443

 

Code is Perl running from cgi script. Here's the relevant code...

 

$jira = JIRA::REST->new({
url => $strURL,
username => $strJiraUser,
password => $strJiraPW
});

my $bug = $jira->GET("/issue/$intBugID");

 

It's the GET that fails. I've tried resetting the password, also tried using an API token instead of the account pw, also tried Base64 encoding of the acc/pw. No luck.

I can run similar query from the cmd line using curl, e.g. this works...

curl -k --request GET --url 'https://stratustech.atlassian.net/rest/api/3/issue/ZTC-21572' --header 'Accept:application/json' --header 'Content-Type: application/json' --user 'everrun.qa@stratus.com:<Token...>'

But fails from the cgi script.

Jira is cloud version.

Anyone else run into this with JIRA::REST?

1 answer

0 votes
PaulS January 26, 2024

Ok, think I resolved this, as it now works. Here are the changes I made in case someone else runs into this...

1. Updated JIRA::REST module .019 to .024 then...
2. Changed the password to use API token instead
3. Added ssl_verify_none option...

$jira = JIRA::REST->new({
    url => $strURL,
    username => $strJiraUser,
    password => $strJiraPW, # API Token
    ssl_verify_none => 1 # ssl option
});

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events