Viji created LOGBACK-1325: ----------------------------- Summary: ERROR in ch.qos.logback.classic.pattern.SyslogStartConverter@2a314cb4 - Could not determine local host name java.net.UnknownHostException: usagem: usagem: Name or service not known at java.net.UnknownHostException: Key: LOGBACK-1325 URL: https://jira.qos.ch/browse/LOGBACK-1325 Project: logback Issue Type: Bug Components: logback-classic Affects Versions: 1.1.11 Environment: CentOS release 6.5 (Final)
OpenJDK Runtime Environment (build 1.8.0_131-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode) Tomcat 7.0.41 Reporter: Viji Assignee: Logback dev list Getting the error when the hostname could not be resolved while trying to start the tomcat when the hostname cannot be resolved: the stack trace: {color:#000000}Jul 07, 2017 4:09:15 PM org.apache.catalina.core.AprLifecycleListener init{color} {color:#000000}INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib{color} {color:#000000}Jul 07, 2017 4:09:15 PM org.apache.catalina.startup.SetAllPropertiesRule begin{color} {color:#000000}WARNING: [SetAllPropertiesRule]\{Server/Service/Connector} Setting property 'maxSpareThreads' to '75' did not find a matching property.{color} {color:#000000}Jul 07, 2017 4:09:15 PM org.apache.tomcat.util.digester.SetPropertiesRule begin{color} {color:#000000}WARNING: [SetPropertiesRule]\{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:avaya-oss' did not find a matching property.{color} {color:#000000}Jul 07, 2017 4:09:16 PM org.apache.coyote.AbstractProtocol init{color} {color:#000000}INFO: Initializing ProtocolHandler ["http-bio-8080"]{color} {color:#000000}Jul 07, 2017 4:09:16 PM org.apache.coyote.AbstractProtocol init{color} {color:#000000}INFO: Initializing ProtocolHandler ["ajp-bio-8009"]{color} {color:#000000}Jul 07, 2017 4:09:16 PM org.apache.coyote.AbstractProtocol init{color} {color:#000000}INFO: Initializing ProtocolHandler ["http-bio-52233"]{color} {color:#000000}Jul 07, 2017 4:09:16 PM org.apache.catalina.startup.Catalina load{color} {color:#000000}INFO: Initialization processed in 775 ms{color} {color:#000000}Jul 07, 2017 4:09:16 PM org.apache.catalina.core.StandardService startInternal{color} {color:#000000}INFO: Starting service Catalina{color} {color:#000000}Jul 07, 2017 4:09:16 PM org.apache.catalina.core.StandardEngine startInternal{color} {color:#000000}INFO: Starting Servlet Engine: Apache Tomcat/7.0.47{color} {color:#000000}16:09:21,659 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]{color} {color:#000000}16:09:21,660 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]{color} {color:#000000}16:09:21,660 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/home/admin/tomcat7/wtpwebapps/avaya-oss/WEB-INF/classes/logback.xml]{color} {color:#000000}16:09:21,699 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set{color} {color:#000000}16:09:21,706 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [file:/home/admin/tomcat7/wtpwebapps/avaya-oss/WEB-INF/classes/logback.xml] {color} {color:#000000}16:09:21,706 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 30 seconds{color} {color:#000000}16:09:21,708 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word onlyShowIf with class [com.avaya.oss.server.utils.common.ConditionalCompositeConverter]{color} {color:#000000}16:09:21,708 |-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Assuming default evaluator class [ch.qos.logback.classic.boolex.JaninoEventEvaluator]{color} {color:#000000}16:09:21,709 |-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Adding evaluator named [EMPTY_MARKER] to the object stack{color} {color:#000000}16:09:21,726 |-INFO in {color}[{color:#0000ff}ch.qos.logback.classic.boolex.JaninoEventEvaluator@2518f3c9{color}|mailto:ch.qos.logback.classic.boolex.JaninoEventEvaluator@2518f3c9]{color:#000000} - Adding [return] prefix and a semicolon suffix. Expression becomes [return marker==null;]{color} {color:#000000}16:09:21,726 |-INFO in {color}[{color:#0000ff}ch.qos.logback.classic.boolex.JaninoEventEvaluator@2518f3c9{color}|mailto:ch.qos.logback.classic.boolex.JaninoEventEvaluator@2518f3c9]{color:#000000} - See also {color}[{color:#0000ff}http://logback.qos.ch/codes.html#block{color}] {color:#000000}16:09:21,835 |-INFO in ch.qos.logback.classic.joran.action.EvaluatorAction - Starting evaluator named [EMPTY_MARKER]{color} {color:#000000}16:09:21,835 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]{color} {color:#000000}16:09:21,840 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]{color} {color:#000000}16:09:21,857 |-INFO in {color}[{color:#0000ff}c.q.l.core.rolling.TimeBasedRollingPolicy@1287728481{color}|mailto:c.q.l.core.rolling.TimeBasedRollingPolicy@1287728481]{color:#000000} - No compression will be used{color} {color:#000000}16:09:21,858 |-INFO in {color}[{color:#0000ff}c.q.l.core.rolling.TimeBasedRollingPolicy@1287728481{color}|mailto:c.q.l.core.rolling.TimeBasedRollingPolicy@1287728481]{color:#000000} - Will use the pattern /opt/Avaya/oss/logs/oss-server.%d\{yyyy-MM-dd}.log for the active file{color} {color:#000000}16:09:21,863 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern '/opt/Avaya/oss/logs/oss-server.%d\{yyyy-MM-dd}.log'.{color} {color:#000000}16:09:21,863 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.{color} {color:#000000}16:09:21,864 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Fri Jul 07 16:09:12 IST 2017{color} {color:#000000}16:09:21,882 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: /opt/Avaya/oss/logs/oss-server.log{color} {color:#000000}16:09:21,882 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [/opt/Avaya/oss/logs/oss-server.log]{color} {color:#000000}16:09:21,883 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.net.SyslogAppender]{color} {color:#000000}16:09:21,885 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [SYSLOG]{color} {color:#000000}16:09:21,891 |-INFO in ch.qos.logback.classic.net.SyslogAppender[SYSLOG] - Defaulting maxMessageSize to [62464]{color} {color:#000000}16:09:31,901 |-ERROR in {color}[{color:#0000ff}ch.qos.logback.classic.pattern.SyslogStartConverter@2a314cb4{color}|mailto:ch.qos.logback.classic.pattern.SyslogStartConverter@2a314cb4]{color:#000000} - Could not determine local host name java.net.UnknownHostException: usagem: usagem: Name or service not known{color} {color:#000000} at java.net.UnknownHostException: usagem: usagem: Name or service not known{color} {color:#000000} at at java.net.InetAddress.getLocalHost(InetAddress.java:1505){color} {color:#000000} at at ch.qos.logback.classic.pattern.SyslogStartConverter.getLocalHostname(SyslogStartConverter.java:88){color} {color:#000000} at at ch.qos.logback.classic.pattern.SyslogStartConverter.start(SyslogStartConverter.java:49){color} {color:#000000} at at ch.qos.logback.core.pattern.ConverterUtil.startConverters(ConverterUtil.java:37){color} {color:#000000} at at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:92){color} {color:#000000} at at ch.qos.logback.classic.net.SyslogAppender.buildLayout(SyslogAppender.java:131){color} {color:#000000} at at ch.qos.logback.core.net.SyslogAppenderBase.start(SyslogAppenderBase.java:79){color} {color:#000000} at at ch.qos.logback.classic.net.SyslogAppender.start(SyslogAppender.java:50){color} {color:#000000} at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90){color} {color:#000000} at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309){color} {color:#000000} at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193){color} {color:#000000} at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179){color} {color:#000000} at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62){color} {color:#000000} at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165){color} {color:#000000} at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152){color} {color:#000000} at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110){color} {color:#000000} at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53){color} {color:#000000} at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75){color} {color:#000000} at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150){color} {color:#000000} at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84){color} {color:#000000} at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55){color} {color:#000000} at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150){color} {color:#000000} at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124){color} {color:#000000} at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412){color} {color:#000000} at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357){color} {color:#000000} at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383){color} {color:#000000} at at com.avaya.oss.server.Application.<clinit>(Application.java:60){color} {color:#000000} at at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method){color} {color:#000000} at at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62){color} {color:#000000} at at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45){color} {color:#000000} at at java.lang.reflect.Constructor.newInstance(Constructor.java:423){color} {color:#000000} at at java.lang.Class.newInstance(Class.java:442){color} {color:#000000} at at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:152){color} {color:#000000} at at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5423){color} {color:#000000} at at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150){color} {color:#000000} at at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559){color} {color:#000000} at at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549){color} {color:#000000} at at java.util.concurrent.FutureTask.run(FutureTask.java:266){color} {color:#000000} at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142){color} {color:#000000} at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617){color} {color:#000000} at at java.lang.Thread.run(Thread.java:748){color} {color:#000000}Caused by: java.net.UnknownHostException: usagem: Name or service not known{color} {color:#000000} at at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method){color} {color:#000000} at at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928){color} {color:#000000} at at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323){color} {color:#000000} at at java.net.InetAddress.getLocalHost(InetAddress.java:1500){color} {color:#000000} at ... 40 common frames omitted{color} {color:#000000}16:09:41,910 |-ERROR in {color}[{color:#0000ff}ch.qos.logback.classic.pattern.SyslogStartConverter@355a8cbf{color}|mailto:ch.qos.logback.classic.pattern.SyslogStartConverter@355a8cbf]{color:#000000} - Could not determine local host name java.net.UnknownHostException: usagem: usagem: Name or service not known{color} {color:#000000} at java.net.UnknownHostException: usagem: usagem: Name or service not known{color} {color:#000000} at at java.net.InetAddress.getLocalHost(InetAddress.java:1505){color} {color:#000000} at at ch.qos.logback.classic.pattern.SyslogStartConverter.getLocalHostname(SyslogStartConverter.java:88){color} {color:#000000} at at ch.qos.logback.classic.pattern.SyslogStartConverter.start(SyslogStartConverter.java:49){color} {color:#000000} at at ch.qos.logback.core.pattern.ConverterUtil.startConverters(ConverterUtil.java:37){color} {color:#000000} at at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:92){color} {color:#000000} at at ch.qos.logback.classic.net.SyslogAppender.setupStackTraceLayout(SyslogAppender.java:140){color} {color:#000000} at at ch.qos.logback.classic.net.SyslogAppender.start(SyslogAppender.java:51){color} {color:#000000} at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90){color} {color:#000000} at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309){color} {color:#000000} at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193){color} {color:#000000} at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179){color} {color:#000000} at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62){color} {color:#000000} at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165){color} {color:#000000} at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152){color} {color:#000000} at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110){color} {color:#000000} at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53){color} {color:#000000} at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75){color} {color:#000000} at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150){color} {color:#000000} at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84){color} {color:#000000} at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55){color} {color:#000000} at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150){color} {color:#000000} at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124){color} {color:#000000} at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412){color} {color:#000000} at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357){color} {color:#000000} at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383){color} {color:#000000} at at com.avaya.oss.server.Application.<clinit>(Application.java:60){color} {color:#000000} at at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method){color} {color:#000000} at at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62){color} {color:#000000} at at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45){color} {color:#000000} at at java.lang.reflect.Constructor.newInstance(Constructor.java:423){color} {color:#000000} at at java.lang.Class.newInstance(Class.java:442){color} {color:#000000} at at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:152){color} {color:#000000} at at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5423){color} {color:#000000} at at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150){color} {color:#000000} at at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559){color} {color:#000000} at at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549){color} {color:#000000} at at java.util.concurrent.FutureTask.run(FutureTask.java:266){color} {color:#000000} at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142){color} {color:#000000} at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617){color} {color:#000000} at at java.lang.Thread.run(Thread.java:748){color} {color:#000000}Caused by: java.net.UnknownHostException: usagem: Name or service not known{color} {color:#000000} at at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method){color} {color:#000000} at at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928){color} {color:#000000} at at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323){color} {color:#000000} at at java.net.InetAddress.getLocalHost(InetAddress.java:1500){color} {color:#000000} at ... 39 common frames omitted{color} {color:#000000}16:09:41,912 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.avaya.oss.server] to INFO{color} {color:#000000}16:09:41,912 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework] to WARN{color} {color:#000000}16:09:41,912 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.velocity] to ERROR{color} {color:#000000}16:09:41,912 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.morgan.design] to WARN{color} {color:#000000}16:09:41,912 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO{color} {color:#000000}16:09:41,912 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]{color} {color:#000000}16:09:41,912 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [SYSLOG] to Logger[ROOT]{color} {color:#000000}16:09:41,912 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.{color} {color:#000000}16:09:41,913 |-INFO in {color}[{color:#0000ff}ch.qos.logback.classic.joran.JoranConfigurator@15ae324c{color}|mailto:ch.qos.logback.classic.joran.JoranConfigurator@15ae324c]{color:#000000} - Registering current configuration as safe fallback point{color} {color:#000000} {color} {color:#000000}Jul 07, 2017 4:09:41 PM org.apache.catalina.core.ApplicationContext log{color} {color:#000000}INFO: 2 Spring WebApplicationInitializers detected on classpath{color} {color:#000000}Can we get the fix of ContextUtil (in the catch block ) in the method of SyslogStartConverter.getLocalHostname to handle the exception.{color} (LOGBACK-749) -- This message was sent by Atlassian JIRA (v7.3.1#73012) _______________________________________________ logback-dev mailing list logback-dev@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-dev