The server.log suddenly stopped creating 5 backups as I've indicated in the log4j.xml.
The service worked fine for several weeks then suddenly quit.
I've restarted the service this made no change. Currently it's saving one backup.
Below is a selection of my log4j.xml file. I could just reinstall the application but this is a production server
and I hoped someone might've experienced this and have another idea?
Many thanks,
Mark
--JBoss version 4.0.4
--JAVA 1.5
Running on Windows 2003 server SP2
William (or is it Mark? I'm confused!), welcome to Java Ranch!
Currently it's saving one backup.
Let me see if I understand this correctly. You are saying that you have two server log files in server/xxx/log, one if server.log and the other something like server.log.001 (I can't recall the exact naming convention for the backup log file). In addition, the backup log file contains the immediately prior set of log entries; that is, prior to the first log entry in server.log. And server.log contains the most recent log entries.
Some things that I would check:
a) There is no batch job running that is automatically removing (or moving) older files.
b) The disk is not out of space.
c) There is no stray version of log4j somewhere. (Add "-verbose:class" to the JAVA_OPTS in the run script, look for the log4j classes being loaded and the jar it is coming from)
d) Double-check the permissions on the log directory, make sure the account running JBoss AS has sufficient permissions
By the way, it would help tremendously if you also told us:
1) which version of JBoss AS
2) which OS you are running on
3) which JVM you are running
Yes that's it exactly. I currently have two server.logs when a few days ago JBoss was creating 5 per the log4j file.
My first name is William, but I signoff with my middle name, hope that fixes any confusion. Thanks for the greeting!!
No batch file removing the older files.
Disk space looks good,
As do the permissions.
There are other log4j files in separate directories. ( we run mulitple server instances on this Windows 2003 SP2 box)
Shouldn't affect this instance though.
Thanks for your suggestions. I've noted the JBoss and JAVA versions in the first note.
One other thing. I did try changing the value from 5 to 1 again. Allowing some time for JBoss to see the change
and then changing it back hoping to 'jar' the system back to normal. Unsuccessful attempt.
I think that JBoss AS re-reads the jboss-log4j.xml file periodically (once and hour?), but to really be sure you should restart it after changing that file.
William Woodland
Greenhorn
Joined: Mar 14, 2011
Posts: 6
posted
0
Thanks to both replies.
I'm still checking on the size of the current server.log and backup file.
We start the JBoss service each Wed. morning at 02:00am and I made the change Tues night. I'd hoped
the reboot might get the service and log4j file back 'aligned'. That didn't happen.
I have asked that another log4j.xml file, (one I've created) be copied in place of
this old one. I'm awaiting the outcome of that.
Will update here when I know more. I've looked around on other Java and JBoss sites
this doesn't appear to be a common issue.
William Woodland
Greenhorn
Joined: Mar 14, 2011
Posts: 6
posted
0
I reinstalled the JBoss server yesterday and the server.log continues to only produce
1 file, (currently 135mb)
There are a few other running instances of JBoss on this server (other log4j files) but they're in different directories and
have never interfered with server.log since this malfunction started about a month ago.
I would expect the second log file to start being produced when the first log file exceeded 500MB. Is that not your understanding of that configuration file?
William Woodland
Greenhorn
Joined: Mar 14, 2011
Posts: 6
posted
0
Yes, that's my expectation too. And it was working fine for a nearly a month then suddenly stopped.
The reason I'd set the figure so high was to capture a day's worth of webserver activity. At the default setting, 50mb, 2 backup files, only 10min activity was being captured. I recently checked the current 135mb file and we're now capturing 28hrs. of web server activity.
Thanks for all comments! I'd still like to figure out why the logging isn't following the log4j parameters but I can't spend
any more time on this especially since the business need is being met.