[SOLVED]Problems with crontab

Moderator: crythias

Locked
paulosergio
Znuny newbie
Posts: 35
Joined: 28 Jul 2011, 19:43
Znuny Version: 3.0.9
Real Name: Paulo Sergio Ueda Braghetto
Company: Rio branco

[SOLVED]Problems with crontab

Post by paulosergio »

Hello,

I´m with problems on crontab from otrs 3.0.09, apparently the crontab is work fine, but the emails from otrs when the new ticket was created doesnt get.

But if run fecht mail from the otrs web console, i can receive the emails.

Other problem is with the comunication with the ticket with the user, for example if i post a reply on the ticket, this email doesnt get to the user, is it depends the crontab too ?

See the logs below


Aug 3 12:24:01 debian /USR/SBIN/CRON[20275]: (otrs) CMD (otrs /usr/bin/fetchmail -a --ssl >> /var/log/otrs/log2)
Aug 3 12:24:01 debian /USR/SBIN/CRON[20273]: (CRON) error (grandchild #20275 failed with exit status 127)
Aug 3 12:24:01 debian /USR/SBIN/CRON[20276]: (otrs) CMD (otrs [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /var/log/otrs/log1)
Aug 3 12:24:01 debian /USR/SBIN/CRON[20274]: (CRON) error (grandchild #20276 failed with exit status 127)
Aug 3 12:24:01 debian /USR/SBIN/CRON[20278]: (otrs) CMD (otrs $HOME/bin/otrs.PostMasterMailbox.pl >> /var/log/otrs/log3)
Aug 3 12:24:01 debian /USR/SBIN/CRON[20272]: (CRON) error (grandchild #20278 failed with exit status 127)
Aug 3 12:24:01 debian /USR/SBIN/CRON[20272]: (otrs) END (otrs $HOME/bin/otrs.PostMasterMailbox.pl >> /var/log/otrs/log3)
Aug 3 12:24:01 debian /USR/SBIN/CRON[20273]: (otrs) END (otrs /usr/bin/fetchmail -a --ssl >> /var/log/otrs/log2)
Aug 3 12:24:01 debian /USR/SBIN/CRON[20274]: (otrs) END (otrs [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /var/log/otrs/log1)
Aug 3 12:25:01 debian /USR/SBIN/CRON[20291]: (otrs) CMD (otrs /usr/bin/fetchmail -a --ssl >> /var/log/otrs/log2)
Aug 3 12:25:01 debian /USR/SBIN/CRON[20292]: (otrs) CMD (otrs [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /var/log/otrs/log1)
Aug 3 12:25:01 debian /USR/SBIN/CRON[20288]: (CRON) error (grandchild #20291 failed with exit status 127)
Aug 3 12:25:01 debian /USR/SBIN/CRON[20289]: (CRON) error (grandchild #20292 failed with exit status 127)
Aug 3 12:25:01 debian /USR/SBIN/CRON[20295]: (otrs) CMD (otrs $HOME/bin/otrs.PostMasterMailbox.pl >> /var/log/otrs/log3)
Aug 3 12:25:01 debian /USR/SBIN/CRON[20287]: (CRON) error (grandchild #20295 failed with exit status 127)
Aug 3 12:25:01 debian /USR/SBIN/CRON[20288]: (otrs) END (otrs /usr/bin/fetchmail -a --ssl >> /var/log/otrs/log2)
Aug 3 12:25:01 debian /USR/SBIN/CRON[20289]: (otrs) END (otrs [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /var/log/otrs/log1)
Aug 3 12:25:01 debian /USR/SBIN/CRON[20287]: (otrs) END (otrs $HOME/bin/otrs.PostMasterMailbox.pl >> /var/log/otrs/log3)
Last edited by paulosergio on 15 Aug 2011, 20:35, edited 1 time in total.
renee
Znuny expert
Posts: 241
Joined: 06 Feb 2009, 11:15
Znuny Version: 3.0.x
Company: Perl-Services.de
Contact:

Re: Problems with crontab

Post by renee »

Did you hav a look at the logfiles /var/log/otrs/otrs[1-3]?
Need a Perl/OTRS developer? You can contact me at info@perl-services.de
paulosergio
Znuny newbie
Posts: 35
Joined: 28 Jul 2011, 19:43
Znuny Version: 3.0.9
Real Name: Paulo Sergio Ueda Braghetto
Company: Rio branco

Re: Problems with crontab

Post by paulosergio »

Hi renee,

the logs are blank.

Thanks

Regards
paulosergio
Znuny newbie
Posts: 35
Joined: 28 Jul 2011, 19:43
Znuny Version: 3.0.9
Real Name: Paulo Sergio Ueda Braghetto
Company: Rio branco

Re: Problems with crontab

Post by paulosergio »

Hello,

doing tests here, i saw that if i run the command in the command line, the result is ok, but the same commmand on the crontab return the error informed above.

someone to help me?

Thanks.

Regards.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Problems with crontab

Post by crythias »

fetchmail does not exist in usr/bin ?
http://tldp.org/LDP/abs/html/exitcodes.html
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
paulosergio
Znuny newbie
Posts: 35
Joined: 28 Jul 2011, 19:43
Znuny Version: 3.0.9
Real Name: Paulo Sergio Ueda Braghetto
Company: Rio branco

Re: Problems with crontab

Post by paulosergio »

Hello crythias,

My problem is with $HOME/bin/otrs.PostMasterMailbox.pl , because in the crontab the command doesnt run, but if i run in the command line it runs fine.

Thanks

Regards
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Problems with crontab

Post by crythias »

I understand what you're saying, but I'm telling you what cron thinks. for whatever reason, cron can't see or can't run fetchmail from /usr/bin. That is the error it's reporting.
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
paulosergio
Znuny newbie
Posts: 35
Joined: 28 Jul 2011, 19:43
Znuny Version: 3.0.9
Real Name: Paulo Sergio Ueda Braghetto
Company: Rio branco

[SOLVED] Re: Problems with crontab

Post by paulosergio »

My problem is solved, it was a right user problems.

Thanks for all
Locked