This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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?
--JBoss version 4.0.4
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.
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?
Joined: Mar 14, 2011
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.
subject: server.log doesn't save MaxBackupIndex= "5"