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

pzindyaev April 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

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 10, 2013

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

pzindyaev April 10, 2013

Here is the output:

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

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 10, 2013

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

pzindyaev April 10, 2013

it gave me the same output

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

pzindyaev April 10, 2013

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

pzindyaev April 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

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2013

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.

pzindyaev April 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
TAGS
AUG Leaders

Atlassian Community Events