New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get the full stacktrace on wildfly #64

Closed
kgoedert opened this Issue Feb 1, 2016 · 9 comments

Comments

2 participants
@kgoedert

kgoedert commented Feb 1, 2016

Hi,

I just set up the wildfly 9 module to send the logs to graylog2. It worked. But my stack trace appears to be cut. Is there a way I can format the output to see the full stack trace, with the error and all the caused by clauses?

@mp911de

This comment has been minimized.

Show comment
Hide comment
@mp911de

mp911de Feb 1, 2016

Owner

Could you post your logger config?
kgoedert notifications@github.com schrieb am Mo., 1. Feb. 2016 um 18:34:

Hi,

I just set up the wildfly 9 module to send the logs to graylog2 It worked
But my stack trace appears to be cut Is there a way I can format the output
to see the full stack trace, with the error and all the caused by clauses?


Reply to this email directly or view it on GitHub
#64.

Owner

mp911de commented Feb 1, 2016

Could you post your logger config?
kgoedert notifications@github.com schrieb am Mo., 1. Feb. 2016 um 18:34:

Hi,

I just set up the wildfly 9 module to send the logs to graylog2 It worked
But my stack trace appears to be cut Is there a way I can format the output
to see the full stack trace, with the error and all the caused by clauses?


Reply to this email directly or view it on GitHub
#64.

@kgoedert

This comment has been minimized.

Show comment
Hide comment
@kgoedert

kgoedert Feb 2, 2016

<custom-handler name="GelfLogger" class="biz.paluch.logging.gelf.wildfly.WildFlyGelfLogHandler" module="biz.paluch.logging">
    <level name="INFO" />
    <properties>
        <property name="host" value="udp:10.1.1.27" />
        <property name="port" value="12201" />
        <property name="version" value="1.1" />
        <property name="facility" value="java-test" />
        <property name="extractStackTrace" value="true" />
        <property name="mdcProfiling" value="true" />
        <property name="timestampPattern" value="yyyy-MM-dd HH:mm:ss,SSSS" />
        <property name="maximumMessageSize" value="15000" />

        <!-- This are static fields -->
        <property name="additionalFields" value="fieldName1=fieldValue1,fieldName2=fieldValue2" />
        <!-- Optional: Specify field types -->
        <property name="additionalFieldTypes" value="fieldName1=String,fieldName2=Double,fieldName3=Long" />

        <!-- This are fields using MDC -->
        <property name="mdcFields" value="mdcField1,mdcField2" />
        <property name="dynamicMdcFields" value="mdc.*,(mdc|MDC)fields" />
        <property name="includeFullMdc" value="true" />
    </properties>
</custom-handler>

I also tried with filterStackTrace false.

kgoedert commented Feb 2, 2016

<custom-handler name="GelfLogger" class="biz.paluch.logging.gelf.wildfly.WildFlyGelfLogHandler" module="biz.paluch.logging">
    <level name="INFO" />
    <properties>
        <property name="host" value="udp:10.1.1.27" />
        <property name="port" value="12201" />
        <property name="version" value="1.1" />
        <property name="facility" value="java-test" />
        <property name="extractStackTrace" value="true" />
        <property name="mdcProfiling" value="true" />
        <property name="timestampPattern" value="yyyy-MM-dd HH:mm:ss,SSSS" />
        <property name="maximumMessageSize" value="15000" />

        <!-- This are static fields -->
        <property name="additionalFields" value="fieldName1=fieldValue1,fieldName2=fieldValue2" />
        <!-- Optional: Specify field types -->
        <property name="additionalFieldTypes" value="fieldName1=String,fieldName2=Double,fieldName3=Long" />

        <!-- This are fields using MDC -->
        <property name="mdcFields" value="mdcField1,mdcField2" />
        <property name="dynamicMdcFields" value="mdc.*,(mdc|MDC)fields" />
        <property name="includeFullMdc" value="true" />
    </properties>
</custom-handler>

I also tried with filterStackTrace false.

@mp911de

This comment has been minimized.

Show comment
Hide comment
@mp911de

mp911de Feb 2, 2016

Owner

filterStackTrace compresses the stack trace so framework stack lines can be combined. The whole chain of exceptions is preserved. The config looks good. You could do two things:

  1. There's a custom log formatter (http://logging.paluch.biz/examples/wildfly-json.html). You could add another file appender to log the data into a log file to check whether logstash-gelf or graylog truncates the stack trace
  2. Can you post the stack trace how it's displayed within graylog?
Owner

mp911de commented Feb 2, 2016

filterStackTrace compresses the stack trace so framework stack lines can be combined. The whole chain of exceptions is preserved. The config looks good. You could do two things:

  1. There's a custom log formatter (http://logging.paluch.biz/examples/wildfly-json.html). You could add another file appender to log the data into a log file to check whether logstash-gelf or graylog truncates the stack trace
  2. Can you post the stack trace how it's displayed within graylog?
@kgoedert

This comment has been minimized.

Show comment
Hide comment
@kgoedert

kgoedert Feb 2, 2016

This is what I expected to see

