首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不存在pidfile '/var/log/contextBroker/contextBroker.pid‘

不存在pidfile '/var/log/contextBroker/contextBroker.pid‘
EN

Stack Overflow用户
提问于 2016-07-20 09:16:19
回答 1查看 759关注 0票数 1

我安装了新版本的ContextBroker:

curl localhost:1026/版本

代码语言:javascript
复制
{
"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"
    }
}

然后我安装了看门狗并验证了/var/log/contextBroker/bankBROKER.log文件,我遇到了以下错误:

代码语言:javascript
复制
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

防止看门狗的运行。

你能告诉我怎么修吗?

编辑1

这是命令执行contextBroker (用粗体表示创建PID文件的文件夹):

/usr/bin/contextBroker -port 1026 -logDir /var/log/contextBroker -pidpath -pidpath -dbhost localhost -db orion -multiservice

我如何修改它来创建PID文件呢?

还是应该修改看门狗的配置以指向该文件夹?

编辑2

我修改了看门狗的配置,修改了monitBROKER.conf文件,指向文件夹/var/run/contextBroker/

按照fgalan指出的步骤,我做了“完全重置”。

如果一开始运行脚本监视狗并观察它们的日志:

代码语言:javascript
复制
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
...

或者,如果您首先启动上下文代理: /etc/init.d/contextBroker start,则在/var/ run /contextBroker/文件夹中创建PID文件,然后运行脚本监视狗并观察后者的日志:

代码语言:javascript
复制
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
...
EN

回答 1

Stack Overflow用户

发布于 2016-07-22 13:33:52

我建议做一次“完全重置”,然后再试一次。

通过“完全重置”,我的意思是确保CB被停止,其所有正在运行的工件都被移除。特别是(作为根命令或使用sudo命令):

  • /etc/init.d/contextBroker stop
  • 确保contextBroker不再与ps ax | grep contextBroker一起运行。如果进程仍然存在,请使用kill命令停止它(如果前者不能工作,则停止使用kill -9 )。
  • 删除任何现有的/var/log/contextBroker/contextBroker.pid文件。

编辑:为了更改PID文件,在/etc/sysconfig/contextBroker中编辑BROKER_PID_FILE变量,然后重新启动服务。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38477148

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档