Logging not working - log4j errors

Hello,

I’ve mostly got Openfire (3.7.0) working, but am still having issues with webchat. Before I can troubleshoot that some more, I think I need to be able to see any errors that are popping up. Currently all logging is enabled, including debug logging. In the web UI there are no logs shown under any tabs, and in openfire’s home/logs directory there is only a “stats.txt” which seems to be logs of db operations.

What I’ve checked:

-openfire is running as user “openfire” and the log directory is owned by that user (and it can write the ‘stats.txt’ log)

-java’s $HOME seems to be set, the full command line when the server is running is “openfire 84708 0.0 2.3 422408 79556 ?? Ss 1:20AM 2:28.99 /usr/local/diablo-jdk1.6.0/bin/java -server -jar -Xmx256M -Dopenfire.lib.dir=/usr/local/share/java/classes -DopenfireHome=/usr/local/share/java/openfire /usr/local/share/java/classes/startup.jar”

-if I start openfire by hand, I get a ton of logging to STDOUT

When I start it by hand, I get these two messages that seem to indicate something is amiss with log4j:

log4j:WARN No appenders could be found for logger (org.jivesoftware.util.log.util.CommonsLogFactory).
log4j:WARN Please initialize the log4j system properly.
Openfire 3.7.0 [Jun 28, 2011 2:22:33 PM]

I’ve seen some mention of a log4j.xml file on the boards here, but I’m not seeing it anywhere in my distribution.

Any tips on what’s going on?

I had this same issue on FreeBSD. I figure that you’re on FreeBSD (diablo-jdk).

It turns out that you’re correct about log4j.xml. However, the FreeBSD port does not install that file. Here’s a link to a log4j.xml file that works: http://pastebin.com/KkctHnQc

Just stick it in /usr/local/java/share/classes

I will send a PR into FreeBSD to fix the port.

HTH

That seems to have done it. I now have logs.

Thanks so much!

Hi,

I had a similar problem after migrating to Openfire 3.7.1 on OpenSuSE 11.3: There was no log4j.xml file.

The serious problem was that neither the admin app nor the client did work - blank screen and no connection.

I then tried to use the log4j.xml file from pastebin.com as mentioned above and copied it to my openfire/lib directory. After that, only the Kraken plugin still moaned and threw an exception.

I tried to copy the file to the plugins/kraken/lib directory too, but that did not help, so I removed the kraken.jar and directory competely.

No Openfire 3.7.1 works but without kraken for now.

Hint: Use the -Dlog4j.debug option in your /etc/sysconfig/openfire file:

OPENFIRE_OPTS="-Dlog4j.debug"

Then check logs/nohup.out for the place where log4j looks for its config file.

Just for the other dummies like me out there… hopefully I am not wrong.

Regards,

Stefan