【问题标题】:Fatal error when starting orion context broker启动 Orion 上下文代理时出现致命错误
【发布时间】:2019-05-24 11:50:09
【问题描述】:

我的 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 commannd 给出这条消息

[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 是否正在运行并且运行正常。 更新 通过一些搜索,我意识到我必须终止进程的 pid,在我这样做之后,服务根据消息成功启动,但我发现它实际上并没有工作。当我询问状态时,我得到以下信息:

[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  ]

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

【问题讨论】:

  • 一般在得到error starting REST interface的时候,是因为已经有broker在运行,也就是说端口已经被占用了。确保没有代理已经在运行。如果没有,请尝试打开所有跟踪(-t 0-255 -logLevel DEBUG),我们再看看(添加到 /etc/init.d/contextBroker 中的 DAEMON_ARGS)。
  • 正如@kzangeli 提到的,提到的问题是因为 contextBroker 已经在运行。有关详细信息,请参阅此answer
  • @kzangeli 你是对的。我认为您的评论应该复制粘贴到问题的实际答案中。
  • 最后我只是创建了一个新的虚拟机并在那里安装了 orion,所以我实际上不知道这些是否能解决它。

标签: daemon systemd fiware fiware-orion


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多