Page 1 of 1
slrtscn.py Unable to open /var/log/maillog
Posted: Thu Jun 04, 2009 11:15 am
by w0
We have been using OpenEmm for about a year (not without difficulties) and since a few days slrtscn.py seems to be unable to open maillog for reading. We ge thousands of the following in ~openemm/var/log/<date>-<host>-slrtscn.log:
ERROR/main: Unable to open /var/log/maillog: Invalid input for /var/log/maillog:
/var/log/maillog has permissions 644 and should be readable by all users.
Any help or hints would be greatly appreciated.
Re: slrtscn.py Unable to open /var/log/maillog
Posted: Thu Oct 22, 2009 9:26 am
by neat
w0 wrote:We have been using OpenEmm for about a year (not without difficulties) and since a few days slrtscn.py seems to be unable to open maillog for reading. We ge thousands of the following in ~openemm/var/log/<date>-<host>-slrtscn.log:
ERROR/main: Unable to open /var/log/maillog: Invalid input for /var/log/maillog:
/var/log/maillog has permissions 644 and should be readable by all users.
Any help or hints would be greatly appreciated.
Hallo,
since a few days, we got the same problem with the maillog.
Could you solve the problem?
mfg
Posted: Fri Oct 23, 2009 8:57 pm
by tjenkins
I had the same problem and I believe I found the answer. I'm not a python programmer but here goes.
The real problem seems to be that it cant work with the savefile (On Centos 5 "/home/openemm/var/run/slrtscan.save"). I changed my save file to point at /tmp/slrtscan.save to see what happened. It created a new copy of the file and the error went away. I then went to /home/openemm/var/run and found that the slrtscan.save file contained 0 bytes. I moved the slrtscan.save file then put the slrtscn.py file back to normal. I then started up slrtscan.sh and it created a new slrtscan.save file where the old one was. A quick check of the log and the error is gone.
For some reason the python script wont use the existing slrtscan.save. In my case, the answer was to delete it then let the script recreate it.
I hope this helps. If someone finds out that I am incorrect let me know!
Posted: Sat Oct 24, 2009 10:59 am
by maschoff
The issue with file slrtscn.save has been fixed in release 6.0 (background: if file slrtscan.save was created with 0 bytes size because of a special condition like full harddisk the file couldn't be parsed correctly by python script slrtscn.py and it simply stopped working).
If /var/log/maillog can not be read it could be that either a super directory like /var/log has no read permission for others or a security policy for SELinux is missing.
Posted: Mon Oct 26, 2009 10:40 am
by neat
@ tjenkins
thank you for your workaround. It works!
mfg