无法将Fiware Cygnus作为服务启动

无法将Fiware Cygnus作为服务启动,fiware,fiware-cygnus,Fiware,Fiware Cygnus,我在centOS 7上使用RPM安装了fiware cygnus,但无法将其作为服务启动。我得到了以下错误: [root@localhost cygnus]# sudo service cygnus start Starting cygnus (via systemctl): Job for cygnus.service failed. See 'systemctl status cygnus.service' and 'journalctl -xn' for details.

我在centOS 7上使用RPM安装了fiware cygnus,但无法将其作为服务启动。我得到了以下错误:

[root@localhost cygnus]# sudo service cygnus start
Starting cygnus (via systemctl):  Job for cygnus.service failed. See 'systemctl status cygnus.service' and 'journalctl -xn' for details.
                                                           [ÉCHOUÉ]
    [root@localhost cygnus]# systemctl status cygnus.service -l
    cygnus.service - SYSV: cygnus
       Loaded: loaded (/etc/rc.d/init.d/cygnus)
       Active: failed (Result: exit-code) since ven. 2015-07-31 19:11:10 CEST; 2s ago
      Process: 5750 ExecStart=/etc/rc.d/init.d/cygnus start (code=exited, status=1/FAILURE)

juil. 31 19:11:08 localhost cygnus[5750]: /usr/cygnus/conf/cygnus_instance_1.conf: ligne34: mongo-channel : commande introuvable
juil. 31 19:11:08 localhost su[5756]: (to root) root on none
juil. 31 19:11:10 localhost cygnus[5750]: Starting Cygnus 1...  [ÉCHOUÉ]
juil. 31 19:11:10 localhost systemd[1]: cygnus.service: control process exited, code=exited status=1
juil. 31 19:11:10 localhost systemd[1]: Failed to start SYSV: cygnus.
juil. 31 19:11:10 localhost systemd[1]: Unit cygnus.service entered failed state.
不确定在配置文件:cygnus_instance_1.conf中放置什么作为代理名称,因为它没有重新确认代理名称

# Name of the agent. The name of the agent is not trivial, since it is the base for the Fluleters 
# naming conventions, e.g. it appears in .sources.http-source.channels=...
AGENT_NAME= mongo-channel
以下是我的完整配置文件: 天鹅座实例1.conf

#####
#
# Configuration file for apache-flume
#
#####
# Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U
# 
# This file is part of fiware-cygnus (FI-WARE project).
# 
# fiware-cygnus is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
# later version.
# fiware-cygnus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
# 
# You should have received a copy of the GNU Affero General Public License along with fiware-cygnus. If not, see
# http://www.gnu.org/licenses/.
# 
# For those usages not covered by the GNU Affero General Public License please contact with iot_support at tid dot es

# Who to run cygnus as. Note that you may need to use root if you want
# to run cygnus in a privileged port (<1024)
CYGNUS_USER=root

# Where is the config folder
CONFIG_FOLDER=/usr/cygnus/conf

# Which is the config file
CONFIG_FILE=/usr/cygnus/conf/agent_1.conf

# Name of the agent. The name of the agent is not trivial, since it is the base for the Fluleters 
# naming conventions, e.g. it appears in .sources.http-source.channels=...
AGENT_NAME= /usr/cygnus/bin/cygnus-flume-ng
#mongo-channel

# Name of the logfile located at /var/log/cygnus. It is important to put the extension '.log' in order to the log rotation works properly
LOGFILE_NAME=cygnus.log

# Administration port. Must be unique per instance
ADMIN_PORT=8081

# Polling interval (seconds) for the configuration reloading
POLLING_INTERVAL=30
@frb响应后的更新: 我更新了cygnus_instance_1.conf@frb响应,但不幸的是,我得到了以下错误:

 systemctl status cygnus.service -l
cygnus.service - SYSV: cygnus
   Loaded: loaded (/etc/rc.d/init.d/cygnus)
   Active: failed (Result: exit-code) since mer. 2015-08-05 17:22:09 CEST; 3s ago
  Process: 3338 ExecStart=/etc/rc.d/init.d/cygnus start (code=exited, status=1/FAILURE)

août 05 17:22:07 localhost cygnus[3338]: /usr/cygnus/conf/cygnus_instance_1.conf: ligne24: cygnus : commande introuvable
août 05 17:22:07 localhost cygnus[3338]: /usr/cygnus/conf/cygnus_instance_1.conf: ligne34: cygnusagent : commande introuvable
août 05 17:22:07 localhost su[3345]: (to cygnus) root on none
août 05 17:22:07 localhost cygnus[3338]: Starting Cygnus 1...  bash: /var/run/cygnus/cygnus_1.pid: Permission non accordée
août 05 17:22:09 localhost cygnus[3338]: cat: /var/run/cygnus/cygnus_1.pid: Aucun fichier ou dossier de ce type
août 05 17:22:09 localhost cygnus[3338]: [ÉCHOUÉ]
août 05 17:22:09 localhost cygnus[3338]: rm: impossible de supprimer « /var/run/cygnus/cygnus_1.pid »: Aucun fichier ou dossier de ce type
août 05 17:22:09 localhost systemd[1]: cygnus.service: control process exited, code=exited status=1
août 05 17:22:09 localhost systemd[1]: Failed to start SYSV: cygnus.
août 05 17:22:09 localhost systemd[1]: Unit cygnus.service entered failed state.
查看上面的错误,我发现它找不到文件“/var/run/cygnus/cygnus_1.pid”,因此我创建了一个空文件以绕过此错误,但我得到了一个新文件:

