Scheduler is not running
Moderator: crythias
Scheduler is not running
Hello, every time i restart the OTRS server, I have the message (Scheduler is not running) that appears in the console. I run the script (/otrs.Scheduler.pl -a start) and the message disappears. Ok but I would like the service to start automatically. I look at :
https://otrs.github.io/doc/manual/admin ... eduler-cli
I see :
OTRS provides init.d scripts to start / stop the OTRS Scheduler process automatically by the operating system. These scripts are located under OTRS_HOME/scripts.
But I do not find this file. How i should do for this service to start automatically?
Thx
https://otrs.github.io/doc/manual/admin ... eduler-cli
I see :
OTRS provides init.d scripts to start / stop the OTRS Scheduler process automatically by the operating system. These scripts are located under OTRS_HOME/scripts.
But I do not find this file. How i should do for this service to start automatically?
Thx
Otrs 5 - Mysql 5 - Centos 7
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Scheduler is not running
Code: Select all
crontab -l -u otrs | grep Scheduler
Code: Select all
su - otrs
echo $HOME
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
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
Re: Scheduler is not running
thx for your reply
Code: Select all
crontab -l -u otrs | grep Scheduler
*/5 * * * * $HOME/bin/otrs.Scheduler.pl -w 1 >> /dev/null
Code: Select all
su - otrs
[root@servmotrs ~]# echo $HOME
/root
Otrs 5 - Mysql 5 - Centos 7
Re: Scheduler is not running
Seems to be the wrong HOME dir...
should be: /opt/otrs
... so you might have a permission issue ?!
Code: Select all
echo $HOME
... so you might have a permission issue ?!
LIVE: OTRS 5.0.14 || Debian || MySQL/LDAP
TEST: OTRS 5.0.14 || Debian || MySQL/LDAP
TEST: OTRS 5.0.14 || Debian || MySQL/LDAP
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Scheduler is not running
Not sure about that, the substitute user didn't go through properly. You see it in the shell the user is still root.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
-
- Administrator
- Posts: 4011
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: Scheduler is not running
Check what homedir and shell the OTRS user hast:
If there is no valid login shell (see /etc/shell) try
or set a valid shell:
Code: Select all
getent passwd otrs
Code: Select all
su - otrs -s /bin/bash
Code: Select all
chsh -s /bin/bash otrs
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
-
- Znuny newbie
- Posts: 61
- Joined: 13 Mar 2015, 18:34
- Znuny Version: 6.4
- Real Name: Rich Hagan
- Company: Victorinox Swiss Army, Inc.
Re: Scheduler is not running
I just figured out how to fix this on my CentOS 6.5 system running OTRS 3.3.12, there were read/write error in my otrs system log as well:
My mistake was that I didn't switch user correctly 'su - otrs' didn't work. I should have used 'su -s /bin/bash - otrs'. To fix this:
reboot
check scheduler:
perl /opt/otrs/bin/otrs.Scheduler.pl -a status
My mistake was that I didn't switch user correctly 'su - otrs' didn't work. I should have used 'su -s /bin/bash - otrs'. To fix this:
Code: Select all
service otrs stop
/opt/otrs/bin/otrs.Scheduler.pl -a stop --force
service crond stop
service httpd stop
su -s /bin/bash - otrs
/opt/otrs/bin/otrs.RebuildConfig.pl
/opt/otrs/bin/otrs.LoaderCache.pl -o delete
/opt/otrs/bin/otrs.DeleteCache.pl
/opt/otrs/bin/otrs.DeleteSessionIDs.pl --all
exit (back to root)
/opt/otrs/bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache /opt/otrs
Code: Select all
mysql -u root -p
use otrs;
delete from process_id;
exit
Code: Select all
su -s /bin/bash - otrs
/opt/otrs/bin/Cron.sh start
check scheduler:
perl /opt/otrs/bin/otrs.Scheduler.pl -a status
Re: Scheduler is not running
with :
thx for that
Now i pass all command from RichH, the scheduler is running after a reboot + 5 min
but :
i can su - otrssu - otrs -s /bin/bash
chsh -s /bin/bash otrs
thx for that
Now i pass all command from RichH, the scheduler is running after a reboot + 5 min
but :
Code: Select all
perl /opt/otrs/bin/otrs.Scheduler.pl -a status
>> Can't write opt/otrs/var/log/otrs.log: Aucun fichier ou dossier de ce type <<
Running 2325
Otrs 5 - Mysql 5 - Centos 7
-
- Znuny advanced
- Posts: 133
- Joined: 07 Oct 2015, 05:54
- Znuny Version: 7.0.2
- Real Name: Tony
- Company: Upson Productions, LLC
- Location: DC
Re: Scheduler is not running
The Debian 8 OS itself doesnt appear to have a cronjob for the Scheduler:
This job was defaulted to run every 5 minutes, but this also appears to be overkill for its use in my Agency. I have since adjusted thist to every 15 minutes (may even up it to 30 minutes).
The way I seemed to bandaid this issue on my appliance is just to reduce the restart timer within OTRS GUI (SysConfig --> Scheduler --> Core) "Scheduler::RestartAfterSeconds" from the default of 86400 (24hrs) to 3600 (1hr); so that it auto restarts every 1hr if there are any failures/stops in between.
Thus, down time (if there is any from the warning to begin with) is cleared/reset every hour.
Code: Select all
: crontab -l -u otrs | grep Scheduler
: no crontab for otrs
But within Webmin there is a cronjob configured for OTRS services.
Code: Select all
test -x $HOME/bin/otrs.Scheduler.pl && $HOME/bin/otrs.Scheduler.pl -w 1 >> /dev/null
The way I seemed to bandaid this issue on my appliance is just to reduce the restart timer within OTRS GUI (SysConfig --> Scheduler --> Core) "Scheduler::RestartAfterSeconds" from the default of 86400 (24hrs) to 3600 (1hr); so that it auto restarts every 1hr if there are any failures/stops in between.
Thus, down time (if there is any from the warning to begin with) is cleared/reset every hour.
Tony
OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments
OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments