Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-19010

SSL Client context not loaded with AMQP Connector used in bootable jar

XMLWordPrintable

    • Hide

      Start AMQ 7 with configured SSL on AMQP acceptor
      Create bootable jar with deployment with MP Reactive Messaging application AMQP connector using SSL

      Show
      Start AMQ 7 with configured SSL on AMQP acceptor Create bootable jar with deployment with MP Reactive Messaging application AMQP connector using SSL
    • Workaround Exists
    • Hide

      Add <layer>microprofile-reactive-messaging-kafka</layer> into pom.xml like:

      <plugin>
                      <groupId>org.wildfly.plugins</groupId>
                      <artifactId>wildfly-jar-maven-plugin</artifactId>
                      <version>10.0.0.Final</version>
                      <configuration>
                          <feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)#${wildfly-eap8.version}</feature-pack-location>
                          <display-cli-scripts-output>true</display-cli-scripts-output>
                          <extra-server-content-dirs>truststore</extra-server-content-dirs>
                          <layers>
                              <layer>cloud-server</layer>
                              <layer>microprofile-reactive-messaging-amqp</layer>
      <!-- this is added as workaround to find client SSL context -->
                              <layer>microprofile-reactive-messaging-kafka</layer>
                          </layers>
                          <cloud/>
                          <excluded-layers>
                              <layer>deployment-scanner</layer>
                          </excluded-layers>
                          <cli-sessions>
                              <cli-session>
                                  <script-files>
                                      ./scripts/property.cli
                                  </script-files>
                              </cli-session>
                          </cli-sessions>
                      </configuration>
                      <executions>
                          <execution>
                              <goals>
                                  <goal>package</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
      
      Show
      Add <layer>microprofile-reactive-messaging-kafka</layer> into pom.xml like: <plugin> <groupId>org.wildfly.plugins</groupId> <artifactId>wildfly-jar-maven-plugin</artifactId> <version>10.0.0.Final</version> <configuration> <feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)#${wildfly-eap8.version}</feature-pack-location> <display-cli-scripts-output> true </display-cli-scripts-output> <extra-server-content-dirs>truststore</extra-server-content-dirs> <layers> <layer>cloud-server</layer> <layer>microprofile-reactive-messaging-amqp</layer> <!-- this is added as workaround to find client SSL context --> <layer>microprofile-reactive-messaging-kafka</layer> </layers> <cloud/> <excluded-layers> <layer>deployment-scanner</layer> </excluded-layers> <cli-sessions> <cli-session> <script-files> ./scripts/property.cli </script-files> </cli-session> </cli-sessions> </configuration> <executions> <execution> <goals> <goal> package </goal> </goals> </execution> </executions> </plugin>
    • ---
    • ---

      In case that client ssl context is used by deployment with AMQP connector then it's not loaded and start of bootable jar fails with:

      09:04:48,542 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."amqp-connector-bootable-jar-1.0.0-SNAPSHOT.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."amqp-connector-bootable-jar-1.0.0-SNAPSHOT.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "amqp-connector-bootable-jar-1.0.0-SNAPSHOT.war"
      	at org.jboss.as.server@23.0.1.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:179)
      	at org.jboss.msc@1.5.2.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1617)
      	at org.jboss.msc@1.5.2.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1580)
      	at org.jboss.msc@1.5.2.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1438)
      	at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: java.lang.IllegalStateException: WFLYRXMKAF0002: Could not find an Elytron client-ssl-context called: kafka-ssl-test
      	at org.wildfly.reactive.messaging.common@32.0.0.Beta1-SNAPSHOT//org.wildfly.microprofile.reactive.messaging.common.security.BaseReactiveMessagingSslConfigProcessor.logAndCheck(BaseReactiveMessagingSslConfigProcessor.java:106)
      	at org.wildfly.reactive.messaging.common@32.0.0.Beta1-SNAPSHOT//org.wildfly.microprofile.reactive.messaging.common.security.BaseReactiveMessagingSslConfigProcessor.deploy(BaseReactiveMessagingSslConfigProcessor.java:63)
      	at org.jboss.as.server@23.0.1.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
      	... 8 more
      
      09:04:48,545 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "amqp-connector-bootable-jar-1.0.0-SNAPSHOT.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"amqp-connector-bootable-jar-1.0.0-SNAPSHOT.war\".POST_MODULE" => "WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"amqp-connector-bootable-jar-1.0.0-SNAPSHOT.war\"
          Caused by: java.lang.IllegalStateException: WFLYRXMKAF0002: Could not find an Elytron client-ssl-context called: kafka-ssl-test"}}
      

      Note this happens with bootable jar only and when provisioned server is without microprofile-reactive-messaging-kafka layer.

              kkhan1@redhat.com Kabir Khan
              mnovak1@redhat.com Miroslav Novak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: