problem running start-agent.sh

problem running start-agent.sh

I have booted into Galileo using the SD card image downloaded from SD card (200MB Zipped).

Tried to run the start-agent.sh script in /usr/lib/node_modules/iotkit-agent/ directory, but the following error appear: "forever: command not found"

--------

root@clanton:~# cd /usr/lib/node_modules/iotkit-agent/
root@clanton:/usr/lib/node_modules/iotkit-agent# ./start-agent.sh

============================================
 IoT Kit Agent
============================================
./start-agent.sh: line 17: forever: command not found
done

-------

Zone: 

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

please run the agent from /usr/bin/iotkit-agent. Note it's probably already running so do a `killall node` first & make sure your date/time is correct.

There is no /usr/bin/iotkit-agent directory. I am using the original image downloaded without any changes.

Should I install the iotkit agent first?

Quote:

Eng Kean Lee (Intel) wrote:

There is no /usr/bin/iotkit-agent directory. I am using the original image downloaded without any changes.

Should I install the iotkit agent first?

My bad, had a quick look and that simlink isn't there in those old images :) Just follow what the init script does:

NODEJS="/usr/lib/node_modules"
cd ${NODEJS}/iotkit-agent/
${NODEJS}/forever/bin/forever start -m 1 \
              -a -l "/tmp/forever.log" \
              --sourceDir ${NODEJS}/iotkit-agent \
              --minUptime 1s \
              --spinSleepTime 3s agent.js

so node agent.js from /usr/lib/node_modules should be what you run. start-iotkit script is from upstream and is not tailored to work on our images.

Cheers

Hi Brendan,

if you call the current downloadable images "old images" - what are the right "new images"? where to get them?

Cheers,
Matthias

when you said "start-iotkit script is from upstream", what do you mean by upstream?

How to relate this iotkit-agent on Galileo and the enableiot.com cloud hosting?

Thanks.

Quote:

Eng Kean Lee (Intel) wrote:
when you said "start-iotkit script is from upstream", what do you mean by upstream?

How to relate this iotkit-agent on Galileo and the enableiot.com cloud hosting?

This is upstream for the enableiot.com client:

https://github.com/enableiot/

https://github.com/enableiot/iotkit-agent

https://github.com/enableiot/iotkit-samples

Quote:

matthias-hahn (Intel) wrote:
if you call the current downloadable images "old images" - what are the right "new images"? where to get them?

You build them from git :) http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-iot-devkit/log/?h=d...

Quote:

Brendan Le Foll (Intel) wrote:

You build them from git :) http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-iot-devkit/log/?h=d...

how do I see on git whether it's a daily version or a tested version? Referring to the actual full images as "old images" I assume there is at least a release candidate snapshot? Is there a specific git branch for those?

I ran into a similar issue as the original poster.   What fixed it for me was to run the following:

npm install forever -g

it seems this step was skipped when i ran setup-agent.sh

 

 

Leave a Comment

Please sign in to add a comment. Not a member? Join today