启动Orion上下文代理时发生致命错误

时间:2019-05-24 11:50:10

标签: daemon systemd fiware fiware-orion

我的Orion上下文代理无法启动,当我输入命令时 /etc/init.d/contextBroker start我收到此消息

[root@context-broker ~]# /etc/init.d/contextBroker start
Starting contextBroker (via systemctl):  Job for contextBroker.service failed because the control process exited with error code. See "systemctl status contextBroker.service" and "journalctl -xe" for details.
                                                           [FAILED]

systemctl status contextBroker.service命令发出此消息

[root@context-broker ~]# systemctl status contextBroker.service
● contextBroker.service - LSB: run contextBroker
   Loaded: loaded (/etc/rc.d/init.d/contextBroker; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2019-05-24 11:38:50 UTC; 1min 11s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 9782 ExecStart=/etc/rc.d/init.d/contextBroker start (code=exited, status=1/FAILURE)

May 24 11:38:47 context-broker.novalocal systemd[1]: Starting LSB: run contextBroker...
May 24 11:38:48 context-broker.novalocal contextBroker[9782]: contextBroker is stopped
May 24 11:38:48 context-broker.novalocal contextBroker[9782]: Starting...
May 24 11:38:48 context-broker.novalocal su[9788]: (to orion) root on none
May 24 11:38:50 context-broker.novalocal contextBroker[9782]: Starting contextBroker...                         cat: /var/run/contextBroker/contextBroker.pid...irectory
May 24 11:38:50 context-broker.novalocal systemd[1]: contextBroker.service: control process exited, code=exited status=1
May 24 11:38:50 context-broker.novalocal contextBroker[9782]: pidfile not found[FAILED]
May 24 11:38:50 context-broker.novalocal systemd[1]: Failed to start LSB: run contextBroker.
May 24 11:38:50 context-broker.novalocal systemd[1]: Unit contextBroker.service entered failed state.
May 24 11:38:50 context-broker.novalocal systemd[1]: contextBroker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

/tmp/contextBroker.log文件也是如此

time=2019-05-24T11:41:12.971Z | lvl=FATAL | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[1753]:restStart | msg=Fatal Error (error starting REST interface)

我检查了mongodb是否正在运行,并且它是否正确运行。 更新 通过一些搜索,我意识到我必须杀死该进程的进程,并且在完成该服务之后,根据消息消息,该服务成功启动,但是我发现它实际上并没有起作用。当我询问状态时,会得到以下信息:

[root@context-broker centos]# /etc/init.d/contextBroker status
● contextBroker.service - LSB: run contextBroker
   Loaded: loaded (/etc/rc.d/init.d/contextBroker; bad; vendor preset: disabled)
   Active: active (exited) since Sun 2019-05-26 18:34:49 UTC; 4min 56s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 16295 ExecStop=/etc/rc.d/init.d/contextBroker stop (code=exited, status=0/SUCCESS)
  Process: 16319 ExecStart=/etc/rc.d/init.d/contextBroker start (code=exited, status=0/SUCCESS)

May 26 18:34:47 context-broker.novalocal systemd[1]: Starting LSB: run contextBroker...
May 26 18:34:47 context-broker.novalocal contextBroker[16319]: contextBroker is stopped
May 26 18:34:47 context-broker.novalocal contextBroker[16319]: Starting...
May 26 18:34:47 context-broker.novalocal su[16325]: (to orion) root on none
May 26 18:34:49 context-broker.novalocal systemd[1]: Started LSB: run contextBroker.
May 26 18:34:49 context-broker.novalocal contextBroker[16319]: Starting contextBroker...                         [  OK  ]

日志文件具有与以前相同的消息。 通过再次搜索,我相信原因是该服务没有守护程序(??)。那么如果是这种情况,我该如何添加一个?

1 个答案:

答案 0 :(得分:0)

通常在启动REST接口时出现错误时,这是​​因为已经在运行代理,这意味着该端口已被占用。确保没有任何代理正在运行。