Software Archive
Read-only legacy content
17061 Discussions

problem running start-agent.sh

EngKean_L_Intel
Employee
676 Views

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

-------

0 Kudos
8 Replies
Brendan_L_Intel
Employee
676 Views

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.

0 Kudos
EngKean_L_Intel
Employee
676 Views

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?

0 Kudos
Brendan_L_Intel
Employee
676 Views

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

0 Kudos
Matthias_H_Intel
Employee
676 Views

Hi Brendan,

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

Cheers,
Matthias

0 Kudos
EngKean_L_Intel
Employee
676 Views

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.

0 Kudos
Brendan_L_Intel
Employee
676 Views

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

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=devkit-next

0 Kudos
Matthias_H_Intel
Employee
676 Views

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?

0 Kudos
Todd_S_Intel
Employee
676 Views

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

 

 

0 Kudos
Reply