16:07:50,112 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
    at org.jboss.as.server.ServerService.boot(ServerService.java:350)
    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module org.jboss.as.jsf
    at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:155)
    at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:433)
    at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:144)
    at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:106)
    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
    at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
    ... 3 more
Caused by: java.util.concurrent.ExecutionException: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:147)
    ... 9 more
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
    at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:196)
    at org.jboss.as.controller.parsing.ExtensionXml.access$000(ExtensionXml.java:69)
    at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:127)
    at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:124)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: org.jboss.modules.ModuleNotFoundException: com.sun.jsf-impl:main
    at org.jboss.modules.Module.addPaths(Module.java:1042)
    at org.jboss.modules.Module.link(Module.java:1398)
    at org.jboss.modules.Module.relinkIfNecessary(Module.java:1426)
    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:238)
    at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:178)
    ... 8 more

16:07:50,128 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

This is what I got in graylog

Exception: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module org.jboss.as.jsf Caused by: java.util.concurrent.ExecutionException: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module Caused by: org.jboss.modules.ModuleNotFoundException: com.sun.jsf-impl:main at org.jboss.modules.Module.addPaths(Module.java:1042) 7 lines skipped for [org.jboss] at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 1 line skipped for [org.jboss]

kgoedert commented Feb 2, 2016

This is what I expected to see

16:07:50,112 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
    at org.jboss.as.server.ServerService.boot(ServerService.java:350)
    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module org.jboss.as.jsf
    at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:155)
    at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:433)
    at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:144)
    at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:106)
    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
    at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
    ... 3 more
Caused by: java.util.concurrent.ExecutionException: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:147)
    ... 9 more
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
    at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:196)
    at org.jboss.as.controller.parsing.ExtensionXml.access$000(ExtensionXml.java:69)
    at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:127)
    at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:124)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: org.jboss.modules.ModuleNotFoundException: com.sun.jsf-impl:main
    at org.jboss.modules.Module.addPaths(Module.java:1042)
    at org.jboss.modules.Module.link(Module.java:1398)
    at org.jboss.modules.Module.relinkIfNecessary(Module.java:1426)
    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:238)
    at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:178)
    ... 8 more

16:07:50,128 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

This is what I got in graylog

Exception: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module org.jboss.as.jsf Caused by: java.util.concurrent.ExecutionException: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module Caused by: org.jboss.modules.ModuleNotFoundException: com.sun.jsf-impl:main at org.jboss.modules.Module.addPaths(Module.java:1042) 7 lines skipped for [org.jboss] at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 1 line skipped for [org.jboss]
@mp911de

This comment has been minimized.

Show comment
Hide comment
@mp911de

mp911de Feb 2, 2016

Owner

Thanks. The line from graylog2 runs indeed through the stack trace filter (7 lines skipped for [org.jboss]). Disabling filterStackTrace will preserve the full trace. The other issue is that line breaks are scrambled up by graylog. A past issue (#46) indicated that this is caused by graylog somehow.

Owner

mp911de commented Feb 2, 2016

Thanks. The line from graylog2 runs indeed through the stack trace filter (7 lines skipped for [org.jboss]). Disabling filterStackTrace will preserve the full trace. The other issue is that line breaks are scrambled up by graylog. A past issue (#46) indicated that this is caused by graylog somehow.

@kgoedert

This comment has been minimized.

Show comment
Hide comment
@kgoedert

kgoedert Feb 2, 2016

Sorry, if I did not understand your answer correctly, but as I said before, I did disable the filterStackTrace, but the log keeps appearing as I posted. Should I assume this is a graylog problem? Maybe the version I am using?

kgoedert commented Feb 2, 2016

Sorry, if I did not understand your answer correctly, but as I said before, I did disable the filterStackTrace, but the log keeps appearing as I posted. Should I assume this is a graylog problem? Maybe the version I am using?

@mp911de

This comment has been minimized.

Show comment
Hide comment
@mp911de

mp911de Feb 2, 2016

Owner

Hmm, not sure. WildFly tends to keep certain config parameters. It's possible that the filterStackTrace property is still set if you disabled the filterStackTrace flag by removing the property from the XML config. Check the logging.properties file within the configuration directory of your server which properties are configured for the GelfLogger.

Owner

mp911de commented Feb 2, 2016

Hmm, not sure. WildFly tends to keep certain config parameters. It's possible that the filterStackTrace property is still set if you disabled the filterStackTrace flag by removing the property from the XML config. Check the logging.properties file within the configuration directory of your server which properties are configured for the GelfLogger.

@kgoedert

This comment has been minimized.

Show comment
Hide comment
@kgoedert

kgoedert Feb 2, 2016

Editing the logging.properties files solved the problem.
Thanks

kgoedert commented Feb 2, 2016

Editing the logging.properties files solved the problem.
Thanks

@kgoedert kgoedert closed this Feb 2, 2016

@mp911de

This comment has been minimized.

Show comment
Hide comment
@mp911de

mp911de Feb 2, 2016

Owner

Thanks for your feedback. That was actually my last bet, glad it worked out.

Owner

mp911de commented Feb 2, 2016

Thanks for your feedback. That was actually my last bet, glad it worked out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment