users@glassfish.java.net

GF restarts on its own (???)

From: <glassfish_at_javadesktop.org>
Date: Fri, 07 Dec 2007 02:11:09 PST

Hi,

I'm trying to do some load testing of a simple GF2 Instance (cluster profile, single server) in a nodeagent (local) hosted on linux 32 bit.

I have reconfigured the Log directory to be /opt/logs/gf/${com.sun.aas.instanceName}/server.log because deployer should be able to see their log files and we have a virtual host pointing to /opt/logs/gf (every server will then have it's own folder).

Everything is working fine until the log file reach 2 MB (the logger settings actually specify 2000000 Bytes) at which point, the log is backuped in a file with the time Stamp. Up to now, everything is working as it should :)

The problem starts here: The server doesn't create a new "server.log" file and a new log file is created under /opt/glassfish/nodeagents/<node>/<server>/logs with a lot of exceptions:

[#|2007-12-07T10:48:01.750+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=14;_ThreadName=httpSSLWorkerThread-38302-2;_RequestID=5418adb4-e669-4bb4-bee0-0b188d0973b3;|
Exception in openFile...java.io.FileNotFoundException: /opt/logs/gf/lidip_01/server.log (No such file or directory)|#]

[#|2007-12-07T10:48:01.764+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=14;_ThreadName=httpSSLWorkerThread-38302-2;_RequestID=5418adb4-e669-4bb4-bee0-0b188d0973b3;|
java.io.FileNotFoundException: /opt/logs/gf/lidip_01/server.log (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at com.sun.enterprise.server.logging.logviewer.backend.LogFile.getLogFileReader(LogFile.java:281)
        at com.sun.enterprise.server.logging.logviewer.backend.LogFile.buildLogFileIndex(LogFile.java:156)
        at com.sun.enterprise.server.logging.logviewer.backend.LogFile.<init>(LogFile.java:71)
        at com.sun.enterprise.server.logging.FileandSyslogHandler$1.run(FileandSyslogHandler.java:399)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.enterprise.server.logging.FileandSyslogHandler.rotate(FileandSyslogHandler.java:366)
        at com.sun.enterprise.server.logging.FileandSyslogHandler.publish(FileandSyslogHandler.java:505)
        at java.util.logging.Logger.log(Logger.java:472)
        at java.util.logging.Logger.doLog(Logger.java:494)
        at java.util.logging.Logger.log(Logger.java:517)
        at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream.flush(SystemOutandErrHandler.java:368)
        at java.io.PrintStream.write(PrintStream.java:432)
        at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.write(SystemOutandErrHandler.java:293)
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
        at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
        at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
        ....

This log file is filling up kind of fast (no wonder with all the stack traces by each "log" call) and the rotation is actually working (without making any backup, however). After a while, the server restarts on it's own and a new server.log in the right directory is created.

1) Is this problem with the log file a bug?

2) Is it normal for a server to restart itself without warning?

thanks
jeremie
[Message sent by forum member 'granat' (granat)]

http://forums.java.net/jive/thread.jspa?messageID=248988