Stopping Openfire, Kill usage incorrect

Hello All,

I have recently compiled openfire, after getting it running, when I try to stop it I notice it seems to be trying to use ‘incorrect’ synatx.

travis@mycooldomain:/opt/openfire/bin$ sudo ./openfirectl stop

Shutting down openfire: ./openfirectl: 148: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]… or

kill -l [exitstatus]

Upon looking inside the stop() script I have found it’s attempted syntax to be

[ -f “$OPENFIRE_PIDFILE” ] && kill cat $OPENFIRE_PIDFILE

Any ideas as to what could be going wrong? Is somehow $OPENFIRE_PIDFILE not being set properly? I would do more on my end but I know very little of this coding language.

EDIT

Just some info the .pid vile IS being saved in /var/run

-rw-r–r-- 1 root root 1 May 13 15:43 openfire.pid

Openfire however is being ran as the default daemon user. Could this be the issue?

I also have noticed that I can run

openfirectl start

An unlimited ammount of times, and it creates a new process every time… So openfire must not know that openfire is running, so openfire is having permission issues… So what openfire permissions would be affected by this?

I’m sure that openfire is running as the user ‘daemon’ and ALL files in the /opt/openfire folder are owned by the user and group daemon. So any ideas?

Also, nobody can connect to the server (because I’m assuming it cannot access the keystore or truststore. In fact, Openfire even tells me under certificiates that it cannot access the keystore, or truststore even though they are owned by daemon with permissions"

-rwxrw-r-- 1 daemon daemon 32 May 13 15:34 client.truststore

-rwxrw-r-- 1 daemon daemon 6789 May 13 15:34 keystore

-rwxrw-r-- 1 daemon daemon 50936 May 13 15:34 truststore

Any one have any ideas?

If the pid in openfire.pid does not match the actual Openfire pid you’ll get this error. No idea how this did happen.

Anything that I could possibly try? I have tried to delete all of the /opt/openfire and recompile and restart it. Same issue.

If you want to test things:

Stop/kill Openfire and remove openfire.pid

Start Openfire. Get the pid with ‘ps’ and compare it with openfire.pid.

They must/should match.