fiware - 无法使用 2 个实例作为服务启动 Cygnus
问题描述
我已经使用他们的代理配置了 2 个 cygnus 实例,但是当我将 cygnus 作为服务启动时,我收到以下错误:
sudo service cygnus start
Starting cygnus (via systemctl): Job for cygnus.service failed because the control process exited with error code. See "systemctl status cygnus.service" and "journalctl -xe" for details.
[FAILED]
此外,当我运行"systemctl status cygnus.service"
命令时,我得到以下输出:
[root@orion conf]# systemctl status cygnus.service
● cygnus.service - SYSV: cygnus
Loaded: loaded (/etc/rc.d/init.d/cygnus; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2019-09-16 00:01:02 UTC; 18s ago
Docs: man:systemd-sysv-generator(8)
Process: 14719 ExecStart=/etc/rc.d/init.d/cygnus start (code=exited, status=2)
Sep 16 00:01:00 orion.novalocal cygnus[14719]: rm: cannot remove ‘/var/run/cygnus/cygnus_1.pid’: No such file or directory
Sep 16 00:01:00 orion.novalocal su[14766]: (to cygnus) root on none
Sep 16 00:01:00 orion.novalocal cygnus[14719]: Starting Cygnus test... bash: /var/run/cygnus/cygnus_test.pid: No such file or directory
Sep 16 00:01:02 orion.novalocal cygnus[14719]: cat: /var/run/cygnus/cygnus_test.pid: No such file or directory
Sep 16 00:01:02 orion.novalocal cygnus[14719]: [FAILED]
Sep 16 00:01:02 orion.novalocal cygnus[14719]: rm: cannot remove ‘/var/run/cygnus/cygnus_test.pid’: No such file or directory
Sep 16 00:01:02 orion.novalocal systemd[1]: cygnus.service: control process exited, code=exited status=2
Sep 16 00:01:02 orion.novalocal systemd[1]: Failed to start SYSV: cygnus.
Sep 16 00:01:02 orion.novalocal systemd[1]: Unit cygnus.service entered failed state.
Sep 16 00:01:02 orion.novalocal systemd[1]: cygnus.service failed.
/var/run/cygnus/
路径中的 pid 文件似乎有问题。这些也是 2 个配置的实例:cygnus_instance_test.conf:
CYGNUS_USER=cygnus
CONFIG_FOLDER=/usr/cygnus/conf
CONFIG_FILE=/usr/cygnus/conf/agent_test.conf
AGENT_NAME=cygnus-ngsi
LOGFILE_NAME=cygnus.log
ADMIN_PORT=8081
POLLING_INTERVAL=30
cygnus_instance_1.conf:
CYGNUS_USER=cygnus
CONFIG_FOLDER=/usr/cygnus/conf
CONFIG_FILE=/usr/cygnus/conf/agent_1.conf
AGENT_NAME=cygnus-ngsi
LOGFILE_NAME=cygnus.log
ADMIN_PORT=8081
POLLING_INTERVAL=30
解决方案
看来您没有 /var/run/cygnus 目录
推荐阅读
- mysql - 如何使用从 Squalize 生成的模型获取关联数据?
- java - 在 IntelliJ 中找不到 GsonBuilder 的方法“setLenient”
- azure - 查找 kusto 查询的开始和结束时间(或时间跨度)在 azure log analytics 上运行?
- django - Django REST 和 React 实现模型
- reactjs - React 事件处理程序在没有 bind() 的情况下工作
- spring-mvc - 将 Spring MVC 与 Wildfly 安全域和 Java 安全集成
- java - 如何让 this.name 在值对象构造函数的类定义中工作?
- javascript - 如何在地图函数中合并 React TableCells?
- acumatica - 如何使自定义字段显示超过 2 个小数位
- kubernetes - 使用 LoadBalancer 服务在 Kubernetes 中公开 Kafka 集群