Apache doesn't write access_log

This is a discussion on Apache doesn't write access_log within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hello all, My Apache server is running on a Solaris box, but the access_log is empty. There are hits, the ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-24-2004
tseitlin
 
Posts: n/a
Default Apache doesn't write access_log

Hello all,

My Apache server is running on a Solaris box, but the access_log is
empty.
There are hits, the permissions are set and in the httpd.conf the
access_log path is wrigth. I tried to restart the server but it didn't
help.
If enyone has an idea please help.

Thanks.
  #2 (permalink)  
Old 06-25-2004
David Efflandt
 
Posts: n/a
Default Re: Apache doesn't write access_log

On 23 Jun 2004 23:50:15 -0700, tseitlin <tseitlin@post.tau.ac.il> wrote:
> Hello all,
>
> My Apache server is running on a Solaris box, but the access_log is
> empty.
> There are hits, the permissions are set and in the httpd.conf the
> access_log path is wrigth. I tried to restart the server but it didn't
> help.
> If enyone has an idea please help.


"permissions are set" (to what?).

My logs (and separate nohost_access_log and nohost_error_log for default
worm catching virtual host) are owned by root, group root with 644
permission.

Is that your Solaris box, or is it on a hosting service (that might be
running apache in a chroot jail, or from another server). If you can do
CGI or SSI maybe you can check if the system path of access_log exists
from the view of the web server, although, to check that, the user apache
is running as would need at least "x" permission for all directories in
path and "r" permission for the file.

--
David Efflandt - All spam ignored http://www.de-srv.com/
  #3 (permalink)  
Old 06-25-2004
Gerry T
 
Posts: n/a
Default Re: Apache doesn't write access_log

tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406232250.4f64b9aa@posting.google. com>...
> Hello all,
>
> My Apache server is running on a Solaris box,


Version of Solaris might be helpful...

> but the access_log is
> empty.
> There are hits, the permissions are set and in the httpd.conf the
> access_log path is wrigth. I tried to restart the server but it didn't
> help.
> If enyone has an idea please help.


Use "fuser" to see if you are running the httpd you think you are.
Then try ./httpd -V
and examine the output for the location of error_log.
  #4 (permalink)  
Old 06-25-2004
Gerry T
 
Posts: n/a
Default Re: Apache doesn't write access_log

tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406232250.4f64b9aa@posting.google. com>...
> Hello all,
>
> My Apache server is running on a Solaris box,


Version of Solaris might be helpful...

> but the access_log is
> empty.
> There are hits, the permissions are set and in the httpd.conf the
> access_log path is wrigth. I tried to restart the server but it didn't
> help.
> If enyone has an idea please help.


Use "fuser" to see if you are running the httpd you think you are.
Then try ./httpd -V
and examine the output for the location of error_log.
  #5 (permalink)  
Old 07-01-2004
tseitlin
 
Posts: n/a
Default Re: Apache doesn't write access_log

gerryt@vcn.bc.ca (Gerry T) wrote in message news:<bff0f017.0406250500.34929cb6@posting.google. com>...
> tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406232250.4f64b9aa@posting.google. com>...
> > Hello all,
> >
> > My Apache server is running on a Solaris box,

>
> Version of Solaris might be helpful...
>
> > but the access_log is
> > empty.
> > There are hits, the permissions are set and in the httpd.conf the
> > access_log path is wrigth. I tried to restart the server but it didn't
> > help.
> > If enyone has an idea please help.

>
> Use "fuser" to see if you are running the httpd you think you are.
> Then try ./httpd -V
> and examine the output for the location of error_log.


Thank you all for yor help,

here are some more details: the vertion of Solaris is 7, the machine
is ours,
the permitions are set to : 'x' for the path and 'r' for the files,
the ownership is : wwwuser.
"fuser" shows that the httpd has opened the error_log but not the
access_log (the one not being written), httpd -V showed the wright
path (logs/access_log ,
logs/error_log), yet only the error_log is being written.

