Bluemix IoT Foundation Starter give Error: Lost connection to server -
i trying internet of things foundation starter boilerplate in bluemix. here steps following:
- create new app using boilerplate
- once app up, go url , see nodered home page
- i click on button take me nodered editor
- in browser window have iot sensor available here: https://quickstart.internetofthings.ibmcloud.com/iotsensor/ , running
- i configure "iot app in node" address of iot sensor. have removed ":"'s , have made letters lowercase.
- when click deploy in nodered editor, see following error: "error: lost connection server"
after step 2 see these errors in log:
2015-05-14t16:05:10.31-0400 [app/0] out ←[34m[2015-05-14 20:05:10.316] [trace] [default] - ←[39m1 iot-2/type/+/id//evt/+/fmt/json 2015-05-14t16:05:10.31-0400 [app/0] out ←[34m[2015-05-14 20:05:10.316] [trace] [default] - ←[39mresubscribing: 2015-05-14t16:05:10.31-0400 [app/0] out ←[34m[2015-05-14 20:05:10.318] [trace] [default] - ←[39mretry count = 1 2015-05-14t16:05:12.32-0400 [app/0] out ←[34m[2015-05-14 20:05:12.320] [trace] [default] - ←[39mconnected......: 2015-05-14t16:05:12.32-0400 [app/0] out subscription count = 1 2015-05-14t16:05:12.32-0400 [app/0] out ←[34m[2015-05-14 20:05:12.320] [trace] [default] - ←[39m1 iot-2/type/+/id//evt/+/fmt/json 2015-05-14t16:05:12.32-0400 [app/0] out ←[34m[2015-05-14 20:05:12.320] [trace] [default] - ←[39mresubscribing: 2015-05-14t16:05:12.32-0400 [app/0] out ←[34m[2015-05-14 20:05:12.322] [trace] [default] - ←[39mretry count = 1 2015-05-14t16:05:13.32-0400 [app/0] out ←[34m[2015-05-14 20:05:13.328] [trace] [default] - ←[39mconnected......: 2015-05-14t16:05:13.32-0400 [app/0] out subscription count = 1
after step 5 after error happens, see following error:
2015-05-14t16:05:17.35-0400 [app/0] out ←[34m[2015-05-14 20:05:17.355] [trace] [default] - ←[39m1 iot-2/type/+/id//evt/+/fmt/json 2015-05-14t16:05:17.35-0400 [app/0] out 14 may 20:05:17 - [red] uncaught exception: 2015-05-14t16:05:17.35-0400 [app/0] out 14 may 20:05:17 - error: method cannot called until mqtt client has been initialized (see connectmqtt() method) 2015-05-14t16:05:17.35-0400 [app/0] out @ iotappclient.checkmqtt (/home/vcap/app/node_modules/node-red-contrib-scx-ibmiotapp/node_modules/iotclient/application/iotappclient. js:340:9) 2015-05-14t16:05:17.35-0400 [app/0] out @ mqttclient.<anonymous> (/home/vcap/app/node_modules/node-red-contrib-scx-ibmiotapp/node_modules/iotclient/application/iotappclient. js:120:9) 2015-05-14t16:05:17.35-0400 [app/0] out @ mqttclient.emit (events.js:117:20) 2015-05-14t16:05:17.35-0400 [app/0] out @ mqttclient._handleconnack (/home/vcap/app/node_modules/node-red-contrib-scx-ibmiotapp/node_modules/iotclient/node_modules/mqtt/lib/ client.js:521:10) 2015-05-14t16:05:17.35-0400 [app/0] out @ connection.<anonymous> (/home/vcap/app/node_modules/node-red-contrib-scx-ibmiotapp/node_modules/iotclient/node_modules/mqtt/lib/cli ent.js:191:10) 2015-05-14t16:05:17.35-0400 [app/0] out @ connection.emit (events.js:95:17) 2015-05-14t16:05:17.35-0400 [app/0] out @ connection._write (/home/vcap/app/node_modules/node-red-contrib-scx-ibmiotapp/node_modules/iotclient/node_modules/mqtt/lib/connecti on.js:176:12) 2015-05-14t16:05:17.35-0400 [app/0] out @ dowrite (_stream_writable.js:226:10) 2015-05-14t16:05:17.35-0400 [app/0] out @ writeorbuffer (_stream_writable.js:216:5) 2015-05-14t16:05:17.35-0400 [app/0] out @ connection.writable.write (_stream_writable.js:183:11) 2015-05-14t16:05:17.35-0400 [app/0] out @ write (_stream_readable.js:602:24) 2015-05-14t16:05:17.35-0400 [app/0] out @ flow (_stream_readable.js:611:7) 2015-05-14t16:05:17.38-0400 [app/0] err 2015-05-14t16:05:17.41-0400 [rtr] out testiotsd.mybluemix.net - [14/05/2015:20:04:40 +0000] "get /red/comms http/1.1" 101 0 "-" "mozilla/5.0 (windows nt 6.1; wow64; rv:31.0) ge cko/20100101 firefox/31.0" 75.126.70.46:60509 x_forwarded_for:"75.126.70.46" vcap_request_id:231a532e-d89e-4236-49e7-7d00a803cd18 response_time:missingfinishedat app_id:4cc323b6-d2 48-4fd3-b8ac-c046539a6c2b 2015-05-14t16:05:17.48-0400 [api] out app instance exited guid 4cc323b6-d248-4fd3-b8ac-c046539a6c2b payload: {"cc_partition"=>"default", "droplet"=>"4cc323b6-d248-4fd3-b8a c-c046539a6c2b", "version"=>"2778c52b-ac6d-4845-8077-761927982233", "instance"=>"288976a131434a34b033c7d1fd0e812e", "index"=>0, "reason"=>"crashed", "exit_status"=>1, "exit_descrip tion"=>"app instance exited", "crash_timestamp"=>1431633917}
now if restart app works fine. can recreate above scenario consistently every time these steps:
- create new app boilerplate
- go nodered editor
- configure iot in-node
- deploy
- get error
- stop , start runtime
- all works
need figuring out why happening , how prevent it.
thanks
shahir
permanent fix has been uploaded in npmjs , internet of things foundation starter boilerplate of bluemix, resolves issue.
Comments
Post a Comment