Java 积云度';s rasberrypi';s";c8y代理.sh“;文件不工作
我正在尝试将我的cumulocity rpi代理连接到cumulocity,这样我可以有两个选项,接受或取消。但只有当我使用Java 积云度';s rasberrypi';s";c8y代理.sh“;文件不工作,java,linux,bash,shell,cumulocity,Java,Linux,Bash,Shell,Cumulocity,我正在尝试将我的cumulocity rpi代理连接到cumulocity,这样我可以有两个选项,接受或取消。但只有当我使用sh命令执行sh c8y agent debug.sh此文件时,此选项才可用。我遵循以下步骤 1) wget http://resources.cumulocity.com/examples/cumulocity-rpi-agent-latest.deb 2) sudo dpkg -i cumulocity-rpi-agent-latest.deb 以及: 以及: #!
sh
命令执行sh c8y agent debug.sh
此文件时,此选项才可用。我遵循以下步骤
1) wget http://resources.cumulocity.com/examples/cumulocity-rpi-agent-latest.deb
2) sudo dpkg -i cumulocity-rpi-agent-latest.deb
以及:
以及:
#!/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
这是c8y-agent-debug.sh脚本
I使用sh c8y-agent-debug.sh
或bash c8y-agent-debug.sh执行此文件,但不执行文件事件回显语句
我是否需要设置与java相关的内容。Java已经安装。该java-cp
命令是否需要任何其他设置。Java安装在此路径上的/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/
上。这是在linux上实现的javac
和java
命令运行良好我不确定是否准确理解了这个问题,但这里有一些信息:代理是后台服务,安装后直接运行。如果它没有运行(请尝试“ps”),则可能是配置有问题。在这种情况下,您可以通过查看系统日志来了解它。它不会将任何内容打印到控制台,因为它在后台运行。我对调试感到困惑。我不知道如何调试它在系统日志所在的终端上没有显示任何错误
#!/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