more help would be apritiated,
thanks.
  #6 (permalink)  
Old 07-01-2004
Gerry T
 
Posts: n/a
Default Re: Apache doesn't write access_log

tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406302242.3155b2c4@posting.google. com>...
> gerryt@vcn.bc.ca (Gerry T) wrote in message news:<bff0f017.0406250500.34929cb6@posting.google. com>...
> > tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406232250.4f64b9aa@posting.google. com>...


> > > My Apache server is running on a Solaris box,

> > Version of Solaris might be helpful...


and version of Apache : >

> > > but the access_log is empty.
> > > There are hits, the permissions are set and in the httpd.conf the
> > > access_log path is wrigth. I tried to restart the server but it didn't
> > > help.
> > > If enyone has an idea please help.

> > Use "fuser" to see if you are running the httpd you think you are.
> > Then try ./httpd -V
> > and examine the output for the location of error_log.

> here are some more details: the vertion of Solaris is 7, the machine
> is ours,
> the permitions are set to : 'x' for the path and 'r' for the files,
> the ownership is : wwwuser.

What I have:
-rw-r--r-- 1 root other 9872 Jul 1 06:22 access_log

> "fuser" shows that the httpd has opened the error_log but not the
> access_log (the one not being written),

That kind of makes sense : >
> httpd -V showed the wright path (logs/access_log ,


Yes but thats not the FULL path.

> logs/error_log), yet only the error_log is being written.


Something else to try would be "lsof" which is obtainable
from www.sunfreeware.com. It will install in /usr/local : <
Once installed you can look for open files.
Usage Example:
lsof -p `lsof -i :80|awk '/root/ {print $2}'`|grep access
You get a full path name to the access_log file.

It feels like a config error or 'alteration' in httpd.conf file so far.
I take it this is a custom install from source as Solaris 7 didnt come
with a built in Apache.. Hmm maybe you can upgrade to Solaris 9 : >
  #7 (permalink)  
Old 07-04-2004
tseitlin
 
Posts: n/a
Default Re: Apache doesn't write access_log

gerryt@vcn.bc.ca (Gerry T) wrote in message news:<bff0f017.0407010537.468db23@posting.google.c om>...
> tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406302242.3155b2c4@posting.google. com>...
> > gerryt@vcn.bc.ca (Gerry T) wrote in message news:<bff0f017.0406250500.34929cb6@posting.google. com>...
> > > tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406232250.4f64b9aa@posting.google. com>...

>
> > > > My Apache server is running on a Solaris box,
> > > Version of Solaris might be helpful...

>
> and version of Apache : >
>
> > > > but the access_log is empty.
> > > > There are hits, the permissions are set and in the httpd.conf the
> > > > access_log path is wrigth. I tried to restart the server but it didn't
> > > > help.
> > > > If enyone has an idea please help.
> > > Use "fuser" to see if you are running the httpd you think you are.
> > > Then try ./httpd -V
> > > and examine the output for the location of error_log.

> > here are some more details: the vertion of Solaris is 7, the machine
> > is ours,
> > the permitions are set to : 'x' for the path and 'r' for the files,
> > the ownership is : wwwuser.

> What I have:
> -rw-r--r-- 1 root other 9872 Jul 1 06:22 access_log
>
> > "fuser" shows that the httpd has opened the error_log but not the
> > access_log (the one not being written),

> That kind of makes sense : >
> > httpd -V showed the wright path (logs/access_log ,

>
> Yes but thats not the FULL path.
>
> > logs/error_log), yet only the error_log is being written.

>
> Something else to try would be "lsof" which is obtainable
> from www.sunfreeware.com. It will install in /usr/local : <
> Once installed you can look for open files.
> Usage Example:
> lsof -p `lsof -i :80|awk '/root/ {print $2}'`|grep access
> You get a full path name to the access_log file.
>
> It feels like a config error or 'alteration' in httpd.conf file so far.
> I take it this is a custom install from source as Solaris 7 didnt come
> with a built in Apache.. Hmm maybe you can upgrade to Solaris 9 : >



