1

My Rudder server is working great, but every 5 minutes or so, I'm kicked-out of my HTML session, and a ""Rudder is loading, please wait" screen appears. After some time, I can use it again normally.

How I stop that behavior to happen ?

2
  • I found it a little bit funny that you say it's working great, even though it restarts every 5 min
    – Petter H
    Oct 10, 2014 at 19:17
  • 1
    @PetterH: sorry, that must be my English, maybe "great" was not the best translation. I wanted to say that the web interface works, you can connect to it, use it etc as if everything was working as expected, and then it restarts.
    – fanf42
    Oct 13, 2014 at 13:49

1 Answer 1

3

Rudder has a configuration rule on the server that's saying "the rudder server must be up and accessible. If not, try to restart it". and by default, the agent check rules every 5 minutes.

The rule is checked by accessing URL http://localhost:8080/rudder/api/status and expecting a "OK" text response with 200 OK status.

So, to validate that the problem is linked to that rule, you can try to execute the following command as root on the Rudder server:

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

And ckeck if there is something like that in the output:

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 !

If so, after Rudder restarted, execute the following command by hand:

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

If that fails to return "HTTP/1.1 200 OK" and "OK", there is something forbidding the test to succeed. The most likelly case to check are:

  • did you change the "rudder.rest.allowNonAuthenticatedUser" value in config file /opt/rudder/etc/rudder-web.properties ? It is necessary to have it to "true" if you don't wan't to change other things.
  • do you have some firewall filtering connection from localhost to itself ?
  • perhaps it is something about IPv6 localhost not resolving correctly.

For that last case: Java try very hard to use IPv6 over IPv4, so if you have in /etc/hosts:

 ::1     localhost

It could lead to the problem. Try changing that to:

::1     ip6-localhost

And check that you have a line looking like:

127.0.0.1       localhost

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .