cli getVersion and updateVersion java.net.ConnectException: Connection refused: connect

Hello i'm trying to run some script with jira-cli and getting an error

when running simple request with jira-cli

java -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080 -Dhttp.proxyUser=user -Dhttp.proxyPassword=password -jar jira-cli-3.2.0.jar --server https://site.com/jira/ --user user --password xxx -v --action getVersion --project "project" --version "01"

it fails with:

Server address: https://site.com/jira/rpc/soap/jirasoapservice-v2

Successful login to: https://site.com/jira/rpc/soap/jirasoapservice-v2 by user: user.

jiraRelease: 4.3.4

URL requested: https://site.com/jira/rest/api/latest/version/16728?os_username=user&os_password=***

Request type: GET

Content type: application/json

KC8nzEacG7 logged out.

 

Client error: Invalid request: java.net.ConnectException: Connection refused: connect

org.swift.common.cli.CliClient$ClientException: Invalid request: java.net.ConnectException: Connection refused: connect

        at org.swift.common.cli.AbstractRestClient.restRequestWithFullUrl(AbstractRestClient.java:644)

        at org.swift.common.cli.AbstractRestClient.restRequest(AbstractRestClient.java:363)

        at org.swift.jira.cli.JiraRealRestClient.getVersion(JiraRealRestClient.java:232)

        at org.swift.jira.cli.JiraClient.getVersion(JiraClient.java:4818)

        at org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:585)

        at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:122)

        at org.swift.common.cli.CliClient.doWork(CliClient.java:315)

        at org.swift.jira.cli.JiraClient.main(JiraClient.java:178)

Thank you!

1 answer

This widget could not be displayed.

Go to a browser and login to the site. Then copy in the url and see what it says: https://site.com/jira/rest/api/latest/version/16728

Here is the output:

{"self":"https://site.com/jira/rest/api/latest/version/16728","name":"01","archived":false,"released":false}

That looks right. Now, logout, and then try the following with the correct password: https://site.com/jira/rest/api/latest/version/16728?os_username=user&os_password=***

it gave me the same output

{"self":"https://site.com/jira/rest/api/latest/version/16728","name":"01","archived":false,"released":false}

I get this error only when i try to use getVersion or updateVersion. all other actions seems work well

i just tried latest version of cli 3.3.0 and now it seems working. at least getVersion. i will try with update version

Thank you Bob for your time

Puzzling. It might have been a redirection problem - did the url change after you entered the value in the browser? In any case, it is good you have it working now.

The link doesn't get redirected anywhere, it is the same after page loading.

I did some tests and seems that getVersion and updateVersion doesn't work when i use cli through proxy

It works weel without proxy, but in my case i have to use it only with proxy

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

534 views 3 19
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you