[SOLVED] Otrs Daemon doesn't run on startup

Moderator: crythias

Post Reply
minusnine
Znuny newbie
Posts: 7
Joined: 22 Jun 2016, 16:23
Znuny Version: 5 Free

[SOLVED] Otrs Daemon doesn't run on startup

Post by minusnine »

Greetings!
Cron service is active everytime I boot my server, yet it doesn't run the Otrs Daemon no matter how long I wait
I've got the /opt/otrs/var/cron/otrs_daemon file without the .dist extension as specified. I'm forced to run

Code: Select all

bin/otrs.Daemon.pl start
each time I boot
Any ideas?
Thanks!
Last edited by minusnine on 11 Jul 2016, 18:41, edited 1 time in total.
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Otrs Daemon doesn't run on startup

Post by wurzel »

Hi,

what cronjobs are active for otrs user after a restart?
What is your $OTRSHOME ?

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
minusnine
Znuny newbie
Posts: 7
Joined: 22 Jun 2016, 16:23
Znuny Version: 5 Free

Re: Otrs Daemon doesn't run on startup

Post by minusnine »

Hi wurzel! Thanks for replying!
wurzel wrote:what cronjobs are active for otrs user after a restart?
How do I check that?
crontab -l -u otrs returns this after restart:

Code: Select all

# Who gets the cron emails?
MAILTO="root@localhost"

# check OTRS daemon status
*/5 * * * *    $HOME/bin/otrs.Daemon.pl start >> /dev/null
I found it weird that my /var/cron folder actually has very few jobs:

Code: Select all

otrs@OTRS:/opt/otrs/var/cron$ ls
aaa_base  aaa_base.dist  otrs_daemon  otrs_daemon.dist

wurzel wrote:What is your $OTRSHOME ?
My home is

Code: Select all

otrs@OTRS:/opt/otrs$
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Otrs Daemon doesn't run on startup

Post by wurzel »

Hi,

looks all nice. The Daemon should start at least after 5 minutes.


You have to check the logs, why it isn't.

Florian
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
minusnine
Znuny newbie
Posts: 7
Joined: 22 Jun 2016, 16:23
Znuny Version: 5 Free

Re: Otrs Daemon doesn't run on startup

Post by minusnine »

wurzel wrote:Hi,

looks all nice. The Daemon should start at least after 5 minutes.


You have to check the logs, why it isn't.

Florian
We didn't get any tickets for almost two days because a partner rebooted the server, and the rest didn't notice. So I guess time isn't the issue :lol:
The system log in the application doesn't show anything
All logs in /opt/otrs/var/log/Daemon$ are empty
Any ideas?
minusnine
Znuny newbie
Posts: 7
Joined: 22 Jun 2016, 16:23
Znuny Version: 5 Free

Re: Otrs Daemon doesn't run on startup

Post by minusnine »

Fixed it!
My crontab was looking for the daemon at $HOME/bin/otrs.Daemon.pl start, when it was actually located in /opt/otrs/bin/otrs.Daemon.pl start
I just ran crontab -e and fixed the path

Edit: Using $OTRSHOME instead of $HOME may have fixed it too? I instead used the absolute path
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Otrs Daemon doesn't run on startup

Post by wurzel »

Hi,

$HOME should be /opt/otrs

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Otrs Daemon doesn't run on startup

Post by crythias »

minusnine wrote:My crontab was looking for the daemon at $HOME/bin/otrs.Daemon.pl start, when it was actually located in /opt/otrs/bin/otrs.Daemon.pl start
I just ran crontab -e and fixed the path

Edit: Using $OTRSHOME instead of $HOME may have fixed it too? I instead used the absolute path
wurzel wrote:$HOME should be /opt/otrs
It's true. Cron should be running as the otrs user, using the otrs usr's home environment variable.
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
minusnine
Znuny newbie
Posts: 7
Joined: 22 Jun 2016, 16:23
Znuny Version: 5 Free

Re: Otrs Daemon doesn't run on startup

Post by minusnine »

Well, my home directory is almost empty

Code: Select all

otrs@OTRS:~$ cd $home
otrs@OTRS:~$ ls
otrs-5.0.10.tar.gz
otrs@OTRS:~$
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [SOLVED] Otrs Daemon doesn't run on startup

Post by root »

Environment variables are case sensitive. Try $HOME or just enter

Code: Select all

cd
followed by

Code: Select all

pwd
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 ?
Post Reply