Cron - Error Message

Moderator: crythias

Locked
ccamel
Znuny newbie
Posts: 55
Joined: 08 Feb 2010, 12:44
Znuny Version: 5.0.9
Company: Zürich
Location: Zürich

Cron - Error Message

Post by ccamel »

Hi there

I get this error

Code: Select all

From: Cron<otrs@mydomain>$HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
To: me@mydomain
Message: >> Can't write opt/otrs/var/log/otrs.log: No such file or directory <<
I checked if there is such a file and guess what. There is a file and it haves current entries.

I tried also following...

Code: Select all

sudo perl /opt/otrs/bin/otrs.SetPermissions.pl /opt/otrs --otrs-user=otrs --web-user=www-data --otrs-group=nogroup --web-group=www-data
...and finally this...

Code: Select all

sudo chmod 666 /opt/otrs/var/log/otrs.log
Nothing helped! :(
OTRS 5.0.9, Ubuntu 14.04 Server, i386
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Cron - Error Message

Post by crythias »

ccamel wrote:opt/otrs/var/log/otrs.log
This is a relative path, not absolute.

The error message seems like something has changed or not following what was intended. Version of OTRS?

Also, check $HOME path of otrs in /etc/passwd
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
ccamel
Znuny newbie
Posts: 55
Joined: 08 Feb 2010, 12:44
Znuny Version: 5.0.9
Company: Zürich
Location: Zürich

Re: Cron - Error Message

Post by ccamel »

This was so obvious. Thank you. I use the version "OTRS 3.2.16".

I eliminated now all error messages, but I still have this strange error, I didn't mentioned in my first post.

Problem:
The cron job of the "otrs"-user is fetching e-mail via IMAP.

Code: Select all

May 28 10:08:01 myserver CRON[12233]: (otrs) CMD ($HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null)
And when there is a mail in the inbox it works like that

Code: Select all

[Wed May 28 10:10:06 2014][Notice][Kernel::System::MailAccount::IMAP::_Fetch] IMAP: Fetched 1 email(s) from "Support"/Mailserver.
But sometimes (periodically) the cron is working, but the mails are not fetched at all. They just hanging arround on the Mail server.

My workarround: I do it manually

Code: Select all

sudo perl otrs.PostMasterMailbox.pl -f 1
After that every thing works fine, till next time...
OTRS 5.0.9, Ubuntu 14.04 Server, i386
Locked