Mongrel2 says that it's time to turn into a server but does not start
- From:
- Dalton Barreto
- Date:
- 2011-04-05 @ 19:40
Hi,
I'm writing mongrel2 init-scripts for Gentoo Linux and ran today into
a problem, that is:
I have a server that does not have a default host on the host table. When I run
# mongrel config.sqlite <server-uuid>
mongrel2 says:
[INFO] (src/config/config.c:310) Loaded server 2:uuid on port 0.0.0.0
with default host localhost
...
[INFO] (src/mongrel2.c:167) All loaded up, time to turn into a server.
But in the error logs it says:
[INFO] (src/mongrel2.c:300) Starting Mongrel2/1.5-adad5ca877.
Copyright (C) Zed A. Shaw. Licensed BSD.
[ERROR] (src/server.c:178: errno: No such file or directory) No
default_host set, you need one host named: localhost
[ERROR] (src/server.c:200: errno: None) Server startup failed, aborting.
As this is a fatal error (not having a default host) mongel2 should
check this before turning into a server. Also the command line returns
0 to the shell, I think that with this new check it should return 1,
to report the problem. (For now my init-script is doing this check)
The pid file for this server is not removed, but this is not a big
problems as mongrel2 removes it on the next run.
Should I fill a ticket on mongrel2.org ?
Thanks.
--
Dalton Barreto
http://daltonmatos.wordpress.com