It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Pavel Zindyaev Apr 10, 2013

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

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

Pavel Zindyaev Apr 10, 2013

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=***

Pavel Zindyaev Apr 10, 2013

it gave me the same output

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

Pavel Zindyaev Apr 10, 2013

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

Pavel Zindyaev Apr 10, 2013

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.

Pavel Zindyaev Apr 11, 2013

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

Join our webinar: “Asset Management: The Role of Context in ITSM” with Atlassian & Riada

  Hi Atlassian Community! This is Teresa from the Jira Service Desk team. On June 19th, I’ll be hosting a webinar “Asset Management: The Role of Context in ITSM” with Atlassian Partne...

179 views 2 3
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you