为什么我的舵机每5分钟重新启动一次?

我的方向舵服务器工作的很好,但是每隔5分钟左右,我就会被踢出HTML会话,并且出现一个“方向舵正在加载,请稍候”的屏幕,经过一段时间后,我可以正常使用它。

我如何阻止这种行为发生?

Rudder在服务器上有一个configuration规则,表示“方向舵服务器必须启动并且可以访问,如果没有,请尝试重新启动”。 并且默认情况下,代理每5分钟检查一次规则。

该规则通过访问URL http://localhost:8080/rudder/api/status ,预期“OK”文本响应的状态为200 OK。

因此,要validation问题是否与该规则相关联,可以尝试在Rudder服务器上以root身份执行以下命令:

  $ /var/rudder/cfengine-community/bin/cf-agent -KI 

如果在输出中有类似的东西,

 2014-10-07T10:06:03+0200 info: /default/root_component_check/methods/'any'/default/generic_alive_check/commands/'/usr/bin/curl -s http://localhost:8080/rudder/api/status |/bin/grep -q OK'[0]: Executing 'no timeout' ... '/usr/bin/curl -s http://localhost:8080/rudder/api/status |/bin/grep -q OK' 2014-10-07T10:06:03+0200 error: /default/root_component_check/methods/'any'/default/generic_alive_check/commands/'/usr/bin/curl -s http://localhost:8080/rudder/api/status |/bin/grep -q OK'[0]: Finished command related to promiser '/usr/bin/curl -s http://localhost:8080/rudder/api/status |/bin/grep -q OK' -- an error occurred, returned 1 2014-10-07T10:06:03+0200 info: /default/root_component_check/methods/'any'/default/generic_alive_check/commands/'/usr/bin/curl -s http://localhost:8080/rudder/api/status |/bin/grep -q OK'[0]: Completed execution of '/usr/bin/curl -s http://localhost:8080/rudder/api/status |/bin/grep -q OK' R: @@server-roles@@result_error@@server-roles@@server-roles-directive@@0@@Check rudder status@@None@@2014-10-07 08:06:02+00:00##root@#The http://localhost:8080/rudder/api/status web application failed to respond for the second time. Restarting jetty NOW ! 

如果是这样,在舵重新启动后,手动执行以下命令:

 curl -v -X GET http://localhost:8080/rudder/api/status 

如果没有返回“HTTP / 1.1 200 OK”和“确定”,那么有一些东西禁止testing成功。 最有可能检查的情况是:

  • 你在configuration文件/opt/rudder/etc/rudder-web.properties中更改了“rudder.rest.allowNonAuthenticatedUser”值吗? 如果你不想改变其他的东西,就有必要把它变成“真实的”。
  • 你有一些从本地主机到自身的防火墙过滤连接?
  • 也许这是关于IPv6本地主机不能正确parsing的东西。

对于最后一种情况:Java很难在IPv4上使用IPv6,所以如果你在/ etc / hosts中:

  ::1 localhost 

这可能会导致问题。 尝试将其更改为:

 ::1 ip6-localhost 

并检查你有一条线看起来像:

 127.0.0.1 localhost