我安装了新版本的ContextBroker:
curl localhost:1026 / version
{
"orion" :
{
"version" : "1.2.1",
"uptime" : "0 d, 0 h, 7 m, 58 s",
"git_hash" : "af44fd1fbdbbfd28d79ef4f929e871e515b5452e",
"compile_time" : "Thu Jun 16 15:46:51 CEST 2016",
"compiled_by" : "fermin",
"compiled_in" : "centollo"
}
}
然后我安装了watchdog并验证文件/var/log/contextBroker/monitBROKER.log,我遇到以下错误:
error : 'contextBroker' failed to start (exit status 1) -- /etc/init.d/contextBroker: Starting...
contextBroker está parado
Starting contextBroker... pidfile not found[FALLÓ]
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
info : 'localhost' exec: /etc/init.d/contextBroker
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=19.5 kB]
debug : pidfile '/var/log/contextBroker/contextBroker.pid' does not exist
error : 'contextBroker' process is not running
info : 'contextBroker' trying to restart
debug : pidfile '/var/log/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/log/contextBroker/contextBroker.pid' does not exist
info : 'contextBroker' start: /etc/init.d/contextBroker
debug : pidfile '/var/log/contextBroker/contextBroker.pid' does not exist
debug : Starting...
contextBroker está parado
Starting contextBroker... pidfile not found[FALLÓ]
debug : pidfile '/var/log/contextBroker/contextBroker.pid' does not exist
防止看门狗的操作。
你能告诉我怎么修理它吗?
这是命令执行contextBroker(以粗体显示创建PID文件的文件夹):
/ usr / bin / contextBroker -port 1026 -logDir / var / log / contextBroker -pidpath /var/run/contextBroker/contextBroker.pid -dbhost localhost -db orion -multiservice
我如何修改它来创建应该在哪里的PID文件?
或者应该修改看门狗的配置以指向该文件夹?
我修改了监视程序的配置,修改了monitBROKER.conf文件以指向文件夹/ var / run / contextBroker /
按照fgalan指示的步骤,我完成了#34;完全重置"。
如果首先运行脚本看门狗并观察其日志:
info : Starting Monit 5.14 daemon
info : 'ServidorCaptura.guest.domain' Monit 5.14 started
debug : Socket test failed for [::1]:1026 -- Connection refused
debug : Socket test failed for [127.0.0.1]:1026 -- Connection refused
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- Connection refused
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=464 B]
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
error : 'contextBroker' process is not running
info : 'contextBroker' trying to restart
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
info : 'contextBroker' start: /etc/init.d/contextBroker
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : Starting...
contextBroker está parado
Starting contextBroker... [ OK ]
debug : 'contextBroker' started
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=1.9 kB]
info : 'contextBroker' process is running with pid 1493
debug : 'contextBroker' zombie check succeeded
debug : 'contextBroker' total mem amount check succeeded [current total mem amount=3.3 MB]
debug : 'contextBroker' cpu usage check succeeded [current cpu usage=0.0%]
debug : 'contextBroker' cpu usage check succeeded [current cpu usage=0.0%]
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
info : 'localhost' exec: /etc/init.d/contextBroker
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=3.1 kB]
debug : 'contextBroker' process is running with pid 1493
debug : 'contextBroker' zombie check succeeded
debug : 'contextBroker' total mem amount check succeeded [current total mem amount=3.8 MB]
debug : 'contextBroker' cpu usage check succeeded [current cpu usage=0.0%]
debug : 'contextBroker' cpu usage check succeeded [current cpu usage=0.0%]
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
info : 'localhost' exec: /etc/init.d/contextBroker
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=4.3 kB]
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
error : 'contextBroker' process is not running
info : 'contextBroker' trying to restart
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
info : 'contextBroker' start: /etc/init.d/contextBroker
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : Starting...
contextBroker está parado
Starting contextBroker... pidfile not found[FALLÓ]
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
error : 'contextBroker' failed to start (exit status 1) -- /etc/init.d/contextBroker: Starting...
contextBroker está parado
Starting contextBroker... pidfile not found[FALLÓ]
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
info : 'localhost' exec: /etc/init.d/contextBroker
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=9.0 kB]
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
error : 'contextBroker' process is not running
info : 'contextBroker' trying to restart
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
info : 'contextBroker' start: /etc/init.d/contextBroker
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : Starting...
contextBroker está parado
Starting contextBroker... pidfile not found[FALLÓ]
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
...
或者,如果您第一次启动Context Broker:/etc/init.d/contextBroker start,则在/ var / run / contextBroker /文件夹中创建PID文件,然后运行脚本看门狗并观察后者的日志:
debug : pidfile '/var/log/contextBroker/monit.pid' does not exist
info : Starting Monit 5.14 daemon
info : 'ServidorCaptura.guest.domain' Monit 5.14 started
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=664 B]
debug : 'contextBroker' process is running with pid 2299
debug : 'contextBroker' zombie check succeeded
debug : 'contextBroker' total mem amount check succeeded [current total mem amount=5.3 MB]
debug : 'contextBroker' cpu usage check skipped (initializing)
debug : 'contextBroker' cpu usage check skipped (initializing)
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=1.7 kB]
debug : 'contextBroker' process is running with pid 2299
debug : 'contextBroker' zombie check succeeded
debug : 'contextBroker' total mem amount check succeeded [current total mem amount=5.8 MB]
debug : 'contextBroker' cpu usage check succeeded [current cpu usage=0.0%]
debug : 'contextBroker' cpu usage check succeeded [current cpu usage=0.0%]
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
info : 'localhost' exec: /etc/init.d/contextBroker
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=2.9 kB]
debug : 'contextBroker' process is running with pid 2299
debug : 'contextBroker' zombie check succeeded
debug : 'contextBroker' total mem amount check succeeded [current total mem amount=5.9 MB]
debug : 'contextBroker' cpu usage check succeeded [current cpu usage=0.0%]
debug : 'contextBroker' cpu usage check succeeded [current cpu usage=0.0%]
debug : Socket test failed for [::1]:1026 -- Connection refused
debug : Socket test failed for [127.0.0.1]:1026 -- Connection refused
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- Connection refused
info : 'localhost' exec: /etc/init.d/contextBroker
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=4.0 kB]
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
error : 'contextBroker' process is not running
info : 'contextBroker' trying to restart
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
info : 'contextBroker' start: /etc/init.d/contextBroker
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : Starting...
contextBroker está parado
Starting contextBroker... [ OK ]
debug : 'contextBroker' started
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
info : 'localhost' exec: /etc/init.d/contextBroker
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=5.5 kB]
info : 'contextBroker' process is running with pid 2386
debug : 'contextBroker' zombie check succeeded
debug : 'contextBroker' total mem amount check succeeded [current total mem amount=3.3 MB]
debug : 'contextBroker' cpu usage check succeeded [current cpu usage=0.0%]
debug : 'contextBroker' cpu usage check succeeded [current cpu usage=0.0%]
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
info : 'localhost' exec: /etc/init.d/contextBroker
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=6.7 kB]
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
error : 'contextBroker' process is not running
info : 'contextBroker' trying to restart
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
info : 'contextBroker' start: /etc/init.d/contextBroker
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : Starting...
contextBroker está parado
Starting contextBroker... pidfile not found[FALLÓ]
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
error : 'contextBroker' failed to start (exit status 1) -- /etc/init.d/contextBroker: Starting...
contextBroker está parado
Starting contextBroker... pidfile not found[FALLÓ]
debug : Socket test failed for [::1]:1026 -- HTTP error: Regular expression doesn't match: No match
debug : Socket test failed for [127.0.0.1]:1026 -- HTTP error: Regular expression doesn't match: No match
error : 'localhost' failed protocol test [HTTP] at [localhost]:1026/version [TCP/IP] -- HTTP error: Regular expression doesn't match: No match
info : 'localhost' exec: /etc/init.d/contextBroker
debug : 'monitBROKER.log' file exists
debug : 'monitBROKER.log' is a regular file or socket
debug : 'monitBROKER.log' size check succeeded [current size=11.5 kB]
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
error : 'contextBroker' process is not running
info : 'contextBroker' trying to restart
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
info : 'contextBroker' start: /etc/init.d/contextBroker
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : Starting...
contextBroker está parado
Starting contextBroker... pidfile not found[FALLÓ]
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
debug : pidfile '/var/run/contextBroker/contextBroker.pid' does not exist
...
答案 0 :(得分:0)
我建议进行"完全重置",然后再试一次。
完全重置"我的意思是确保CB被停止并且所有正在运行的工件都被删除。特别是(以root身份或使用sudo命令):
/etc/init.d/contextBroker stop
ps ax | grep contextBroker
一起运行。如果流程仍然存在,请使用kill
命令(如果前者不起作用,则kill -9
)停止。/var/log/contextBroker/contextBroker.pid
文件。编辑:要更改PID文件,请编辑/ etc / sysconfig / contextBroker中的BROKER_PID_FILE变量,然后重新启动该服务。