[wildfly-dev] Kafka + logging
Dustin Kut Moy Cheung
dcheung at redhat.com
Wed Sep 18 14:06:05 EDT 2019
Woops I just saw my mistake: should be: 'org.apache.kafka.log4jappender'
like you suggested,
not 'org.apache.log4jappender' as I did before. My fault!!!
After doing it, I get this stacktrace:
https://paste.fedoraproject.org/paste/O~lyLG4Ly36aHmHlUzshNQ
This lead me to this:
https://stackoverflow.com/questions/49330032/wildfly-java-lang-noclassdeffounderror-org-jboss-modules-moduleloader-when-usin
(heh I see your comments in there :) )
I noticed that in the Java 8 JVM options for the EAP 7.2.3 image, I see:
-Xbootclasspath/p:/opt/eap/jboss-modules.jar:/opt/[etc]
but when using Java 11, I see:
-Xbootclasspath/a:/opt/eap/modules/system/layers/base/.overlays/layer-base-jboss-eap-7[...]
No jboss-modules.jar specified. I tried to add the jboss-modules.jar in my
JAVA_OPTS but that
caused another scarier stacktrace :(
-Xbootclasspath/a:/opt/eapjjboss-modules.jar:/opt/eap/module[etc]
https://paste.fedoraproject.org/paste/JRdOrz15X08C2Uxwz-zcQg
Thanks for your help James!
Sincerely,
Dustin
On Wed, 18 Sep 2019 at 13:52, James Perkins <jperkins at redhat.com> wrote:
> I'm not too sure. I've not seen this article before so I'd have to fully
> read it.
>
> Is there a full stack trace?
>
> On Wed, Sep 18, 2019 at 8:32 AM Dustin Kut Moy Cheung <dcheung at redhat.com>
> wrote:
>
>> Thanks for the suggestion! Unfortunately this didn't seem to help:
>>
>> 15:30:44,918 ERROR [org.jboss.as.controller.management-operation]
>> (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
>> ("subsystem" => "logging"),
>> ("custom-handler" => "kafka")
>> ]): java.lang.IllegalArgumentException: WFLYLOG0019: Failed to load
>> module 'org.apache.log4jappender' for handler 'kafka'
>> at org.jboss.as.logging at 6.0.15.Final-redhat-00001
>> //org.jboss.as.logging.handlers.HandlerOperations$HandlerAddOperationStepHandler.createHandlerConfiguration(HandlerOperations.java:293)
>>
>> I still don't get why it works on OpenJDK 8 and not OpenJDK 11 :(
>>
>> Sincerely,
>> Dustin
>>
>> On Tue, 17 Sep 2019 at 20:21, James Perkins <jperkins at redhat.com> wrote:
>>
>>> That module defined on custom-handler looks wrong. I think it should
>>> likely be org.apache.kafka.log4jappender.
>>>
>>> On Mon, Sep 16, 2019 at 3:48 PM Dustin Kut Moy Cheung <
>>> dcheung at redhat.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm following this guide to get logging sent to kafka:
>>>> https://developer.jboss.org/wiki/SendingWildFlyLogsToKafka
>>>>
>>>> This works on EAP 7.2.3.GA running on JDK 8, but fails to run on JDK
>>>> 11:
>>>>
>>>> ```
>>>>
>>>> 15:54:28,819 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
>>>> ("subsystem" => "logging"),
>>>> ("custom-handler" => "kafka")
>>>> ]): java.lang.IllegalArgumentException: Failed to load module "org.apache.log4j" for pojo "kafka"
>>>> ...
>>>> ```
>>>>
>>>> Do you think this is related to the new module system in JDK 11 and I need to add some extra JVM flags to get it to work?
>>>>
>>>> Thank you for your help!
>>>>
>>>> Sincerely,
>>>> Dustin
>>>>
>>>> _______________________________________________
>>>> wildfly-dev mailing list
>>>> wildfly-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>>
>>>
>>>
>>> --
>>> James R. Perkins
>>> JBoss by Red Hat
>>>
>>
>
> --
> James R. Perkins
> JBoss by Red Hat
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20190918/fa9fb123/attachment.html
More information about the wildfly-dev
mailing list