cronjob wird auf einmal nicht mehr ausgeführt [gelöst]

Hilfe zu OTRS Problemen aller Art
Post Reply
staybb
OTRS expert
Posts: 51
Joined: 01 Jul 2011, 09:39
OTRS Version?: 3.0.4

cronjob wird auf einmal nicht mehr ausgeführt [gelöst]

Post by staybb »

Seit heute gehen auf einmal die Cronjobs nicht mehr. Es werden zb. keine Mails mehr automatisch vom Postmaster abgerufen..
Ich habe lediglich ein MultiSMTP Paket in OTRS hinzugefügt, aber das hat doch garnix damit zu tun...

Folgendes Beispiel aus der crontab mit crontab -l -u otrs:

Code: Select all

# fetch emails every minute
*/1 * * * *    opt/otrs/bin/otrs.PostMasterMailbox.pl >> /dev/null
Wenn ich die Mails manuell abrufe über OTRS geht es.

Was kann ich noch testen damit der cronjob wieder geht
Last edited by staybb on 02 Nov 2012, 12:50, edited 1 time in total.

jojo
Moderator
Posts: 14678
Joined: 26 Jan 2007, 14:50
OTRS Version?: Git Master
Contact:

Re: cronjob wird auf einmal nicht mehr ausgeführt

Post by jojo »

was gibt crontab -l -u otrs aus
was sagen die Logfiles?
"Production": OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com :: Share your ideas

staybb
OTRS expert
Posts: 51
Joined: 01 Jul 2011, 09:39
OTRS Version?: 3.0.4

Re: cronjob wird auf einmal nicht mehr ausgeführt

Post by staybb »

Welche Logs meinst du? Gibt es extra für cronjobs eine logfile?


crontab -l -u otrs:

Code: Select all

# --
# cron/aaa_base - base crontab package
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: aaa_base.dist,v 1.7 2009/02/16 20:35:25 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# Who gets the cron emails?
MAILTO="root@localhost"
# --
# cron/cache - delete expired cache
# Copyright (C) 2001-2010 OTRS AG, http://otrs.org/
# --
# $Id: cache.dist,v 1.2 2010/11/22 12:15:35 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# delete expired cache weekly (Sunday mornings)
20 0 * * 0   opt/otrs/bin/otrs.DeleteCache.pl --expired >> /dev/null
30 0 * * 0   opt/otrs/bin/otrs.LoaderCache.pl -o delete >> /dev/null
# --
# cron/fetchmail - fetchmail cron of the OTRS
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: fetchmail.dist,v 1.10 2009/02/16 20:53:10 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch every 5 minutes emails via fetchmail
#*/5 * * * * [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /dev/null
#*/5 * * * *    /usr/bin/fetchmail -a --ssl >> /dev/null
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: generic_agent.dist,v 1.15 2012/02/07 20:11:16 jb Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# start generic agent every 20 minutes
*/20 * * * *    opt/otrs/bin/otrs.GenericAgent.pl >> /dev/null