Thanks for your help,

My Apache version is 1.3.22
The 'lsof' also shows only the /usr/local/apache/logs/error_log is opened.
here is some relevant parts from the httpd.conf:

ServerRoot "/usr/local/apache"

User wwwuser
Group wwwuser

ErrorLog /usr/local/apache/logs/error_log

CustomLog /usr/local/apache/logs/access_log combined

nothing seems wrong, if you have any idea i'd be glad to try.
enyway upgrading won't be possible in the nearest future.

Thanks again.
  #8 (permalink)  
Old 07-05-2004
Gerry T
 
Posts: n/a
Default Re: Apache doesn't write access_log

tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0407040234.66bee8da@posting.google. com>...
> gerryt@vcn.bc.ca (Gerry T) wrote in message news:<bff0f017.0407010537.468db23@posting.google.c om>...
> > tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406302242.3155b2c4@posting.google. com>...
> > > gerryt@vcn.bc.ca (Gerry T) wrote in message news:<bff0f017.0406250500.34929cb6@posting.google. com>...
> > > > tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406232250.4f64b9aa@posting.google. com>...

>
> > > > > My Apache server is running on a Solaris box,
> > > > Version of Solaris might be helpful...

> > and version of Apache : >
> > > > > but the access_log is empty.
> > > > > There are hits, the permissions are set and in the httpd.conf the
> > > > > access_log path is wrigth. I tried to restart the server but it didn't
> > > > > help.
> > > > > If enyone has an idea please help.
> > > > Use "fuser" to see if you are running the httpd you think you are.
> > > > Then try ./httpd -V
> > > > and examine the output for the location of error_log.
> > > here are some more details: the vertion of Solaris is 7, the machine
> > > is ours,
> > > the permitions are set to : 'x' for the path and 'r' for the files,
> > > the ownership is : wwwuser.

> > What I have:
> > -rw-r--r-- 1 root other 9872 Jul 1 06:22 access_log
> > > "fuser" shows that the httpd has opened the error_log but not the
> > > access_log (the one not being written),

> That kind of makes sense : >
> > > httpd -V showed the wright path (logs/access_log ,

> > Yes but thats not the FULL path.
> > > logs/error_log), yet only the error_log is being written.

> > Something else to try would be "lsof" which is obtainable
> > from www.sunfreeware.com. It will install in /usr/local : <
> > Once installed you can look for open files.
> > Usage Example:
> > lsof -p `lsof -i :80|awk '/root/ {print $2}'`|grep access
> > You get a full path name to the access_log file.
> > It feels like a config error or 'alteration' in httpd.conf file so far.
> > I take it this is a custom install from source as Solaris 7 didnt come
> > with a built in Apache.. Hmm maybe you can upgrade to Solaris 9 : >

> My Apache version is 1.3.22


Ancient.

> The 'lsof' also shows only the /usr/local/apache/logs/error_log is opened.
> here is some relevant parts from the httpd.conf:
> ServerRoot "/usr/local/apache"
> User wwwuser
> Group wwwuser
> ErrorLog /usr/local/apache/logs/error_log
> CustomLog /usr/local/apache/logs/access_log combined
> nothing seems wrong, if you have any idea i'd be glad to try.


OK replace "combined" with "common" and restart apache.
I still think the error is in httpd.conf from what Ive heard so far.
If you have an original httpd.conf-dist file maybe you could compare it
with your httpd.conf.

> enyway upgrading won't be possible in the nearest future.

I hate hearing that : >
  #9 (permalink)  
Old 07-05-2004
tseitlin
 
Posts: n/a
Default Re: Apache doesn't write access_log

