Keeping open fire running

Hi, I have installed the latest version of open fire on my server (centos 5.9). I have a couple of what I hope are simple issues.

1: when I access http://server:9090, I complete the setup but it is in a loop. I think I read that is means a certain file isn’t write able in the server. Can someone please point me in the right direction as to which file, and what command to type in to change these permissions?

2: I have openfire running via /etc/init.d/openfire start. I am able to access the setup via http://server:9090, however no clients can connect to the server. The only way I can get it to work is if I do the command like this:

Cd /opt/openfire/bin

./openfire.sh

After running this command, clients can connect via the usernames and passwords I created just fine. But as soon as I close the SSH connection, they shut down.

I can verify that openfire IS running as a service, but clients can’t connect.

I appreciate any help in advance. I’m just learning this system, as well as having never used Linux before.

How did you install Openfire? RPMs, or something else? What version do you have installed? You need pretty much everything in /opt/openfire to be installed by the user it runs as (usually openfire, or jive).

When you start it with the init.d script, what error do clients get when they try to connect? Is there anything logged in the error.log or info.log files that might shed some light on what it is doing? Can you compare the process command line arguments when you run it via openfire.sh versus the init.d script?

Either way, if your setup is messed up it probably won’t work right anyway. Are you using external db, or embedded?

Thanks David,

I installed Openfire via RPM (version 3.8.0). The error message when trying to log into Spark is “Can’t connect to server: Invalid Name or server not reachable”. (However this goes away when I run /opt/openfire/bin ./openfire.sh)

I am using a MySQL database. If you think it might be easier, I am open to deleting the database, completely uninstalling openfire and starting over. Not really sure how to completely uninstall it, though.

Most of the errors are in reference to that XML file not being writeable. I think I may have screwed up something when I did the initial install. I did not have java installed, then when I realized I needed it, I installed Java 1.7.0 with an RPM. The more I think about it the more I think I might need to just start fresh. Maybe a hint on how to remove all traces of openfire?

Thanks so much for a response!

Shutdown openfire, chown the conf/openfire.xml to the user openfire runs as and chmod 640 it. Then restart it.

Perhaps the issue is the init.d script is runnign openfire as one user, but running it directly from the command line runs it as another? In each instance of it running, do a ‘ps -ef | grep openfire’ and compare both the uid it is running as, as well as the command line arguments.

I think I should do this to change the permissions:

chmod 640 /opt/openfire/conf/openfire.xml

After running this command, my setup is still in a loop.

THis is what I get when i do the code you sent me:

root@vps [/]# ps -ef | grep openfire

daemon 3925 1 1 20:42 ? 00:00:09 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/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 4584 4074 0 20:57 pts/0 00:00:00 grep openfire

I’m not sure if daemon should be what I chown openfire to or not. And not sure what code I would run to acheive that anyway!

Thanks

You’re running as the user ‘daemon’ so chown /opt/openfire to that user.

chown -R daemon /opt/openfire