Startup scripts do not work correctly on Fedora 20

I have done a fresh install of the 3.8.2 release using the RPM for RedHat family Linux. I am installing on Fedora 20.

The init scripts behave strangely:

/etc/init.d/openfire start (or service openfire start) incorrectly reports that the operation fails:

[root@localhost ~]# service openfire start

Starting openfire (via systemctl): Job for openfire.service failed. See ‘systemctl status openfire.service’ and ‘journalctl -xn’ for details.

[FAILED]

Though the script reports that the server failed to start, it does in fact start:

[root@localhost ~]# ps xa | grep openfire

9962 ? Sl 0:33 /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

10018 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(40408) idle

10019 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(40409) idle

10020 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(40411) idle

10021 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(40412) idle

10022 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(40413) idle

Conversely, /etc/init.d/openfire stop (or service openfire stop) incorrectly reports that the service has been halted:

[root@localhost ~]# service openfire stop

Stopping openfire (via systemctl): [ OK ]

When in reality the server is still running:

[root@localhost ~]# ps xa | grep openfire

9962 ? Sl 0:33 /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

10018 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(40408) idle

10019 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(40409) idle

10020 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(40411) idle

10021 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(40412) idle

10022 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(40413) idle

Hi,

I am also facing same problem. After installing openfire on my Fedora system and tried to start it is not working.

Giving same errors as you mentioned.

How did you resolve your problem.

Regards,

Bharat

The startup script works, though it reports that it fails, so

service openfire start

does in fact start the server

To stop the server, I’ve just been killing the process with

kill -9 PID

please check your systemd logs as indicated in the original error. Fedora has switched from using SysV scripts to systemd which alters how services work, and startup/shutdown. However it should provide backwards compatibility, to a decent degree at least.

Hi,

Yes Aaron you are correct.

Even after it shows FAIL it is starting the server.

I have also forgot to install zlib package for 32-bit architectures.

Regards,

Bharat

It would be interesting if someone could post the output of:

See ‘systemctl status openfire.service’ and ‘journalctl -xn’ for details.

Using the kill cmd to force-halt the process is likely not great for your openfire install and may lead to problems.

[root@localhost ~]# ps xa | grep openfire

2468 pts/10 S+ 0:00 grep --color=auto openfire

[root@localhost ~]# service openfire start

Starting openfire (via systemctl): Job for openfire.service failed. See ‘systemctl status openfire.service’ and ‘journalctl -xn’ for details.

[FAILED]

[root@localhost ~]# systemctl status openfire.service

openfire.service - SYSV: Openfire is an XMPP server, which is a server that facilitates XML based communication, such as chat.

Loaded: loaded (/etc/rc.d/init.d/openfire)

Active: failed (Result: resources) since Fri 2014-02-28 10:36:18 GMT; 11s ago

Process: 2487 ExecStart=/etc/rc.d/init.d/openfire start (code=exited, status=0/SUCCESS)

Feb 28 10:36:16 localhost.localdomain systemd[1]: Starting SYSV: Openfire is …

Feb 28 10:36:17 localhost.localdomain su[2497]: (to daemon) root on none

Feb 28 10:36:17 localhost.localdomain openfire[2487]: Starting openfire:

Feb 28 10:36:18 localhost.localdomain systemd[1]: PID file /var/run/openfire…

Feb 28 10:36:18 localhost.localdomain systemd[1]: Failed to start SYSV: Openf.

Feb 28 10:36:18 localhost.localdomain systemd[1]: Unit openfire.service enter.

Hint: Some lines were ellipsized, use -l to show in full.

[root@localhost ~]# journalctl -xn

– Logs begin at Thu 2013-07-18 21:58:42 IST, end at Fri 2014-02-28 10:36:35 G

Feb 28 10:36:17 localhost.localdomain su[2497]: pam_unix(su:session): session

Feb 28 10:36:17 localhost.localdomain su[2497]: pam_unix(su:session): session

Feb 28 10:36:17 localhost.localdomain openfire[2487]: Starting openfire:

Feb 28 10:36:18 localhost.localdomain systemd[1]: PID file /var/run/openfire.p

Feb 28 10:36:18 localhost.localdomain systemd[1]: Failed to start SYSV: Openfi

– Subject: Unit openfire.service has failed

– Defined-By: systemd

– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit openfire.service has failed.

– The result is failed.

Feb 28 10:36:18 localhost.localdomain systemd[1]: Unit openfire.service entere

Feb 28 10:36:35 localhost.localdomain dbus-daemon[756]: dbus[756]: [system] Ac

Feb 28 10:36:35 localhost.localdomain dbus-daemon[756]: dbus[756]: [system] Ac

Feb 28 10:36:35 localhost.localdomain dbus[756]: [system] Activating via syste

Feb 28 10:36:35 localhost.localdomain dbus[756]: [system] Activation via syste

[root@localhost ~]# ps xa | grep openfire

2506 ? Sl 0:05 /opt/openfire/jre/bin/java -server -DopenfireHome=/t/openfire -Dopenfire.lib.dir=/opt/openfire/lib -classpath /opt/openfire/lib/srtup.jar -jar /opt/openfire/lib/startup.jar

2558 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(50420) idle

2559 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(50421) idle

2560 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(50423) idle

2561 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(50424) idle

2562 ? Ss 0:00 postgres: openfire openfire 127.0.0.1(50425) idle

2609 pts/10 S+ 0:00 grep --color=auto openfire