Hi all,
I recently stumbled on the pull request for adding a JSON API to OpenSTF, and have been REALLY excited about it! (In case others have not found it, here is a link :
https://github.com/openstf/stf/pull/219 )
However, I have run in to an issue trying to use it, and hoped that vbantha might read the forum here. (I've also posted a couple of issues on the discussion for the pull request, but have not seen any response or action on the issues, so forgive me for cross-posting here. It is being done to try to both get help, and help out a bit as well.)
I've been working on a small Jenkins plugin, but hit an issue. When I try to add a device to a user, I keep getting back a
504 response with the JSON '{"success":false,"description":"Device is
not responding"}'.
From looking at the logs for the API docker, I don't see any error
messages when I run the query. So, it is unclear what the problem might
be.
FWIW - This happens with both curl and my Java code. The command I am using is :
curl -v -X POST --header "Content-Type:application/json" --data
'{"serial":"HT254W302991"}' -H "Authorization: Bearer
ea06b6215c844409bdee5cfb970dcee8a702e72c67e1461492576b84c4749114" http://192.168.64.56/api/v1/user/devices
(And, yes, I am really running it over http, not https. I know there
are some issues with that, but I have not had a chance to rebuild my
test environment yet. I'll probably start on that today, in case it
helps with this issue.)
In case it helps, the full output from curl when run with the -v parameter is :
* Hostname was NOT found in DNS cache
* Trying 192.168.64.56...
* Connected to 192.168.64.56 (192.168.64.56) port 80 (#0)
> POST /api/v1/user/devices HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 192.168.64.56
> Accept: */*
> Content-Type:application/json
> Authorization: Bearer ea06b6215c844409bdee5cfb970dcee8a702e72c67e1461492576b84c4749114
> Content-Length: 25
>
* upload completely sent off: 25 out of 25 bytes
< HTTP/1.1 504 Gateway Timeout
* Server nginx/1.9.3 (Ubuntu) is not blacklisted
< Server: nginx/1.9.3 (Ubuntu)
< Date: Tue, 14 Jun 2016 16:32:32 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 58
< Connection: keep-alive
< X-Powered-By: Express
< ETag: W/"3a-bb57uITinBIua/J+f57F/A"
<
* Connection #0 to host 192.168.64.56 left intact
{"success":false,"description":"Device is not responding"}
Let me know if I can provide any additional information.
Thanks!