0

I am trying to connect my cumulocity-rpi-agent to cumulocity so that I can have two options either accept or cancel. But this options will be available only when i execute sh c8y-agent-debug.sh this file using sh command. I followed below steps

1) wget http://resources.cumulocity.com/examples/cumulocity-rpi-agent-latest.deb
2) sudo dpkg -i cumulocity-rpi-agent-latest.deb

And:

login as: pi
pi@raspberrypi.mshome.net's password:
...

pi@raspberrypi:~ $ cd /usr/share/
pi@raspberrypi:/usr/share $ cd cu
cumulocity-rpi-agent/ cups/
pi@raspberrypi:/usr/share $ cd cumulocity-rpi-agent/
pi@raspberrypi:/usr/share/cumulocity-rpi-agent $ sh c8y-agent.sh
^C
pi@raspberrypi:/usr/share/cumulocity-rpi-agent $ sudo nano
pi@raspberrypi:/usr/share/cumulocity-rpi-agent 

And:

 #!/bin/sh
    (
    while true
    do
      echo "Running the Cumulocity Linux Agent..."
      java -cp 'cfg/*:lib/*' -Dlogback.configurationFile=cfg/logback.xml c8y.lx.age$
      sleep 1
    done
    ) 2>&1 | logger

this is c8y-agent-debug.sh script I execute this file using sh c8y-agent-debug.sh or bash c8y-agent-debug.sh but executing the file not event echo statement.

Do i need to set anything related to java. Java is already installed. Is there any additional setting required for that java -cp command. Java is installed on /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/ on this path. This is on linux. javac and java commands are working fine

jww
  • 97,681
  • 90
  • 411
  • 885
vaibhav
  • 331
  • 1
  • 4
  • 15
  • I am not sure if I understand the question exactly, but here's some information: The agent is a background service and runs directly after installation. If it is not running (try "ps"), there's probably an issue with the configuration. In that case, you can find out about it by looking into the syslog. It does not print anything to the console, since it runs in the background. – André Jul 10 '17 at 12:57
  • i am confused about debug.I don't know how to debug it does not show any error on terminal where the syslog is located – vaibhav Jul 11 '17 at 11:13

0 Answers0