# example to execute otrs.GenericAgent.pl on 23:00 with
# Kernel::Config::GenericAgentMove job file
#0 23 * * *  opt/otrs/bin/otrs.GenericAgent.pl -c "Kernel::Config::GenericAgentMove" >> /dev/null
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: generic_agent-database.dist,v 1.9 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# start generic agent every 10 minutes
*/10 * * * *     opt/otrs/bin/otrs.GenericAgent.pl -c db >> /dev/null
# --
# cron/pending_jobs - pending_jobs cron of the OTRS
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: pending_jobs.dist,v 1.12 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# check every 120 min the pending jobs
45 */2 * * *     opt/otrs/bin/otrs.PendingJobs.pl >> /dev/null
# --
# cron/postmaster - postmaster cron of the OTRS
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: postmaster.dist,v 1.9 2009/02/16 20:55:11 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# check daily the spool directory of OTRS
#10 0 * * * * [ -e /etc/init.d/otrs ] && /etc/init.d/otrs cleanup >> /dev/null; [ -e /etc/rc.d/init.d/otrs ] && /etc/rc.d/init.d/otrs cleanup >> /dev/null
10 0 * * *   opt/otrs/bin/otrs.cleanup >> /dev/null
# --
# cron/postmaster_mailbox - postmaster_mailbox cron of the OTRS
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: postmaster_mailbox.dist,v 1.3 2009/11/09 15:24:13 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch emails every minute
*/1 * * * *    opt/otrs/bin/otrs.PostMasterMailbox.pl >> /dev/null
# --
# cron/rebuild_ticket_index - rebuild ticket index for OTRS
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: rebuild_ticket_index.dist,v 1.10 2009/11/09 15:24:13 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# just every day
01 01 * * * opt/otrs/bin/otrs.RebuildTicketIndex.pl >> /dev/null
# --
# cron/session - delete old session ids of the OTRS
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: session.dist,v 1.12 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# delete every 120 minutes old/idle session ids
55 */2 * * *    opt/otrs/bin/otrs.DeleteSessionIDs.pl --expired >> /dev/null
# --
# cron/unlock - unlock old locked ticket of the OTRS
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: unlock.dist,v 1.11 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# unlock every hour old locked tickets
35 * * * *   opt/otrs/bin/otrs.UnlockTickets.pl --timeout >> /dev/null

jojo
Moderator
Posts: 14678
Joined: 26 Jan 2007, 14:50
OTRS Version?: Git Master
Contact:

Re: cronjob wird auf einmal nicht mehr ausgeführt

Post by jojo »

die "normalen" Linux logfiles. z.B. messages oder syslog oder auch daemon.log
"Production": OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com :: Share your ideas

staybb
OTRS expert
Posts: 51
Joined: 01 Jul 2011, 09:39
OTRS Version?: 3.0.4

Re: cronjob wird auf einmal nicht mehr ausgeführt

Post by staybb »

Also syslog.log sagt:

Code: Select all

Nov  2 10:52:01 SRVHTOTRS001 CRON[2266]: (otrs) CMD (opt/otrs/bin/otrs.PostMasterMailbox.pl >> /dev/null)
Nov  2 10:52:01 SRVHTOTRS001 CRON[2263]: (CRON) info (No MTA installed, discarding output)

jojo
Moderator
Posts: 14678
Joined: 26 Jan 2007, 14:50
OTRS Version?: Git Master
Contact:

Re: cronjob wird auf einmal nicht mehr ausgeführt

Post by jojo »

Du hast keinen lokalen MTA, daher diese Fehlermeldung: Nov 2 10:52:01 SRVHTOTRS001 CRON[2263]: (CRON) info (No MTA installed, discarding output)

Cron wollte Dir wohl was schicken... Überprüf mal die Rechte auf das OTRS Verzeichnis, bzw. setze sie neu. Ggf. hat der OTRS user keine Schreibrechte
"Production": OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com :: Share your ideas

staybb
OTRS expert
Posts: 51
Joined: 01 Jul 2011, 09:39
OTRS Version?: 3.0.4

Re: cronjob wird auf einmal nicht mehr ausgeführt

Post by staybb »

Berechtigungen habe ich nochmals gesetzt, immer noch kein cronjob.

Also der user ist in der Gruppe www-data und diese hat vollen Zugriff auf das Verzeichnis.

staybb
OTRS expert
Posts: 51
Joined: 01 Jul 2011, 09:39
OTRS Version?: 3.0.4

Re: cronjob wird auf einmal nicht mehr ausgeführt

Post by staybb »

Jetzt geht es wieder, komischerweise hat er den Pfad nicht genommen:

(opt/otrs/bin/otrs.PostMasterMailbox.pl >> /dev/null)

Nun habe ich es auf
($HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null)

geändert und es geht wieder.

jojo
Moderator
Posts: 14678
Joined: 26 Jan 2007, 14:50
OTRS Version?: Git Master
Contact:

Re: cronjob wird auf einmal nicht mehr ausgeführt [gelöst]

Post by jojo »

naja opt/otrs gibt es nicht, es muss /opt/otrs heißen

Warum hast Du denn die Dateien unter /opt/otrs/var/cron geändert?
"Production": OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com :: Share your ideas

Post Reply