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.
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,
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.
Thanks for the help. I would love to run this is a service, but that link does not work. I’ll pour through the site to see if I can find that article. Regarding logs, yes, I checked them but they were not helpful.
However, I DID find the problem. I was starting Openfire by remotely connecting to the app server. When I terminated that remote connection, the processes were terminated as well. I went into the server room, hopped on the console, started Openfire, and it has been up ever since.
I answered my own question, but I don’t think I get any points for that!
I would love to run this is a service, but that link does not work.
This one should work:
Thanks for posting a good link.
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.
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
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.
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.
#! /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