Agent can't get bootstrap config from remote mainflux host.
How to reproduce this issue:
Add new gw from mainflux/ui and see in bootstrap log: all ok.
mainflux-bootstrap | {"level":"info","message":"Method add for key eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzYxNjcwMjksImlhdCI6MTU3NjEzMTAyOSwiaXNzIjoibWFpbmZsdXgiLCJzdWIiOiI0cmVmcjBudEBnbWFpbC5jb20ifQ.F5kxbVuYEpJALQ4OZltx_LYuhQ6pQi10LeKRcr6vVrM and thing 8c85f5af-2d57-4ff0-ac88-6703fe16c33e took 44.830785ms to complete without errors.","ts":"2019-12-12T07:23:03.262090299Z"}
mainflux-bootstrap | {"level":"info","message":"Method bootstrap for thing with external id E8-EB-11-41-90-C0 took 2.274438ms to complete without errors.","ts":"2019-12-12T07:23:32.278903665Z"}
mainflux-bootstrap | {"level":"info","message":"Method bootstrap for thing with external id E8-EB-11-41-90-C0 took 2.639552ms to complete without errors.","ts":"2019-12-12T07:34:21.384956939Z"}
Copy chanells, keys, ID, MAC to agent config, then start agent - see agent and bootstrap logs.
{"level":"info","message":"Requesting config for E8-EB-11-41-90-C0 from http://mainflux.example.com:8202/things/bootstrap","ts":"2019-12-12T07:35:59.945540972Z"}
{"level":"error","message":"Fetching bootstrap failed with error: unexpected end of JSON input","ts":"2019-12-12T07:35:59.974775806Z"}
{"level":"debug","message":"Retries remaining: 5. Retrying in 10 seconds","ts":"2019-12-12T07:35:59.978658139Z"}
{"level":"error","message":"Fetching bootstrap failed with error: unexpected end of JSON input","ts":"2019-12-12T07:36:09.98658414Z"}
{"level":"debug","message":"Retries remaining: 5. Retrying in 10 seconds","ts":"2019-12-12T07:36:09.987229599Z"}
{"level":"error","message":"Fetching bootstrap failed with error: unexpected end of JSON input","ts":"2019-12-12T07:36:19.99368735Z"}
{"level":"debug","message":"Retries remaining: 5. Retrying in 10 seconds","ts":"2019-12-12T07:36:19.994522391Z"}
{"level":"error","message":"Fetching bootstrap failed with error: unexpected end of JSON input","ts":"2019-12-12T07:36:30.000299184Z"}
{"level":"debug","message":"Retries remaining: 5. Retrying in 10 seconds","ts":"2019-12-12T07:36:30.000903393Z"}
{"level":"error","message":"Fetching bootstrap failed with error: unexpected end of JSON input","ts":"2019-12-12T07:36:40.006800977Z"}
{"level":"debug","message":"Retries remaining: 5. Retrying in 10 seconds","ts":"2019-12-12T07:36:40.007543227Z"}
{"level":"warn","message":"Retries exhausted","ts":"2019-12-12T07:36:50.008581853Z"}
mainflux-bootstrap | {"level":"warn","message":"Method bootstrap for thing with external id E8-EB-11-41-90-C0 took 2.146298ms to complete with error: non-existent entity.","ts":"2019-12-12T07:36:00.005816458Z"}
mainflux-bootstrap | {"level":"warn","message":"Method bootstrap for thing with external id E8-EB-11-41-90-C0 took 1.885635ms to complete with error: non-existent entity.","ts":"2019-12-12T07:36:10.021449609Z"}
mainflux-bootstrap | {"level":"warn","message":"Method bootstrap for thing with external id E8-EB-11-41-90-C0 took 2.483206ms to complete with error: non-existent entity.","ts":"2019-12-12T07:36:20.028677297Z"}
mainflux-bootstrap | {"level":"warn","message":"Method bootstrap for thing with external id E8-EB-11-41-90-C0 took 1.828785ms to complete with error: non-existent entity.","ts":"2019-12-12T07:36:30.035540444Z"}
mainflux-bootstrap | {"level":"warn","message":"Method bootstrap for thing with external id E8-EB-11-41-90-C0 took 2.079457ms to complete with error: non-existent entity.","ts":"2019-12-12T07:36:40.042089603Z"}