Hi
I installed and enabled the jira mobileconnect plugin and followed the setup guide though to step 5.
When I view the users of the jira project, jiraconnectuser isn't in the list, but if I try to add a user with that name I get an error saying that the user is already in the database.
When I crash my app in the iphone simulator, i get the following output:
2012-01-18 15:06:24.880 Test[2181:10703] 121 -[CrashReporter init] Crash reporter enabled.
2012-01-18 15:06:24.920 Test[2181:10703] 313 -[JMC start] JIRA Mobile Connect is configured with url: https://jira.<companyname>.com/
2012-01-18 15:06:26.929 Test[2181:10703] 55 -[JMCPing sendPing] Retrieving notifications via: https://jira.<companyname>.com/rest/jconnect/1.0/issue/updates?sinceMillis=1326857694024&uuid=B989A2E3-52EA-4813-B3AA-863F6382E1F0&apikey=3d6b7015-7053-4110-a2cb-faf81aee7fce&project=QI
2012-01-18 15:06:27.524 Test[2181:10703] 73 -[JMCPing didReceiveComments:] Time JIRA last saw this user: 2012-01-18 04:06:27 +0000
2012-01-18 15:06:27.526 Test[2181:10703] 113 -[JMCPing connectionDidFinishLoading:] Flushing the request queue
2012-01-18 15:06:27.527 Test[2181:10703] 61 +[JMCRequestQueue sharedInstance] queue at /Users/seb/Library/Application Support/iPhone Simulator/5.0/Applications/E8C70DB2-7270-47F9-A543-8130C3876D8C/Library/Application Support/JMC/JMCQueueIndex.plist
2012-01-18 15:06:28.531 Test[2181:10703] 92 -[JMCRequestQueue doFlushQueue] Actually flushing queue. Item count: 3
2012-01-18 15:06:28.580 Test[2181:10703] 64 +[JMCTransport addAllAttachments:toRequest:boundary:] issue-0=issue (application/json)
2012-01-18 15:06:28.581 Test[2181:10703] 64 +[JMCTransport addAllAttachments:toRequest:boundary:] Test-2012-01-18-14-34.crash-0=Test-2012-01-18-14-34.crash (text/plain)
2012-01-18 15:06:28.581 Test[2181:10703] 134 -[JMCRequestQueue doFlushQueue] Added request to operation queue jmc-558BD42B-38B2-4BF4-8983-BCEBCACAAE17
2012-01-18 15:06:28.583 Test[2181:10703] 64 +[JMCTransport addAllAttachments:toRequest:boundary:] issue-0=issue (application/json)
2012-01-18 15:06:28.584 Test[2181:10703] 64 +[JMCTransport addAllAttachments:toRequest:boundary:] Test-2012-01-18-14-21.crash-0=Test-2012-01-18-14-21.crash (text/plain)
2012-01-18 15:06:28.584 Test[2181:10703] 134 -[JMCRequestQueue doFlushQueue] Added request to operation queue jmc-3A141B31-C4B7-4E68-B72E-38B7FECD3330
2012-01-18 15:06:28.586 Test[2181:10703] 64 +[JMCTransport addAllAttachments:toRequest:boundary:] issue-0=issue (application/json)
2012-01-18 15:06:28.586 Test[2181:10703] 64 +[JMCTransport addAllAttachments:toRequest:boundary:] Test-2012-01-18-14-21.crash-0=Test-2012-01-18-14-21.crash (text/plain)
2012-01-18 15:06:28.587 Test[2181:10703] 134 -[JMCRequestQueue doFlushQueue] Added request to operation queue jmc-941F7448-FDBA-4B8B-95FE-6A071121F311
2012-01-18 15:06:29.045 Test[2181:15903] 158 -[JMCTransportOperation connectionDidFinishLoading:] <JMCTransportOperation: 0x7341860> Request FAILED & queued item is not deleted. jmc-558BD42B-38B2-4BF4-8983-BCEBCACAAE17 Error occurred while creating issue through workflow: User 'null' doesn't have the 'Create Issue' permission
2012-01-18 15:06:29.047 Test[2181:15903] 185 -[JMCTransportOperation connection:didFailWithError:] Request failed: Error occurred while creating issue through workflow: User 'null' doesn't have the 'Create Issue' permission URL: https://jira.<companyname>.com/rest/jconnect/1.0/issue/create?project=QI&apikey=3d6b7015-7053-4110-a2cb-faf81aee7fce, response code: 401
2012-01-18 15:06:29.877 Test[2181:15907] 158 -[JMCTransportOperation connectionDidFinishLoading:] <JMCTransportOperation: 0x7344b90> Request FAILED & queued item is not deleted. jmc-3A141B31-C4B7-4E68-B72E-38B7FECD3330 Error occurred while creating issue through workflow: User 'null' doesn't have the 'Create Issue' permission
2012-01-18 15:06:29.879 Test[2181:15907] 185 -[JMCTransportOperation connection:didFailWithError:] Request failed: Error occurred while creating issue through workflow: User 'null' doesn't have the 'Create Issue' permission URL: https://jira.<companyname>.com/rest/jconnect/1.0/issue/create?project=QI&apikey=3d6b7015-7053-4110-a2cb-faf81aee7fce, response code: 401
2012-01-18 15:06:30.490 Test[2181:1590b] 158 -[JMCTransportOperation connectionDidFinishLoading:] <JMCTransportOperation: 0x7348420> Request FAILED & queued item is not deleted. jmc-941F7448-FDBA-4B8B-95FE-6A071121F311 Error occurred while creating issue through workflow: User 'null' doesn't have the 'Create Issue' permission
2012-01-18 15:06:30.492 Test[2181:1590b] 185 -[JMCTransportOperation connection:didFailWithError:] Request failed: Error occurred while creating issue through workflow: User 'null' doesn't have the 'Create Issue' permission URL: https://jira.<companyname>.com/rest/jconnect/1.0/issue/create?project=QI&apikey=3d6b7015-7053-4110-a2cb-faf81aee7fce, response code: 401
Cheers
Hi - I am going to try and merge the CONNECT-105-jmc-user-config branch to default.
In the meantime, the correct way to set the remote username is:
curl -u admin:admin -d '{"projectId": 10000, "remoteUsername": "testuser"}' \ -X POST -H "Content-Type: application/json" \ http://localhost:2990/jira/rest/jconnect/latest/admin/setRemoteMobileUsername
Also, I will upload a new build of the plugin off that branch, which has all changes from default merged across.
Cheers,
Nick
New build is here: jconnect-plugin-1.0.11.jar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That fixed it thanks!
I needed to change the url in the script to http://jira.server.com/rest/jconnect/... instead of http://jira.server.com:2990/jira/rest/jconnect/...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good idea to try the admin/setRemoteMobileUsername resource!
I will try and get that merged across to the 1.1 (for JIRA 5.0) branch shortly. If you find this useful, I will also consider adding that to the plugin's configuration admin screen. It seems like it could make JMC easier to setup and start using.
Can you please run curl with the -v flag, in case there is a redirect occuring somewhere which shouldn't.
Also, please double check that you are running the exact version of the plugin attached to that issue. Please remove the existing plugin, then re-install that version.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
X-AREQUESTID: 864x13613x1
Set-Cookie: JSESSIONID=AF3E9A59A790F7B4C9A5551144EF882D; Path=/; Secure; HttpOnly
Set-Cookie: crowd.token_key=""; Domain=.myjiraserver>.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
X-Seraph-LoginReason: OUT
Set-Cookie: crowd.token_key=PIwyY1oWxVijfGzxFv0ZzA00; Domain=.myjiraserver>.com; Path=/; HttpOnly
X-Seraph-LoginReason: OK
Set-Cookie: atlassian.xsrf.token=BGCX-YTEL-L6Y4-T9M3|e6fc441d781abccbbada90cee044a4f113ae90f8|lin; Path=/
X-AUSERNAME: s
X-ASESSIONID: 1dm0xl4
Content-Type: text/html;charset=utf-8
Content-Length: 1120
Date: Thu, 19 Jan 2012 03:24:27 GMT
* Connection #0 to host jira.myjiraserver>.com left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
html>head>title>Apache Tomcat/6.0.32 - Error report/title>style>!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}-->/style> /head>body>h1>HTTP Status 404 - /jira/rest/jconnect/latest/admin/setRemoteMobileUsername/h1>HR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response :)
I had already uninstalled the plugin and installed the version you posted on that page
Here's the output of curl -v (split into two comments)
MacBook-Pro:~ s$ curl -v -u <username>:<password>$ -d '{"QI": 10000, "devuser": "test"}' -X POST -H "Content-Type: application/json" https://jira.<myjiraserver>.com/jira/rest/jconnect/latest/admin/setRemoteMobileUsername
* About to connect() to jira.<myjiraserver>.com port 443 (#0)
* Trying <my jiraserver ip address>... connected
* Connected to jira.<myjiraserver>.com (<my jiraserver ip address>) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using EDH-RSA-DES-CBC3-SHA
* Server certificate:
* subject: O=*.<myjiraserver>.com; OU=Domain Control Validated; CN=*.<myjiraserver>.com
* start date: 2011-10-06 01:08:25 GMT
* expire date: 2012-10-06 01:08:25 GMT
* subjectAltName: jira.<myjiraserver>.com matched
* issuer: C=US; ST=Arizona; L=Scottsdale; O=GoDaddy.com, Inc.; OU=http://certificates.godaddy.com/repository; CN=Go Daddy Secure Certification Authority; serialNumber=07969287
* SSL certificate verify ok.
* Server auth using Basic with user 's'
> POST /jira/rest/jconnect/latest/admin/setRemoteMobileUsername HTTP/1.1
> Authorization: Basic c2ViOlNhbXN1bmcxMjMk
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: jira.<myjiraserver>.com
> Accept: */*
> Content-Type: application/json
> Content-Length: 32
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I See.
Could you try adding the jiraconnectuser to Crowd?
I think we will need to improve documentation to account for Crowd.
Let me know if that fixes this issue.
Cheers,
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
(I don't have permission to add a crowd user)
I reinstalled the plugin from http://connect.onjira.com/browse/CONNECT-105
When i run this script:
curl -u <my admin username>:<my admin password> -d '{"<my project id>": 10000, "<the user i want to use>": "test"}' -X POST -H "Content-Type: application/json" \ http://<my jira server>:2990/jira/rest/jconnect/latest/admin/setRemoteMobileUsername
I get this error:
curl: (7) couldn't connect to host
When I remove the port specification, ie:
curl -u <my admin username>:<my admin password> -d '{"<my project id>": 10000, "<the user i want to use>": "test"}' -X POST -H "Content-Type: application/json" \ http://<my jira server>/jira/rest/jconnect/latest/admin/setRemoteMobileUsername
I get the following error:
Status report</p><p><b>message</b> <u>/jira/rest/jconnect/latest/admin/setRemoteMobileUsername</u></p><p><b>description</b> <u>The requested resource (/jira/rest/jconnect/latest/admin/setRemoteMobileUsername) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.32</h3></body></html>Sebastion/json" http://<my jiraserver>:2990/jira/rest/jconnect/latest/admin/setRemoteMobileUsernameT -H "Content-Type: applica
curl: (7) couldn't connect to host
Any ideas?
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi S Smith,
I've not seen this happen before. Are you using Crowd or LDAP for user storage on the JIRA side?
Do you see any errors in the jira logs when these requests are tried?
Can you please enable DEBUG logging in JIRA and retry these requests.
Cheers,
Nick Pellow
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response Nick
We are using crowd
I don't see anything that looks particularly unusual in /var/jira/log/atlassian-jira-http-access.log
Which package should I enable debug logging in, and where will the log file be stored?
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.