Problem: no logs

Hi,

I have openfire running on osx 10.7 with mysql. (more details upon request)

in my admin interface all my log files appear as empty:

Log File:
error.log (0.0 K)
Last Modified:
Jan 1, 1970 1:00:00 AM

same for all other logs.

if I look in the directory /usr/local/openfire/logs

I see:

launchd.stderr

and

launchd.stdout

but no error/warn/info/debug logfiles

thanks for any input on this!

K.

bump? anyone an idea?

tx a lot!

K.

You did not say which version of Openfire. If 3.7.x, I suspect it can’t find your log4j.xml file. Check those two log files for a revelant message.

Also check the file permissions, maybe the openfire user can not write the logs.

Same problem.

error/warn/info/debug flogfiles are empty:

========/opt/openfire/logs/============

-rwxr-xr-x 1 root root 0 Июл 12 16:17 debug.log

-rwxr-xr-x 1 root root 0 Июл 12 16:18 error.log

-rwxr-xr-x 1 root root 0 Июл 12 16:17 info.log

-rwxr-xr-x 1 root root 10914 Июл 8 00:00 stderror.log

-rwxr-xr-x 1 root root 0 Мар 25 2011 stderr.out

-rwxr-xr-x 1 root root 186 Июл 8 00:00 stdoutt.log

-rwxr-xr-x 1 root root 0 Июл 12 16:18 warn.log

================================

But jive audit logs are alive:

=================================

-rw-r–r-- 1 root root 10654194 Июл 12 16:00 jive.audit-20120712-051.log

-rw-r–r-- 1 root root 6458560 Июл 12 16:20 jive.audit-20120712-052.log

================================

locate log4j.xml

/etc/openfire/log4j.xml

/opt/openfire/lib/log4j.xml

/usr/share/openfire/lib/log4j.xml

Debian 5, Openfire 3.7.0

Openfire runs for me (on Linux) as the user daemon

ps -ef |grep -i openfire

Does Debian run it as root? You might have to change the owner of the log files / directory so that Openfire can write to the files and create new files.

Openfire run from root.

ps -ef |grep -i openfire

root 3186 1 0 Jul02 ? 00:04:46 /usr/bin/python /opt/openfire/mrim/src/mrim.py -d -c /opt/openfire/mrim/mrim.conf

root 5348 5345 0 Jul08 ? 00:00:00 [openfired]

root 5434 1 0 Jul08 ? 00:51:14 /usr/bin/java -Xms1536m -Xmx1536m -server -Dinstall4j.jvmDir=/usr -Dexe4j.moduleName=/opt/openfire/bin/openfire.sh -classpath /opt/openfire/.install4j/i4jruntime.jar:/opt/openfire/lib/activation.jar:/opt/o penfire/lib/bouncycastle.jar:/opt/openfire/lib/commons-el.jar:/opt/openfire/lib/ hsqldb.jar:/opt/openfire/lib/jasper-compiler.jar:/opt/openfire/lib/jasper-runtim e.jar:/opt/openfire/lib/jdic.jar:/opt/openfire/lib/jtds.jar:/opt/openfire/lib/ma il.jar:/opt/openfire/lib/mysql.jar:/opt/openfire/lib/openfire.jar:/opt/openfire/ lib/postgres.jar:/opt/openfire/lib/servlet.jar:/opt/openfire/lib/slf4j-log4j12.j ar:/opt/openfire/lib/startup.jar com.install4j.runtime.Launcher start org.jivesoftware.openfire.starter.ServerStarter false false /opt/openfire/bin/…/logs/stderror.log /opt/openfire/bin/…/logs/stdoutt.log true true false true true 0 0 20 20 Arial 0,0,0 8 500 version 3.7.0 20 40 Arial 0,0,0 8 500 -1 -DopenfireHome=/opt/openfire/bin/…/ -Dopenfire.lib.dir=/opt/openfire/lib

root 28270 6581 0 08:33 pts/0 00:00:00 grep -i openfire

ls -la /opt/openfire/

drwxr-xr-x 14 root root 4096 Дек 27 2011 .

drwxr-xr-x 3 root root 4096 Мар 9 2011 …

drwxr-xr-x 3 root root 4096 Мар 9 2011 bin

-rw-r–r-- 1 root root 138821 Мар 3 2011 changelog.html

drwxr-xr-x 2 root root 4096 Июл 12 09:29 conf

drwxr-xr-x 4 root root 4096 Мар 3 2011 documentation

drwxr-xr-x 2 root root 4096 Дек 27 2011 fastpath

drwxr-xr-x 3 root root 4096 Дек 27 2011 index

drwxr-xr-x 2 root root 4096 Мар 9 2011 .install4j

drwxr-xr-x 2 root root 4096 Мар 9 2011 lib

-rw-r–r-- 1 root root 10871 Мар 3 2011 LICENSE.html

drwxr-xr-x 2 root root 12288 Июл 13 07:40 logs

drwxr-xr-x 3 root root 4096 Мар 9 2011 monitoring

drwxr-xr-x 3 root root 4096 Мар 10 2011 mrim

drwxr-xr-x 9 root root 4096 Янв 19 16:21 plugins

-rw-r–r-- 1 root root 5332 Мар 3 2011 README.html

drwxr-xr-x 7 root root 4096 Мар 3 2011 resources

I remove (rm /opt/openfire/logs/info.log) and then recreate (touch /opt//openfire/logs/info.log) and others, reboot server but nothing happend. Log are still empty.

the {$openfirehome} variable / placeholder in log4j.xml doesn’t pick the actual location of directory so replacing each occurance of {$openfirehome} in log4j.xml with the actual home directory path of the log files fixes the problem.

example:

old—

{$openfirehome}/logs/info.log

new–

/usr/local/openfire/logs/info.log

1 Like

Exactly!

After this logs start to fill out!

Big thanks.

Tried that v.3.8.0 and it still doesn’t work. Any devs in the thread that can point us to the issue? Logs still aren’t being filled out and th stderror.log is just becoming huge with ALL logs.

Your -DopenfireHome paramter is in the wrong place - Try updating the bin/openfire.sh script (or look at whatever startup script you are using) and make sure it is defined before the -classpath paramter. Probably also want to move Dopenfire.lib.dir, but that doesn’t have anything to do with log4j.