enable logging in fedora core 5?

Red Squirrel

No Lifer
May 24, 2003
70,640
13,821
126
www.anyf.ca
How do I enable logging? if a service fails to start, or something does not work, I want to know WHY. Ex: I have an application that mail passes through in procmail, but since my server migration it does not work, but there's no procmail log so i cant diagnose the problem.

Apache fails to start after I added my new config, again, no log, no nothing. Also, there's not even a syslog file in /var/log and syslog service is running. (if it matters...)

So how do I enable logging so I can actually get information when something does not work?
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: RedSquirrel
How do I enable logging? if a service fails to start, or something does not work, I want to know WHY. Ex: I have an application that mail passes through in procmail, but since my server migration it does not work, but there's no procmail log so i cant diagnose the problem.
Procmail handles its own logging - it doesn't pass through syslog. Look in .procmailrc or /etc/procmailrc for a LOGFILE= line.
Apache fails to start after I added my new config, again, no log, no nothing. Also, there's not even a syslog file in /var/log and syslog service is running. (if it matters...)
What else is in /var/log? I haven't looked at FC5 in a while, but there's probably a messages or daemon file that might be useful. If there's nothing like that, then something got broken somewhere along the line.

There should also be apache-specific logs, but those probably don't live in /var/log (for chroot-related reasons, primarily). You can probably find them somewhere under /var/www (or /var/httpd or whatever FC5 uses for it's Apache base directory).


 

Red Squirrel

No Lifer
May 24, 2003
70,640
13,821
126
www.anyf.ca
This is what is in logs

acpid anaconda.xlog btmp cups lastlog maillog.1 mysqld.log prelink.log samba secure.1 squid
anaconda.log boot.log cron dmesg mail messages mysqld.log.1 rpmpkgs scrollkeeper.log spooler vbox
anaconda.syslog boot.log.1 cron.1 httpd maillog messages.1 ppp rpmpkgs.1 secure spooler.1 wtmp


Also, service httpd start does not work AT ALL, so I have to type httpd... problem is, it wont start at startup, this way....

But whenver I get an httpd error (syntax, etc) it says it cant open logs. ex:

Code:
[root@borg log]# httpd
(98)Address already in use: make_sock: could not bind to address [::]:443
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
[root@borg log]#


And /etc/procmailrc does not seem to exist. I know procmail works though since I set .procmailrc files in home directories to pass mail through the spam filter, and it works. The default FC5 install seems to have lot of issues. Samba, for example, plain does not work. but thats a totally different issue and I have a thread for that already.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
How do I enable logging? if a service fails to start, or something does not work, I want to know WHY.

It depends on the service, generally you just try to start it manually and see what it says. Some will log errors on startup and some won't, some require you to add a special switch so that errors will be output to the screen instead of a log file or at all. You need to read the docs for whatever's failing.

Apache fails to start after I added my new config, again, no log, no nothing. Also, there's not even a syslog file in /var/log and syslog service is running. (if it matters...)

Apache doesn't use syslog it does it's own logging. I'm not sure where FC puts them by default, but they're in /var/log/apache (very unintuitive, I know...) on my Debian boxes.

So how do I enable logging so I can actually get information when something does not work?

By reading the docs for that particular service, there's no big "Turn on Logging" switch.

root@borg log]# httpd
(98)Address already in use: make_sock: could not bind to address [::]:443
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs

That means something is already listening on 443, you have to shut Apache down before you can start it again. And you shouldn't run httpd directly, you should use the init script in /etc/init.d or the service command (which just calls the init script).

And /etc/procmailrc does not seem to exist. I know procmail works though since I set .procmailrc files in home directories to pass mail through the spam filter, and it works.

Then you need to create it or put logging directives in one of the user's .procmailrc files and test with that account.

The default FC5 install seems to have lot of issues. Samba, for example, plain does not work. but thats a totally different issue and I have a thread for that already.

I'm not a big FC fan and I do believe there are issues with it, but Samba not working is not one of them.