Forum OpenACS Q&A: Keepalive problem

Collapse
Posted by Nima Mazloumi on
When keepalive tries to restart the server I get an email as this:

error flushing "sock12": connection refused

Any idea why this happens?

I am using SuSE Linux 9, OpenACS 5.0, dotLRN 2.0.3.

Greetings,
Nima

Collapse
2: Re: Keepalive problem (response to 1)
Posted by Malte Sussdorff on
  1. Try to access the dbtest.tcl page of your webserver as the user running the keepalive server.
  2. Try to issue the svc -t command as the user running the keepalive server.
This should make sure it is not a permission problem.
Collapse
3: Re: Keepalive problem (response to 1)
Posted by Malte Sussdorff on
Talking about keepalive. Shall I upload the keepalive server along with documentation (*cough*) to the openacs repository and if yes, where too? Shall it go into the official distribution or just be available for download.

If you have no clue what I'm talking about: There is software written by AD which let's you restart your (aol)server if the database connection fails, called keepalive. This happens automatically and you are informed about it via EMail. Very convenient if you are not keen on having your server crash and not come up again due to whatever the reason (e.g. high load).

Collapse
4: Re: Keepalive problem (response to 1)
Posted by Nima Mazloumi on
Malte, I checked with ps and all nsd processes are running with the same user. My first thought was that it is a permission problem as well. But I have the feeling it could be some directory or file permission problem, no?

You should definitely document keep-alive. It is one of the best tools for OpenACS - when working, hehe.

No, really you should.

Collapse
5: Re: Keepalive problem (response to 3)
Posted by Jade Rubick on
Malte, a keepalive script is already uploaded. It's under etc/keepalive. So if you could put it there, that would be great. Documentation especially!
Collapse
6: Re: Keepalive problem (response to 5)
Posted by Malte Sussdorff on
I changed the keepalive scripts so they can be run from a cron job as well.

Quick documentation:

  1. Edit /etc/keepalive/keepalive-config.tcl to reflect your setup:

    set servers_to_monitor {http://www.yourserver.com "svc -du /service/service0"}

  2. Edit your root crontab file:

    export EDITOR=emacs;crontab -e

    Add a line like this:

    -*/2 * * * * /web/service0/etc/keepalive/keepalive-cron.sh