[root@localhost ~]# sudo systemctl start cygnus.service
Job for cygnus.service failed. See 'systemctl status cygnus.service' and 'journalctl -xn' for details.
[root@localhost ~]# sudo systemctl status cygnus.service -l
cygnus.service - SYSV: cygnus
   Loaded: loaded (/etc/rc.d/init.d/cygnus)
   Active: failed (Result: exit-code) since mer. 2015-08-05 17:24:08 CEST; 5s ago
  Process: 3445 ExecStart=/etc/rc.d/init.d/cygnus start (code=exited, status=1/FAILURE)

août 05 17:24:06 localhost systemd[1]: Starting SYSV: cygnus...
août 05 17:24:06 localhost cygnus[3445]: /usr/cygnus/conf/cygnus_instance_1.conf: ligne24: cygnus : commande introuvable
août 05 17:24:06 localhost cygnus[3445]: /usr/cygnus/conf/cygnus_instance_1.conf: ligne34: cygnusagent : commande introuvable
août 05 17:24:06 localhost su[3452]: (to cygnus) root on none
août 05 17:24:06 localhost cygnus[3445]: Starting Cygnus 1...  bash: /var/run/cygnus/cygnus_1.pid: Permission non accordée
août 05 17:24:08 localhost cygnus[3445]: [ÉCHOUÉ]
août 05 17:24:08 localhost systemd[1]: cygnus.service: control process exited, code=exited status=1
août 05 17:24:08 localhost systemd[1]: Failed to start SYSV: cygnus.
août 05 17:24:08 localhost systemd[1]: Unit cygnus.service entered failed state.

根据您的
agent\u 1.conf
配置,
cygnus\u实例\u 1.conf
中的
agent\u名称必须是
cygnusagent
。即:

AGENT_NAME = cygnusagent

此外,
CYGNUS\u用户
应该是
CYGNUS
,因为这是RPM在安装软件时创建的用户。

根据您的
agent\u 1.conf
配置,
CYGNUS\u实例\u 1.conf中的
agent\u名称
必须是
cygnusagent
。即:

AGENT_NAME = cygnusagent

此外,
CYGNUS\u用户
应该是
CYGNUS
,因为这是RPM在安装软件时创建的用户。

感谢您的回复,我更新了配置文件,但出现了新错误,我用日志编辑了我的问题。您是否将
CYGNUS\u用户
配置为
CYGNUS
?你能检查这个用户是否存在(它应该是RPM在安装时创建的)?是的,用户存在“cygnus:x:990:988:cygnus用户帐户:/home/cygnus:/bin/bash”,我可以使用“/usr/cygnus/bin/cygnus flume ng agent--conf/usr/cygnus/conf/-f/usr/cygnus/conf/agent_1.conf-n cygnusagent-Dflume.root.logger=INFO,console”,但仍然无法将其作为服务启动:(
/var/run/cygnus/cygnus_1.pid
是用户
cygnus
为应用程序写入进程ID(pid)的文件(例如,为了阻止它,这是必需的)。似乎不允许用户
cygnus
(如注释所示,它存在)写入该路径。谁是该路径的所有者,以及
/var/run/cygnus/cygnus_1.pid
?我发现cygnus_1.pid具有以下所有者和权限“-rw-r--r--.1根根0 6 aoút 09:37天鹅座1.pid“所以我把它改成了”-rwxrwx.1天鹅座0 6 aoút 09:37天鹅座1.pid“我试图重新启动天鹅座作为一个服务,但我遇到了上面提到的最后一个错误,他无法识别“天鹅座”和“天鹅座”“感谢您的回复,我更新了配置文件,但出现了新的错误,我用日志编辑了我的问题。您是否将
CYGNUS_用户
配置为
CYGNUS
?您是否可以检查此用户是否存在(安装时应已由RPM创建)?是用户存在”CYGNUS:x:990:988:CYGNUS用户帐户:/home/CYGNUS:/bin/bash”我可以使用“/usr/cygnus/bin/cygnus flume ng agent--conf/usr/cygnus/conf/-f/usr/cygnus/conf/agent_1.conf-n cygnusagent-Dflume.root.logger=INFO,console”作为依赖应用程序启动cygnus,但仍然无法将其作为服务启动:(
/var/run/cygnus/cygnus_1.pid
是用户
cygnus
为应用程序写入进程ID(pid)的文件(例如,为了停止它,这是必需的)。看起来用户
cygnus
(如注释所示,它是存在的)不允许写入该路径。谁是所有者以及
/var/run/cygnus/cygnus_1.pid
?我发现cygnus_1.pid具有以下所有者和权限“-rw-r--r--.1根根0 6 aoāt 09:37 cygnus_1.pid”,因此我将其更改为“-rwxrwrwxrwx.1 cygnus根0 6 ao t 09:37 cygnus_1.pid”我试着重新启动cygnus作为一项服务,但我得到了上面提到的最后一个错误,他无法识别“cygnus”和“cygnusagent”