On Wed, Dec 7, 2011 at 9:15 AM, Rob Landrito <rlandr...@gmail.com> wrote:
> Thanks for your suggestions.  httpd starts cleanly with nouser and
> nogroup fine as long as I'm not trying to pipe logs.  If I only try to
> pipe access_log and not error_log, httpd starts but no access logs are
> created (I'm sending requests to the servers).  The only difference I
> see in error_log are the following two lines:
>
> piped log program '/opt/httpd/bin/rotatelogs -fl
> /opt/httpd/logs/access_log.%d-%b 86400' failed unexpectedly

Run strace/truss/whatever against a running rotatelogs process before
it has to handle an access log entry, see what is happening at syscall
level.

> [Wed Dec 07 06:08:13 2011] [error] (22)Invalid argument: setting of group 
> failed

Weird.  That's from apr_proc_create(), which might be called for a
piped logger.  The implication seems to be that
apr_procattr_user_set() or apr_procattr_group_set() has been called,
but I don't see that in 2.2.x.

Perhaps this httpd has some custom/vendor patches?  Perhaps I didn't
look carefully enough at one bit of code or another?

>
> They pop up a number of times throughout the error_log, presumably
> every time it's trying to write to access_log.  I should note that I
> can run rotatelogs just fine from the command line as nouser or root.
>
>
> 2011/12/6 Jeff Trawick <traw...@gmail.com>:
>> On Tue, Dec 6, 2011 at 1:47 PM, Rob Landrito <rlandr...@gmail.com> wrote:
>>> Greetings,
>>>
>>> I'm trying to used piped logs as described here:
>>> http://httpd.apache.org/docs/2.2/logs.html#piped.  The environment is
>>> httpd 2.2.11 on sco 6.0.0 (SCO_SV system 5 6.0.0 i386).  I'm using
>>> User nouser
>>> Group nogroup
>>>
>>> Apache is unable to start, printing the following to stderr on startup:
>>> [Tue Dec 06 13:09:59 2011] [error] (22)Invalid argument: setting of
>>> group failedBroken Pipe
>>
>> That's the concatenation of two different error messages.
>>
>> Switch your error log temporarily to a file instead of to a piped
>> logger, and make sure everything starts up cleanly.  (It looks like
>> you'll have to modify the Group directive.)
>>
>> Then try using a piped logger for the access log, again with a simpler
>> logging mechanism for the error log.
>>
>>
>>>
>>> It doesn't seem to matter what program I use on the other end of the
>>> pipe.  I'm actually trying to use rotatelogs but echo seems to have
>>> the same problem.  I've tried various setuid tricks just to see if I
>>> could pinpoint the issue.  I suid'd the rotatelogs binary to root as
>>> well as nouser and neither seemed to help.  I suspect that this
>>> problem is isolated to SCO.  Any ideas would be appreciated.
>>>
>>> ---------------------------------------------------------------------
>>> The official User-To-User support forum of the Apache HTTP Server Project.
>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
>>> For additional commands, e-mail: users-h...@httpd.apache.org
>>>
>>
>>
>>
>> --
>> Born in Roswell... married an alien...
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
>> For additional commands, e-mail: users-h...@httpd.apache.org
>>
>
>
>
> --
> :wq!
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>



-- 
Born in Roswell... married an alien...

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to