Operating System - HP-UX
1819695 Members
3552 Online
109605 Solutions
New Discussion юеВ

Apache 's access_log file size is zero... what's the problem?

 
Andrew Park_1
New Member

Apache 's access_log file size is zero... what's the problem?

Hi,

please let me know what the problem or cause is!

OS is HP-UX 11.00, and apache 's log file (usually access_log file) size is "0 byte"

this is the only problem. everything else is OK


thanks,
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: Apache 's access_log file size is zero... what's the problem?

Apache version please.

1) Check permissions on the file. Make sure the apache user can write to it.
2) Check for a mismatch between the file you are looking at and the file defined as access_log in httpd.conf
3) Is apache running? ps -ef | grep httpd

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Andrew Park_1
New Member

Re: Apache 's access_log file size is zero... what's the problem?

apache version is 1.3


httpd is running. and the service is OK.

and there is a access_log file.

but sometimes, the file size is "0" byte.

Andrew Park_1
New Member

Re: Apache 's access_log file size is zero... what's the problem?

apache version is 1.3.22


httpd is running. and the service is OK.

and there is a access_log file.

but sometimes, the file size is "0" byte.

Steve Post
Trusted Contributor

Re: Apache 's access_log file size is zero... what's the problem?

Here are some guesses.
Check the httpd.conf file and apachectl file. Perhaps the log file is in a different directory, or with a different name. (uh...different from what you THINK it is supposed to be).

Check the permissions of the logs directory to make sure the unix user runnning apache can get to it.

Check the AGE of the 0 byte log file.

Log in at the user the runs apache, go to the logs directory and vi the log file. If the permissions are right, you should get there.

steve
Wouter Jagers
Honored Contributor

Re: Apache 's access_log file size is zero... what's the problem?

In your first post, you say that the zero-length file is -usually- access_log. Do you mean it sometimes happens to the other ones ? You do have an error.log, too, I guess, does it happen with that ?

In your second post you say that the size of access.log is -sometimes- 0 bytes. Do you mean sometimes there's data inthere ?

As Steve already said, do check your apache configuration for the location of the logfiles.

If however sometimes the file does contain data, that would mean permissions and locations are all ok, and something else happens to the log.

Do you have any kind of log-cleaning or log-rotating mechanism on the machine ?

'logrotate' for example can be configured to rotate logs (duh) which will create access.1, access.2 and so on.. it can also just 'empty' the file if configured so.

You might also want to check cron for any cool 'logfile-cleaning' script which a colleague might have implemented.

regards
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
Steven E. Protter
Exalted Contributor

Re: Apache 's access_log file size is zero... what's the problem?

The /var filesystem might be full

bdf /var

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Wouter Jagers
Honored Contributor

Re: Apache 's access_log file size is zero... what's the problem?

come to think of it, even sam has functionality for trimming and cleaning logfiles.. microscopic chance to find that configured, but hey, if all else fails :-)
an engineer's aim in a discussion is not to persuade, but to clarify.