This Question is Answered

10 Replies Last post: Aug 12, 2008 1:31 PM by Coolcat  
Patrick Lyon Bronze 4 posts since
Jul 30, 2008
Currently Being Moderated

Jul 30, 2008 3:07 PM

Why must I restart Openfire every morning?

I recently installed 3.5.2 on a Windows 2003 server with a MySQL database with Spark clients.  During my MySQL installation I was able to allow the database to be started as a service, but the Openfire installation did not have that option.

 

It seems like every morning I get into work, I cannot connect to the server.  So, I get onto the application server and have to start Openfire.  What shuts it down?  And how can I get it to run forever and start back up on a server reboot?

 

Thanks for your help.

 

Patrick

Ryan Graham KeyContributor 1,729 posts since
Jan 17, 2003
Currently Being Moderated
Jul 31, 2008 8:28 AM in response to: Patrick Lyon
Re: Why must I restart Openfire every morning?

Hi Patrick,

 

It's hard to know what is shutting down Openfire without knowing more about your environment. Is the server being restarted for some reason and Openfire doesn't start back up?

 

As for setting up Openfire as service, take a look at Running Openfire in Windows in the Openfire: Installation Guide.

 

Hope that helps,

Ryan

Puff Silver 38 posts since
Jul 2, 2008
Currently Being Moderated
Jul 30, 2008 6:02 PM in response to: Patrick Lyon
Re: Why must I restart Openfire every morning?

You can try taking a look at your logs (error.log and warn.log) before restarting your server in the morning and see if you can deduce what's causing it. You can also post a chunk of the end of some of your openfire server logs someone here can try taking a look see as well. It will be hard to tell as many people run in different environments, number of users, authetication/integration, etc. so it could be something that's not related to openfire that could be the cause.

Coolcat KeyContributor 519 posts since
Mar 19, 2007
Currently Being Moderated
Jul 31, 2008 6:35 AM in response to: Patrick Lyon
Re: Why must I restart Openfire every morning?
I would love to run this is a service, but that link does not work.

This one should work:

http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/install- guide.html#windows

Ryan Graham KeyContributor 1,729 posts since
Jan 17, 2003
Currently Being Moderated
Jul 31, 2008 8:26 AM in response to: Coolcat
Re: Why must I restart Openfire every morning?

Hey Coolcat,

 

Thanks for posting a good link.

 

Cheers,

Ryan

hosdes Bronze 33 posts since
Jul 29, 2008
Currently Being Moderated
Aug 8, 2008 10:22 AM in response to: Patrick Lyon
Re: Why must I restart Openfire every morning?

Patrick and Coolcat,

I read through this discussion as I have the same problem every morning.  I connect through shell from one computer to openfire server within the same lan.  every morning I have to do /etc/init.d/openfire stop and start.  I very tried cd /etc/init.d and typed ./openfire stop and start.  Both have not worked for me.

 

I have RPM installed on Centos.  Our openfire came with elastix.  Please advice.

Coolcat KeyContributor 519 posts since
Mar 19, 2007
Currently Being Moderated
Aug 9, 2008 2:59 PM in response to: hosdes
Re: Why must I restart Openfire every morning?

@hosdes:

You have to restart it because your server does a reboot every night? Everything you need to do is to configure it to start and shutsdown automatically. With the chkconfig command you can easily control in which runlevels an application should be started or stopped.

 

Check which is the current setting:

shell> chkconfig --list openfired

Ensure Openfire does run in the current runlevel:

shell> chkconfig openfired on

 

However, if this does not work, you can also do it by hand. This is my configuration. I should say that I'm not using the RPM packet.

[backup@jabber rc0.d]$ ls -l /etc/init.d/openfired
lrwxrwxrwx 1 root root 33 Dec  9 13:51 /etc/init.d/openfired -> /opt/openfire/bin/extra/openfired
[backup@jabber rc0.d]$ ls -l /etc/rc?.d/*openfired
lrwxrwxrwx 1 root root 19 Dec  9 13:51 /etc/rc0.d/K01openfired -> ../init.d/openfired
lrwxrwxrwx 1 root root 19 Dec  9 13:31 /etc/rc3.d/S70openfired -> ../init.d/openfired
lrwxrwxrwx 1 root root 19 Dec  9 13:43 /etc/rc6.d/K01openfired -> ../init.d/openfired

/etc/rcX is the directory for runlevel X. All scripts (or links) there are executed in alphabetical order. K**** stands for "kill" and S***** for "start". Ensure that dependencys like network or your database do start before and stop after Openfire.

 

Message was edited by: Coolcat

hosdes Bronze 33 posts since
Jul 29, 2008
Currently Being Moderated
Aug 12, 2008 1:13 PM in response to: Patrick Lyon
Re: Why must I restart Openfire every morning?

1/ I don't know if our server reboots every night.  Openfire came with elastix.  Openfire 3.5.1.  Elastix 1.1.7.  When I do a reboot in elastic admin cp, openfire works.

 

2/ chkconfig commands

I got this

[root@local ~]# chkconfig --list openfired
error reading information on service openfired: No such file or directory
[root@local ~]# chkconfig --list openfire
openfire        0:off  1:off  2:on    3:on    4:on    5:on    6:off

 

3/ ls -l commands

I got this

[root@local ~]# ls -l /etc/init.d/openfire
-rwxr-xr-x 1 daemon daemon 4560 Feb 19  2015 /etc/init.d/openfire
[root@local ~]# ls -l /etc/rc?.d/*openfired
ls: /etc/rc?.d/*openfired: No such file or directory

 

4/ ps command

I did research on the web and did this.

[root@local ~]# ps -ef | grep -i openfire
daemon    2741     1  3 10:52 ?        00:00:39 /opt/openfire/jre/bin/java -server -DopenfireHome=/opt/openfire -Dopenfire.lib.dir=/opt/openfire/lib -classpath /opt/openfire/lib/startup.jar -jar /opt/openfire/lib/startup.jar
root      3088  3060  0 11:09 pts/1    00:00:00 grep -i openfire

 

Please advise.  We really need to get openfire working.

Coolcat KeyContributor 519 posts since
Mar 19, 2007
Currently Being Moderated
Aug 12, 2008 1:31 PM in response to: hosdes
Re: Why must I restart Openfire every morning?
I don't know if our server reboots every night. 

Hm, you should find out that first


E.g. you could write a script that writes current time to an logfile and run this via cron-job every minute.

 

Script:

#! /bin/sh

logFile="/home/coolcat/system.log"
logDateFormat="[%d.%m.%Y - %k:%M:%S]"

echo "$(date "+$logDateFormat") system running" 1>>$logFile 2>>$logFile

Obviously the script will write log to /home/coolcat/system.log

Make sure your script is executeable.

 

Now execute the following command, this will output your current cron-jobs to file "cron" in current directory. Maybe there are no cron-jobs yet, then the file will be empty.

shell> crontab -l >cron

Open this file with your editor and add the following line. This will execute the script every minute.

* * * * * /home/coolcat/your_scripts_name

Now import the "cron" file again:

shell> crontab cron

More Like This

  • Retrieving data ...