LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-16-2011, 04:12 AM   #1
bhageshp
Member
 
Registered: Sep 2008
Location: Mumbai
Distribution: Redhat
Posts: 41

Rep: Reputation: 16
syslog not updating the messages file


Dear All,

I am facing an issue with my syslog server. The server is collecting remote log also. and the issue is no log messages are updated in /var/log/messages file. But other files are getting updated.

----------------------------------------------------------------------
[root@Server1 ~]# cat /etc/syslog.conf
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;news.none;authpriv.none;cron.none;ntpd.none /var/log/messages
#*.info;mail.none;news.none;authpriv.*;cron.none /var/log/messages

# The authpriv file has restricted access.
authpriv.* /var/log/secure

# Log all the mail messages in one place.
mail.* -/var/log/maillog


# Log cron stuff
cron.* /var/log/cron

# Everybody gets emergency messages
*.emerg *

# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler

# Save boot messages also to boot.log
local7.* /var/log/boot.log

#
# INN
#
news.=crit /var/log/news/news.crit
news.=err /var/log/news/news.err
news.notice /var/log/news/news.notice



-------------------------------------------------------------------------

[root@Server1 ~]# cat /etc/sysconfig/syslog
# Options to syslogd
# -m 0 disables 'MARK' messages.
# -r enables logging from remote machines
# -x disables DNS lookups on messages recieved with -r
# See syslogd(8) for more details
SYSLOGD_OPTIONS="-r -m 0"
# Options to klogd
# -2 prints all kernel oops messages twice; once for klogd to decode, and
# once for processing with 'ksymoops'
# -x disables all klogd processing of oops messages entirely
# See klogd(8) for more details
KLOGD_OPTIONS="-x"
#
SYSLOG_UMASK=077
# set this to a umask value to use for all log files as in umask(1).
# By default, all permissions are removed for "group" and "other".

---------------------------------------------------------------

Is any reason why the messages file does not update the logs?
 
Old 02-16-2011, 04:22 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
What are the permissions for /var/log/messages?
 
Old 02-16-2011, 04:40 AM   #3
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by bhageshp View Post
Dear All,

I am facing an issue with my syslog server. The server is collecting remote log also. and the issue is no log messages are updated in /var/log/messages file. But other files are getting updated.

----------------------------------------------------------------------
[root@Server1 ~]# cat /etc/syslog.conf
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;news.none;authpriv.none;cron.none;ntpd.none /var/log/messages
#*.info;mail.none;news.none;authpriv.*;cron.none /var/log/messages

# The authpriv file has restricted access.
authpriv.* /var/log/secure

# Log all the mail messages in one place.
mail.* -/var/log/maillog


# Log cron stuff
cron.* /var/log/cron

# Everybody gets emergency messages
*.emerg *

# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler

# Save boot messages also to boot.log
local7.* /var/log/boot.log

#
# INN
#
news.=crit /var/log/news/news.crit
news.=err /var/log/news/news.err
news.notice /var/log/news/news.notice



-------------------------------------------------------------------------

[root@Server1 ~]# cat /etc/sysconfig/syslog
# Options to syslogd
# -m 0 disables 'MARK' messages.
# -r enables logging from remote machines
# -x disables DNS lookups on messages recieved with -r
# See syslogd(8) for more details
SYSLOGD_OPTIONS="-r -m 0"
# Options to klogd
# -2 prints all kernel oops messages twice; once for klogd to decode, and
# once for processing with 'ksymoops'
# -x disables all klogd processing of oops messages entirely
# See klogd(8) for more details
KLOGD_OPTIONS="-x"
#
SYSLOG_UMASK=077
# set this to a umask value to use for all log files as in umask(1).
# By default, all permissions are removed for "group" and "other".

---------------------------------------------------------------

Is any reason why the messages file does not update the logs?
Check if the command given below is creating log entries in /var/log/messages?

Code:
#logger -i "New log created for testing"
 
Old 02-16-2011, 04:44 AM   #4
bhageshp
Member
 
Registered: Sep 2008
Location: Mumbai
Distribution: Redhat
Posts: 41

Original Poster
Rep: Reputation: 16
The permission of message file is.

------------------------------------------

[root@Server1 ~]# ll /var/log/messages
-rw-r----- 1 root root 0 Feb 13 04:03 /var/log/messages

------------------------------------------

Also there is no effect by the logger command.
 
Old 02-16-2011, 05:51 AM   #5
jsanchez2004
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
I know this is an stupid answer but did you reload the syslogd daemon with the new config file?.
and after that see what happen ( try dmesg )
 
Old 02-16-2011, 06:07 AM   #6
bhageshp
Member
 
Registered: Sep 2008
Location: Mumbai
Distribution: Redhat
Posts: 41

Original Poster
Rep: Reputation: 16
The syslog service is running on the server. and the "/var/log/cron", "/var/log/secure" files are updating only problem is that the /var/log/message file is not updating.

[root@CPCAPP112 ~]# ps -ef|grep syslog
root 10952 1 0 17:27 ? 00:00:01 syslogd -r -m 0
 
Old 02-16-2011, 11:03 AM   #7
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Try stopping syslog, removing and recreating /var/log/messages with touch, then either restart your computer or just simply restart syslog. Doesn't hurt to try...
 
Old 07-22-2011, 04:49 AM   #8
AndrewMiller
LQ Newbie
 
Registered: Jul 2011
Location: Fareham, UK
Posts: 1

Rep: Reputation: Disabled
I've been having a similar problem on a CentOS 5.6 box.

First time I re-booted - which fixed it.

Second time I did "service syslog restart" - which also fixed it. I didn't bother removing /var/log/messages - I just let it carry on. #logger -i "New log created for testing" now generates a line in the messages file, which it didn't before.

I'd like to know what is causing it though...
 
Old 07-06-2014, 10:05 AM   #9
jonatan
LQ Newbie
 
Registered: Sep 2012
Distribution: CentOS 5
Posts: 8

Rep: Reputation: Disabled
I came across the same issue just now - other log files were being written to but not syslog or messages. This was on Raspbian Wheezy.

Turns out I caused that a while back, by playing around with syslog-ng to set up a syslog server - I managed to disable all writing to syslog from the local machine.

I changed the config file at /etc/syslog-ng/syslog-ng.conf and now it's working again. I disabled the syslog server functionality and enabled the local syslog again, by commenting out:
Code:
#source s_net { ... }
and uncomment:
Code:
source s_src { ... }
Then commenting out any log path below depending on s_net, and uncommenting log paths pointing to syslog and messages:
Code:
log { source(s_src); ... destination(d_messages); };
log { source(s_src); ... destination(d_syslog); };
 
  


Reply



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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Logging syslog messages from a particular IP to individual file simplified Linux - Server 7 03-12-2009 02:03 PM
getting syslog to write to other file than /var/log/messages c_mitulescu Linux - Enterprise 6 04-02-2008 10:17 AM
log file not updating - /var/adm/messages vm_devadas Linux - General 5 12-21-2006 10:58 PM
Can you send syslog messages to different file plythgam Linux - Networking 1 07-01-2004 06:21 PM
syslog and firestarter - log messages to another file than messages mule Linux - Newbie 0 08-07-2003 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration