HEADS-project / training

Training material to get started with the HEADS technologies
10 stars 16 forks source link

Unable to run kevoree-js-comp-mqttsubclient #88

Closed magnustellu closed 8 years ago

magnustellu commented 8 years ago

Cloned https://github.com/kevoree/kevoree-js-comp-mqttsubclient.git. Ran

npm i
grunt kevoree

Failed with error:

13:07:25  DEBUG  AddBinding       output /nodes[node0]/components[subClient]/required[onMsg] <-> /hubs[chan]
13:07:25  DEBUG  AddBinding       input /nodes[node0]/components[printer]/provided[input] <-> /hubs[chan]
13:07:25  DEBUG  UpdateDictiona.  node0.logLevel = INFO
13:07:25  DEBUG  UpdateDictiona.  subClient.host = mqtt.kevoree.org
13:07:25  DEBUG  UpdateDictiona.  subClient.port = 81
13:07:25  DEBUG  UpdateDictiona.  subClient.topic = mytopic
13:07:25  DEBUG  StartInstance    /nodes[node0]/components[printer]
13:07:25  DEBUG  StartInstance    /hubs[chan]
13:07:25  INFO   WSGroup          "sync" listen on 9000
13:07:25  DEBUG  StartInstance    /groups[sync]
13:07:25  ERROR  KevoreeCore      Error: Something went wrong while processing adaptations.
MQTTChannel error: unable to create MQTT client with given attributes (host: mqtt.kevoree.org, port: 81, topic: mytopic)
    at PseudoClass.AbstractComponent.extend.start (/home/magnus/Documents/heads-git/kevoree-js-comp-mqttsubclient/.deploy_units/node0/node_modules/kevoree-comp-mqttsubclient/lib/MQTTSubClient.js:69:18)
    at PseudoClass.Class.__start__ (/home/magnus/Documents/heads-git/kevoree-js-comp-mqttsubclient/.deploy_units/node0/node_modules/kevoree-entities/lib/KevoreeEntity.js:62:14)
    at PseudoClass.KevoreeEntity.extend.__start__ (/home/magnus/Documents/heads-git/kevoree-js-comp-mqttsubclient/.deploy_units/node0/node_modules/kevoree-entities/lib/AbstractComponent.js:23:14)
    at PseudoClass_setStaticSuper [as __start__] (/home/magnus/Documents/heads-git/kevoree-js-comp-mqttsubclient/.deploy_units/node0/node_modules/pseudoclass/source/Class.js:126:19)
    at PseudoClass.AdaptationPrimitive.extend.execute (/home/magnus/Documents/heads-git/kevoree-js-comp-mqttsubclient/.deploy_units/node0/node_modules/kevoree-node-javascript/lib/adaptations/StartInstance.js:52:30)
    at executeCommand (/home/magnus/Documents/heads-git/kevoree-js-comp-mqttsubclient/node_modules/grunt-kevoree/node_modules/kevoree-core/kevoree-core.js:163:41)
    at /home/magnus/Documents/heads-git/kevoree-js-comp-mqttsubclient/node_modules/grunt-kevoree/node_modules/async/lib/async.js:181:20
    at iterate (/home/magnus/Documents/heads-git/kevoree-js-comp-mqttsubclient/node_modules/grunt-kevoree/node_modules/async/lib/async.js:262:13)
    at /home/magnus/Documents/heads-git/kevoree-js-comp-mqttsubclient/node_modules/grunt-kevoree/node_modules/async/lib/async.js:274:29
    at /home/magnus/Documents/heads-git/kevoree-js-comp-mqttsubclient/node_modules/grunt-kevoree/node_modules/async/lib/async.js:44:16
13:07:25  WARN   KevoreeCore      Shutting down Kevoree because first deployment failed...
13:07:25  DEBUG  KevoreeCore      Deploy process started...
13:07:25  INFO   KevoreeCore      Model deployed successfully: 0 adaptations (2ms)
Core.processScriptQueue...
13:07:25  INFO   KevoreeCore      Platform stopped: node0

Done, without errors.

Either I have done something wrong with my new ubuntu installation or there is something mysterious.

maxleiko commented 8 years ago

I have the same issue. I'm investigating

maxleiko commented 8 years ago

Ok, problems comes from a modification I've made with the kevoree-entities Dictionary attribute helpers. Fixed in v2.0.1.

Sorry

maxleiko commented 8 years ago

Same goes for the Publish client. I'm releasing the v2.0.1 right now.

magnustellu commented 8 years ago

Worked for me now, thanks.