httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arvind Shenoy" <ashenoy2...@gmail.com>
Subject Re: [users@httpd] initgroups() failure
Date Thu, 09 Oct 2008 23:27:52 GMT
On Thu, Oct 9, 2008 at 3:42 PM, Dan Poirier wrote

> You say "keeps shutting down".  Do you mean it always crashes when
> you try to run it?  Or that sometimes it works, for a while?
>
> If it always crashes, I'd try running "id" with the user that
> httpd is configured to run as.  E.g.
>
>  id poirier
>
> and make sure it shows that that user is a member of the group that
> httpd is configured to run as.  I suggest confirming this by running
> "id" because Mac OS X doesn't necessarily use /etc/passwd and /etc/group
> to store that information, and maybe those files look right but Mac OS X
> is confused.
>
> If it crashes now and then, I wonder why it's even running that code
> after startup.  If it's starting and stopping child processes regularly,
> maybe you could tweak your MPM settings so it starts the servers it
> needs at startup and just keeps them running.
>

Thanks for replying Dan. To answer your question, it works all of the time
for a few hours and then crashes randomly anywhere between a few hours to a
few days later. The user/group combination that I am using in Apache was in
fact put together using Mac OS X's directory services utilities (since
/etc/group is not used) and therefore, when I do an `id <user>` call, one of
the groups that is returned happens to be the group I am assigning in
Apache, which falls in line with the expected behavior.

I will try out your suggestion for tweaking MPM settings though it seems as
that may simply delay the inevitable.

As for the user needing to be root to fall through to that part of the code,
perhaps I should try starting up apache as a regular user (i.e. apachectl
start instead of sudo apachectl start). The only reason I currently use sudo
is that Mac OS X seems to require super user access to bind to a privileged
port. I may be able to get around this by using launchd to start it up and
changing ownership of some of the directories. Is this something that would
be worthwhile to try?

Thanks again,
-AS

Mime
View raw message