gerryt@vcn.bc.ca (Gerry T) wrote in message news:<bff0f017.0407041509.4124eecc@posting.google. com>...
> tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0407040234.66bee8da@posting.google. com>...
> > gerryt@vcn.bc.ca (Gerry T) wrote in message news:<bff0f017.0407010537.468db23@posting.google.c om>...
> > > tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406302242.3155b2c4@posting.google. com>...
> > > > gerryt@vcn.bc.ca (Gerry T) wrote in message news:<bff0f017.0406250500.34929cb6@posting.google. com>...
> > > > > tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0406232250.4f64b9aa@posting.google. com>...

>
> > > > > > My Apache server is running on a Solaris box,
> > > > > Version of Solaris might be helpful...

> and version of Apache : >
> > > > > > but the access_log is empty.
> > > > > > There are hits, the permissions are set and in the httpd.conf the
> > > > > > access_log path is wrigth. I tried to restart the server but it didn't
> > > > > > help.
> > > > > > If enyone has an idea please help.
> > > > > Use "fuser" to see if you are running the httpd you think you are.
> > > > > Then try ./httpd -V
> > > > > and examine the output for the location of error_log.
> > > > here are some more details: the vertion of Solaris is 7, the machine
> > > > is ours,
> > > > the permitions are set to : 'x' for the path and 'r' for the files,
> > > > the ownership is : wwwuser.
> > > What I have:
> > > -rw-r--r-- 1 root other 9872 Jul 1 06:22 access_log
> > > > "fuser" shows that the httpd has opened the error_log but not the
> > > > access_log (the one not being written),

> That kind of makes sense : >
> > > > httpd -V showed the wright path (logs/access_log ,

> Yes but thats not the FULL path.
> > > > logs/error_log), yet only the error_log is being written.
> > > Something else to try would be "lsof" which is obtainable
> > > from www.sunfreeware.com. It will install in /usr/local : <
> > > Once installed you can look for open files.
> > > Usage Example:
> > > lsof -p `lsof -i :80|awk '/root/ {print $2}'`|grep access
> > > You get a full path name to the access_log file.
> > > It feels like a config error or 'alteration' in httpd.conf file so far.
> > > I take it this is a custom install from source as Solaris 7 didnt come
> > > with a built in Apache.. Hmm maybe you can upgrade to Solaris 9 : >

> > My Apache version is 1.3.22

>
> Ancient.
>
> > The 'lsof' also shows only the /usr/local/apache/logs/error_log is opened.
> > here is some relevant parts from the httpd.conf:
> > ServerRoot "/usr/local/apache"
> > User wwwuser
> > Group wwwuser
> > ErrorLog /usr/local/apache/logs/error_log
> > CustomLog /usr/local/apache/logs/access_log combined
> > nothing seems wrong, if you have any idea i'd be glad to try.

>
> OK replace "combined" with "common" and restart apache.
> I still think the error is in httpd.conf from what Ive heard so far.
> If you have an original httpd.conf-dist file maybe you could compare it
> with your httpd.conf.
>
> > enyway upgrading won't be possible in the nearest future.

> I hate hearing that : >



Good news!

The problem was found!
There was a log moving script that was running without properly
shuting down the server. We added "apachectl stop" before and
"apachectl start" after the log moving, now it seems to work.

Thanks for your help.
  #10 (permalink)  
Old 07-05-2004
Gerry T
 
Posts: n/a
Default Re: Apache doesn't write access_log

tseitlin@post.tau.ac.il (tseitlin) wrote in message news:<b843499b.0407050030.7da1fa4@posting.google.c om>...

> Good news!
> The problem was found!
> There was a log moving script that was running without properly
> shuting down the server. We added "apachectl stop" before and
> "apachectl start" after the log moving, now it seems to work.


Well that's of course is good.
I must say though that httpd does not have to stopped and
started in order to rotate logs. A simple mv, apachectl restart
sequence is all you need. Also, Apache 1.x comes with
"rotatelogs" and man pages for it. Revisit your script : >
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:49 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0