Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: exceptions in apache error log when attempting to connect with up2date

Project highlights: Stable Version: 1.6.1, Development Version: 1.7.6

current
Discussion topic

Back to topic list

Re: exceptions in apache error log when attempting to connect with up2date

Reply

Author hunterm
Full name Hunter Matthews
Date 2004-01-06 11:57:16 PST
Message When using Red Hat 8 or later, the way apache is configured is different
(IE, the permissions on the log directory changed).

The proper fix is to move the current log file to just /var/log
(/var/log/current.log is just typical) and to make sure its permissions
are writable by the 'apache' user.

--------------------​--------------------​--------------------​-----
Details:

apache 2 starts the log file (opens the file/whatever) as root, but the
individual URL handling processes all run as the apache user (typically
'apache') - they use IPC to do their logging.

Since current runs in mod_python, it runs as 'apache', and that
directory is thus off limits.




On Tue, 2004-01-06 at 11:46, Steven Leikeim wrote:
> On Tue, Jan 06, 2004 at 08:23:12AM -0500, Ron Culler wrote:
> > I'm running build 1.4.4 on a Redhat 8.0 server.
> >
>
> We're running 1.4.4 on RedHat 9. The last time we took our current server
> down for maintenance, we started getting similar messages to those Ron
> mentions.
>
> > I believe that I have correctly setup the current server as per the
> > installation.txt file but I get a error in the apache error.log file
> > when trying to connect to the server with an up2date client.
> >
> > [Mon Jan 05 19:45:44 2004] [notice] Inside the PythonHandler
> > [Mon Jan 05 19:45:44 2004] [notice] Exception at callAPIMethod()
> > [Mon Jan 05 19:45:44 2004] [notice] method was up2date.login
> >
>
> From what I was able to discover, these messages are generated due to an
> inability to write to the log file. Of course, the messages don't say THAT
> directly!!
>
> The following lines were also logged in the ssl_error_log file:
>
> [Sun Dec 21 05:23:26 2003] [error] [client 1.2.3.4] PythonHandler current_apache: Traceback (most recent call last):
> [Sun Dec 21 05:23:26 2003] [error] [client 1.2.3.4] PythonHandler current_apache: File "/usr/lib/python2.2/​site-packages/mod_py​thon/apache.py", line 335, in HandlerDispatch! result = object(req)
> [Sun Dec 21 05:23:26 2003] [error] [client 1.2.3.4] PythonHandler current_apache: File "/usr/share/current/​current_apache.py", line 205, in handler!
> logException()
> [Sun Dec 21 05:23:26 2003] [error] [client 1.2.3.4] PythonHandler current_apache: File "/usr/share/current/logger.py", line 81, in logException! logfile.write('%s: EXCEPTION in %s, %s(), %s [%s]\n' %
> [Sun Dec 21 05:23:26 2003] [error] [client 1.2.3.4] PythonHandler current_apache: AttributeError: 'NoneType' object has no attribute 'write'
>
> I think this last message is the critical one here. I think what it's saying
> is that the logfile object didn't get a write attribute. Since it couldn't
> open the log file (see below) this is not surprising. Unfortunately, I don't
> know python, but it looks like this is a generic stack trace generated by
> python in response to a problem. I think this particular issue could be
> handled better. (This problem is not unique to Python - or current for that
> matter. Perl tracebacks can be just as difficult to interpret. In this case,
> at least, we do have a message logged that current was unable to open the
> logfile.)
>
> > Nothing is written to the current.log file only the apache error.log.
> >
> > I was initially getting an error message concerning the current.log
> > file.
> >
> > [Mon Jan 05 19:44:18 2004] [notice] Inside the PythonHandler
> > [Mon Jan 05 19:44:18 2004] [notice] Starting backend
> > [Mon Jan 05 19:44:18 2004] [alert] Cannot open the
> > /var/log/httpd/current.log log file. Usually a permissions problem.
> > [Mon Jan 05 19:44:18 2004] [alert] This is going to hinder all current
> > operation - please fix
>
> I think this message needs to be changed to
>
> Current will NOT work until this is fixed... Period!!!
>
> and then probably abort.
>
> > [Mon Jan 05 19:44:18 2004] [notice] Exception at callAPIMethod()
> > [Mon Jan 05 19:44:18 2004] [notice] method was up2date.login
> >
> > After setting the rights on this file to
> > -rw-rw-rw- 1 apache root 0 Jan 5 18:11 current.log
> >
> > this message stopped.
>
> This file really only needs to be writable by the user id running httpd
> (apache here). However, the problem I was having was that one of the updates
> we installed changed the mode on /var/log/httpd to 700 (rwx------). Since
> /var/log/httpd is owned by root, this means that the apache user could not
> even look into the directory to open the log file. Changing the mode to
> 711 (rwx--x--x) fixed that problem and current started running properly after
> that.
>
> >
> > I have looked searched the list and cannot seem to find anything that
> > resembles this error.
> >
> >
> > Ron Culler
> >
--
Hunter Matthews Unix / Network Administrator
Office: BioScience 145/244 Duke Univ. Biology Department
Key: F0F88438 / FFB5 34C0 B350 99A4 BB02 9779 A5DB 8B09 F0F8 8438
Never take candy from strangers. Especially on the internet.


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@cu​rrent.tigris.org
For additional commands, e-mail: users-help at current dot tigris dot org

« Previous message in topic | 3 of 3 | Next message in topic »

Messages

Show all messages in topic

exceptions in apache error log when attempting to connect with up2date secdes secdes 2004-01-06 05:23:12 PST
     Re: exceptions in apache error log when attempting to connect with up2date Steven Leikeim <steven at enel dot ucalgary dot ca> Steven Leikeim <steven at enel dot ucalgary dot ca> 2004-01-06 08:46:31 PST
         Re: exceptions in apache error log when attempting to connect with up2date hunterm Hunter Matthews 2004-01-06 11:57:16 PST
Messages per page: