You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2006/09/01 08:14:15 UTC
DO NOT REPLY [Bug 40382] New: - Sysappender hangs during boot time on HP
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40382>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40382
Summary: Sysappender hangs during boot time on HP
Product: Log4j
Version: 1.2
Platform: HP
OS/Version: HP-UX
Status: NEW
Severity: major
Priority: P2
Component: Appender
AssignedTo: log4j-dev@logging.apache.org
ReportedBy: madhavabk79@yahoo.co.in
CC: madhavabk79@yahoo.co.in
1. A simple java Application that uses PropertyConfigurator of log4j fails when
the application starts during system boot up on HP-UX.
2. The application gets started from a startup script with any priority in rc3.d
and rc2.d etc.
3. The system boot process hangs and from other machine we cannot telnet or ping
the system for infinite time. No exception will be thrown in syslog or
/etc/rc.log, but they will be displayed on console (monitor connected to server).
The following are logs received for my application.
(Note: I have removed names of classes of my application in exception stack below)
java.net.SocketException: Operation not supported (errno:223)
at java.net.PlainDatagramSocketImpl.datagramSocketCreate(Native Method)
at java.net.PlainDatagramSocketImpl.create(PlainDatagramSocketImpl.java:73)
at java.net.DatagramSocket.createImpl(DatagramSocket.java:317)
at java.net.DatagramSocket.<init>(DatagramSocket.java:158)
at org.apache.log4j.helpers.SyslogWriter.<init>(SyslogWriter.java:47)
at
org.apache.log4j.net.SyslogAppender.setSyslogHost(SyslogAppender.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:196)
at
org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:155)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:120)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:645)
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
at
org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:524)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:408)
at
org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:340)
log4j:ERROR Could not instantiate DatagramSocket to localhost. All logging will
FAIL.
java.net.SocketException: Operation not supported (errno:223)
at java.net.PlainDatagramSocketImpl.datagramSocketCreate(Native Method)
at java.net.PlainDatagramSocketImpl.create(PlainDatagramSocketImpl.java:73)
at java.net.DatagramSocket.createImpl(DatagramSocket.java:317)
at java.net.DatagramSocket.<init>(DatagramSocket.java:158)
at org.apache.log4j.helpers.SyslogWriter.<init>(SyslogWriter.java:47)
at
org.apache.log4j.net.SyslogAppender.setSyslogHost(SyslogAppender.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:196)
at
org.apache.log4j.config.PropertySetter.setProperty(PropertySetter.java:155)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:120)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:645)
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
at
org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:524)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:408)
at
org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:340)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 40382] - Sysappender hangs during boot time on HP
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40382>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40382
------- Additional Comments From carnold@apache.org 2006-09-01 17:14 -------
SyslogAppender in log4j is implemented as a pure Java class using network IO (even when logging to
localhost) and does not call the ::syslog native method. The implementation has the advantage of
being platform independent, but will not work if syslogd is not accepting network connections or if the
security manager prevents the creation of sockets. There is a enhancement request for a JNI
implementation of SyslogAppender (http://issues.apache.org/bugzilla/show_bug.cgi?id=27363) along
with an implementation.
It is likely that you are running into one of the blockers mentioned (at least in the start up phase). How
that affect system booting is unclear. I'm guessing that if you change your config file to use another
appender (for example, ConsoleAppender), then you start up process would work fine. The exception
thrown when trying to connect to syslogd seems to be caught properly, but perhaps instead of
subsequent log requests failing, they block somehow.
I've reviewed both the log4j 1.2 and 1.3 implementations and don't see a mechanism for logging after
the observed warning to cause a lock up. this.ds should be null and the write methods in SyslogWriter
do check that and though they unnecessary create DatagramPackets, they do not attempt to send them.
The code could be optimized by avoiding short-circuiting the write statements if this.ds == null.
Perhaps the lock up is due to something else in the app and is not related to the SyslogAppender.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 40382] - Sysappender hangs during boot time on HP
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40382>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40382
------- Additional Comments From madhavabk79@yahoo.co.in 2006-09-07 06:20 -------
Yes, there is problem in socket descriptor creation at boot time on HP.
We should ensure that we have descriptors at least up to number 2.
Else there are chances that socket API gives wrong IO descriptor.
Thanks
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org