EricssonResearch / calvin-base

Calvin is an application environment that lets things talk to things, among other things.
Apache License 2.0
282 stars 91 forks source link

Calvin installation errors: modules missing and failed to initialize libdc1394 #74

Closed peiworld closed 6 years ago

peiworld commented 7 years ago

I have a fresh installation Calvin and try to run the Philips Hue example. But I ran into the following problems. I have similar problems with missing modules in other installation as well. Please suggest how I can fix them.

root@7637100d6eec:/calvin-base/calvin/examples/hue# csruntime --host localhost FlashingStopLight.calvin 2017-07-02 23:09:04,934 INFO 336-calvin.calvin.runtime.north.certificate_authority.certificate_authority: init, _sec_conf=None 2017-07-02 23:09:04,935 INFO 336-calvin.calvin.runtime.north.authentication.authentication: Missing or incomplete security config 2017-07-02 23:09:04,942 INFO 336-calvin.calvin.runtime.north.storage: #### STORAGE TYPE dht #### 2017-07-02 23:09:05,074 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.web.twitter' not available: No module named tweepy 2017-07-02 23:09:05,076 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.opcua.server' not available: No module named opcua 2017-07-02 23:09:05,077 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.sensors.kubectl' not available: cannot import name kubectl 2017-07-02 23:09:05,082 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.sensors.distance' not available: cannot import name distance 2017-07-02 23:09:05,083 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.sensors.rotary_encoder' not available: cannot import name rotary_encoder libdc1394 error: Failed to initialize libdc1394 2017-07-02 23:09:05,210 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.media.image' not available: No module named PIL 2017-07-02 23:09:05,213 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.opcua.client' not available: No module named opcua 2017-07-02 23:09:05,214 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.sensors.rfid' not available: cannot import name rfid 2017-07-02 23:09:05,215 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.sensors.environmental' not available: cannot import name environmental 2017-07-02 23:09:05,216 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.media.mediaplayer' not available: No module named PIL 2017-07-02 23:09:05,218 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.charts.chart_handler' not available: cannot import name chart 2017-07-02 23:09:05,218 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.sensors.enclosure' not available: cannot import name enclosure 2017-07-02 23:09:05,220 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.io.gpiohandler' not available: cannot import name gpiopin 2017-07-02 23:09:05,221 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.network.mqtthandler' not available: cannot import name mqtt 2017-07-02 23:09:05,222 INFO 336-calvin.calvin.calvinsys: Module 'calvinsys.media.camerahandler' not available: No module named PIL 2017-07-02 23:09:05,288 INFO 336-calvin.calvin.runtime.north.calvincontrol: Control API trying to listening on: localhost:5001 2017-07-02 23:09:05,534 INFO 336-calvin.calvin.calvinsys.network.httpclienthandler: Started HTTPClientHandler DEPLOY STATUS 200, OK Deployed application 93dee86e-cbd9-42f1-9c46-5114bceeac03 2017-07-02 23:09:07,699 INFO 336-calvin.calvin.runtime.north.calvin_node: Quitting node "['calvinip://localhost:5000']"

olaan commented 7 years ago

Hey,

Two things:

  1. The 'not available' messages are usually not a problem unless the capabilities are needed by an application. In this case, only the HTTPClientHandler is needed, and it appears to load correctly.
  2. When deploying a script directly when starting a csruntime add the --keepalive flag to the command line, otherwise the script will exit after a few seconds.

Since the develop branch is a bit more up to date, have a look at the same example on that branch and see if it solves your problems.

Cheers.

olaan commented 6 years ago

I'm closing this issue now. If you have further questions, feel free to open a new one.

Cheers.