Help needed with JCLI error

I want to copy versions between several projects (they all have the same versions). So I am trying to use the JCLI to do this. Howver I get the following errors and am now stuck. Can anyone help? The user login provided is for the sysadmin account. The following is from the cmd window:

C:\Program Files\jira-cli-2.6.0>
jira --action copyVersions --project "ABC" --toProject "ABC Test Project" --verbose


Server address: http://ia-jirasvr:8080/rpc/soap/jirasoapservice-v2

Successful
login to: http://ia-jirasvr:8080/rpc/soap/jirasoapservice-v2 by user: nick watson

URL requested: http://ia-jirasvr:8080/rest/api/latest/version/10000?os_username=nick watson&os_password=***

Request type: GET

Content type: application/json

Response code: 505, message: HTTP Version Not Supported, url: http://ia-jirasvr: 8080/rest/api/latest/version/10000?os_username=nick watson&os_password=***

Problem determination - response: 505: HTTP Version Not Supported

Problem determination - response url: http://ia-jirasvr:8080/rest/api/latest/version/10000?os_username=nick watson&os_password=***

Problem determination - request url: http://ia-jirasvr:8080/rest/api/latest/version/10000?os_username=nick watson&os_password=***

org.swift.common.cli.AbstractRemoteClient$RemoteRestException: Unknown error occurred on server. Use the problem determination urls from a browser to see more details.

Remote error: 1 versions failed to be copied.

0 versions copied from ABC to project ATP.

java.rmi.RemoteException: 1 versions failed to be copied.

0 versions copied from ABC to project ATP.
at org.swift.jira.cli.JiraClient.copyVersions(JiraClient.java:3997)
at org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:483)
at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:119)
at org.swift.common.cli.CliClient.doWork(CliClient.java:298)
at org.swift.jira.cli.JiraClient.main(JiraClient.java:158)
FbpEc3X060 logged out.

Error: Parameter 'server' is required.
Error: Parameter 'password' is required.

1 answer

It appears that your user name has a space it in. Use your JIRA user id - it should not have spaces.

Hi Bob,

Guess I am being particulariliy dense here... is the JIRA User ID the same as the Username? If so it has a space.

Regardless I created a new user called automation (put in administartor group) and used that. I still get the same error e.g.

C:\Program Files\jira-cli-2.6.0>jira --action getServerInfo
JIRA version: 5.0.5, build: 732, time: 2012-06-28T12:29:35.818+0100, time zone:
Europe/London

Error: Parameter 'server' is required.
Error: Parameter 'password' is required.

Nick

My apologies, apparently a user id (username) can be created with a blank or other special characters :(. Supporting these will require a fix in the CLI. In the meantime use an id without blanks for special characters.

Regarding your error, you need to check your customization of the jira.bat command to ensure it is correct. If you don't see an obvious error, post it.

I really cant see whats wrong, I literally just edited the servername, usrname and password anyway here goes:

Incase its relevant its on a Win7 Box, 64 bit machine

Thanks.

@echo off
rem remember the directory path to this bat file
set dirPath=%~dp0

rem need to reverse windows names to posix names by changing \ to /
set dirPath=%dirPath:\=/%
rem remove blank at end of string
set dirPath=%dirPath:~0,-1%

rem - Customize for your installation, for instance yo might want to add default parameters like the following:
rem java -jar "%dirPath%"/lib/jira-cli-2.6.0.jar --server http://my-server --user automation --password automation %*

java -jar "%dirPath%"/lib/jira-cli-2.6.0.jar --server http://ia-jirasvr:8080 --user automation --password aut0mat1on %*

java -jar "%dirPath%"/lib/jira-cli-2.6.0.jar %*

rem Exit with the correct error level.

echo ">>"
echo ">>jira.bat run completed"

EXIT /B %ERRORLEVEL%

I have the same .bat configuration, with the same error  message.

Confluence ver 1000.1035.0

C.L.I ver 6.2.0

Is there any update on this?

 

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,338 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot