curl: (92) HTTP/2 stream 1 was not closed cleanly

6,520 views
Skip to first unread message

Sherif Hesham

unread,
Oct 2, 2018, 7:35:22 PM10/2/18
to Mainflux
when I try to execute the command for creating a device:

 curl -s -S -i --cacert docker/ssl/certs/mainflux-server.crt --insecure -X POST -H "Content-Type: application/json" -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1Mzg1NTgyNjYsImlhdCI6MTUzODUyMjI2NiwiaXNzIjoibWFpbmZsdXgiLCJzdWIiOiJzaGVyaWYuaGVzaGFtOTlAZ21haWwuY29tIn0.7ZeCRQOU52Q2RxDrf_bvRK4aYoUE-zVZu4w0keVt2MI
" https://localhost/things -d '{"type":"device", "name":"RTest1"}'

I get the error message : 

curl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)

according to https://mainflux.readthedocs.io/en/latest/getting-started/ I should get sth like this: 

HTTP/1.1 201 Created
Content-Type: application/json
Location: /things/81380742-7116-4f6f-9800-14fe464f6773
Date: Tue, 10 Apr 2018 10:02:59 GMT
Content-Length: 0

Drasko DRASKOVIC

unread,
Oct 3, 2018, 3:45:20 AM10/3/18
to sherif....@gmail.com, Mainflux
Hi Sherif,
This looks more like some bug with your curl - like this one:
https://github.com/nghttp2/nghttp2/issues/735 - or something related
to your environment (machine) than an issue with Mainflux. For some
reason curl on your machine is forcing HTTP/2 (curl is now doing this
by default for HTTPS) and not doing correct fallback to HTTP/1.1. Can
you please try using HTTP/1.1 and tell us the result, or try on some
other machine, or try on the some machine with some other tool than
curl - Postman for example?

https://curl.haxx.se/docs/http2.html

BR,
Drasko
Reply all
Reply to author
Forward
0 new messages