14

I have a problem, that no logs are written to /var/log.

-rw-r-----  1 syslog adm  6.4M May 21  2014 syslog
-rw-r-----  1 syslog adm  5.7M May 21  2014 daemon.log
-rw-r-----  1 syslog adm  494K May 21  2014 auth.log

But date and time is configured properly

Tue Apr 28 19:38:56 CEST 2015

It seems that I made a dist-upgrade 21 May of 2014. And since then I have no logs written. My system is Ubuntu 14.04 (no GUI). It has been running for 132 days without reboot.

Other log files like MySQL or nginx are up to date. Only system logs don't work.

I hope you can help me.

15

Ok, I found solution somewhere else:

sudo apt-get install --reinstall rsyslog

It seems rsyslog was removed itself at some point.

| improve this answer | |
7

have you started/restarted the systemlogs deamon?

    sudo service rsyslog start

or

    sudo service rsyslog restart

this should work. This problem came for me also, i restarted this deamon, now its working fine.

| improve this answer | |
1

Could try this in case something's mis-configured with rsyslog, at least before trying a full reinstall:

sudo dpkg-reconfigure rsyslog
| improve this answer | |
0

I fixed it by uninstalling rsyslog sudo apt-get purge rsyslog and then reinstalling it sudo apt-get install rsyslog. In my case the permissions and ownership of the files were all correct but the syslog file was empty and all the logs were going into uncategorized.log

| improve this answer | |
0

Not really directly related to the question, but had similar problem on WSL (Windows Subsystem for Linux): system was not writing logs to syslog, rsyslog restart was not completing successfully.

Windows version: Windows 10 Pro 1909
Command: sudo service rsyslog restart

  • Stopping enhanced syslogd rsyslogd [ OK ]
  • Starting enhanced syslogd rsyslogd rsyslogd: set SO_TIMESTAMP failed on '/dev/log': Invalid argument [v8.32.0]
    rsyslogd: imklog: cannot open kernel log (/proc/kmsg): No such file or directory.
    rsyslogd: activation of module imklog failed [v8.32.0 try http://www.rsyslog.com/e/2145 ]

Solution:
From https://askubuntu.com/a/615473/497599

sudo apt-get install --reinstall rsyslog   ()

And start after that! restart is not working.

sudo service rsyslog restart  

Starting enhanced syslogd rsyslogd [ OK ]

https://gist.github.com/0x49D1/596d457921034e9c18e5e1052a4ad515

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.