1

Topic: Cron errors in postmaster inbox

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Ubuntu Server 14.04.2 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====
I am receiving many emails in the postmaster mailbox from Cron Jobs - See screenshot. These are spamming my inbox.

They contain the following Info:

2015-07-01 10:58:02.534 sogo-tool[27443] Failed to create lock directory '/var/lib/sogo/GNUstep/Defaults/.lck/.GNUstepDefaults.lck' - /var/lib/sogo/GNUstep/Defaults/.lck/.GNUstepDefaults.lck

and

2015-07-01 10:56:01.468 sogo-ealarms-notify[27401] Failed to create lock directory '/var/lib/sogo/GNUstep/Defaults/.lck/.GNUstepDefaults.lck'

I am a first time iRedMail user and just getting my feet wet with Linux so not sure how to tackle these errors or if they should be ignored.

A google search only came up with a single result with no resolution.

Any help will be appreciated.

Regards,
Jeremy

Post's attachments

Untitled.jpg 307.32 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Cron errors in postmaster inbox

Hi Jeremy,

Please try to start sogo service. These errors were caused due to miss SQL tables in sogo database.

If SOGo service is not running first time, it won't create required SQL tables automatically.

3

Re: Cron errors in postmaster inbox

Wow Zhang,

I think your right on the money there!

Been two hours now with none of those errors appearing.

Will let you know if they come back.

Thank you all.

Top notch team here smile

4

Re: Cron errors in postmaster inbox

Hmm Seems I spoke too soon.

The errors are back and popping up every 1-2mins.

5

Re: Cron errors in postmaster inbox

What's the content in these error messages?

6 (edited by bonkas 2015-07-02 06:04:56)

Re: Cron errors in postmaster inbox

The errors I am getting are as follows:

Cron <sogo@UbuntuSrv01> /usr/sbin/sogo-ealarms-notify

2015-07-02 09:57:01.811 sogo-ealarms-notify[13953] Failed to create lock directory '/var/lib/sogo/GNUstep/Defaults/.lck/.GNUstepDefaults.lck' -

Cron <sogo@UbuntuSrv01> /usr/sbin/sogo-tool expire-sessions 30

2015-07-02 09:51:01.327 sogo-tool[13868] Failed to create lock directory '/var/lib/sogo/GNUstep/Defaults/.lck/.GNUstepDefaults.lck' -

Please let me know if you require further information.

NOTE: This is a fresh Install of Ubuntu Server with nothing else configure but IRedMail.

7

Re: Cron errors in postmaster inbox

Please increase the cron job interval, for example, run it every 5 minutes instead of every 1 minute. You can check the cron job with command:

# crontab -l -u sogo

And edit it:

# crontab -e -u sogo

8

Re: Cron errors in postmaster inbox

ZhangHuangbin wrote:

Please increase the cron job interval, for example, run it every 5 minutes instead of every 1 minute. You can check the cron job with command:

# crontab -l -u sogo

And edit it:

# crontab -e -u sogo

Hmm I dont see a setting in here to increase the job interval, maybe this is done elsewhere - I dont fully understand Cron jobs to investigate further.

I did find an article with a bit of googling and the solution was as follows:

"The only reasonable explanation that came to my mind would be a race
> between sogo-tool and sogo-ealarms-notify, as they run both every
> minute, but I'm not even sure this is possible. I'm testing chaining the
> commands as
>
> * * * * * sogo /usr/sbin/sogo-ealarms-notify &&
> /usr/sbin/sogo-tool expire-sessions 60"

I have tried this and will see how it goes...

9

Re: Cron errors in postmaster inbox

This is the default cron jobs for sogo user:

*   *   *   *   *   /usr/sbin/sogo-ealarms-notify
*   *   *   *   *   /usr/sbin/sogo-tool expire-sessions 30

It runs every minute, you can increase the interval to, for example, 5 minutes:

*/5   *   *   *   *   /usr/sbin/sogo-ealarms-notify
*/5   *   *   *   *   /usr/sbin/sogo-tool expire-sessions 30

10

Re: Cron errors in postmaster inbox

The changes I made above seemed to have resolved the issue.

Also thanks for this info. I will also extend the time to 5 mins to make sure these errors do not re-occur.

I have logged in this morning after leaving it overnight and can confirm there are none of these messages waiting for me this morning! smile

Thanks alot for guiding me through this.