我安装了天鹅座,当我点击sudo service cygnus start
时,状态就可以运行了。
但是日志文件上写着:
Warning: JAVA_HOME is not set!
+ exec /usr/bin/java -Xmx20m -Dflume.log.file=cygnus.log -cp '/usr/cygnus/conf:/usr/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/lib/*:/usr/cygnus/plugins.d/cygnus/libext/*' -Djava.library.path= es.tid.fiware.fiwareconnectors.cygnus.nodes.CygnusApplication -p 8081 -f /usr/cygnus/conf/agent_1.conf -n cygnusagent
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/cygnus/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/cygnus/plugins.d/cygnus/lib/cygnus-0.7.1-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
我检查了echo $JAVA_HOME
并得到:
/usr/lib/jvm/java-1.6.0-openjdk.x86_64
我还检查了java -version
,得到了:
java version "1.6.0_35"
OpenJDK Runtime Environment (IcedTea6 1.13.7) (rhel-1.13.7.1.el6_6-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
,所以我在这里错过了什么?
我在这里做了所有这些步骤:
安装天鹅座 打开终端,如果尚未配置FIWARE存储库,只需配置FIWARE存储库,并使用应用程序管理器安装最新版本的Cy gnus (CentOS/RedHat示例): $ sudo >/etc/yum.Storage.d/fiware.repo <64/ gpgcheck=0 enabled=1 EOL $ sudo安装天鹅座 重要说明: Cygnus基于Apache,需要安装Java。如果尚未安装,请立即执行: $ sudo安装java-1.6.0-openjdk-devel 请记住导出JAVA_HOME环境变量。在现在已经安装了Java的情况下,如上面所示,如下所示: 出口JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64 为了永久地这样做,编辑/root/..bash_profile (root用户)或/etc/profile (其他用户)。
发布于 2015-04-22 12:03:19
尽管有这样一条警告消息,但如果没有设置flume-ng
(和派生cygnus-flume-ng
)脚本,则JAVA_HOME将运行:
# find java
if [ -z "${JAVA_HOME}" ] ; then
warn "JAVA_HOME is not set!"
# Try to use Bigtop to autodetect JAVA_HOME if it's available
if [ -e /usr/libexec/bigtop-detect-javahome ] ; then
. /usr/libexec/bigtop-detect-javahome
elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ] ; then
. /usr/lib/bigtop-utils/bigtop-detect-javahome
fi
# Using java from path if bigtop is not installed or couldn't find it
if [ -z "${JAVA_HOME}" ] ; then
JAVA_DEFAULT=$(type -p java)
[ -n "$JAVA_DEFAULT" ] || error "Unable to find java executable. Is it in your PATH?" 1
JAVA_HOME=$(cd $(dirname $JAVA_DEFAULT)/..; pwd)
fi
fi
https://stackoverflow.com/questions/29796098
复制相似问题