1 2 3 Previous Next 34 Replies Latest reply on Jan 27, 2017 12:36 AM by mnovak

    activemq exception

    tbw

      Hello.

      I'm have wildfly 10.1 with working ejb.

       

      I'm trying to run jms under ssl (and without).

       

      1. Under ssl.

      exception at: ConnectionFactory conFactory = (ConnectionFactory) ctx.lookup(DEFAULT_CONNECTION_FACTORY);

      "SEVERE: Failed to connect to any server. Servers tried: [http-remoting://localhost:8443 (java.io.EOFException: XNIO000812: Connection closed unexpectedly)]"

       

      2. WIthout ssl.

      Only https-remoting://localhost:8443 to http-remoting://localhost:8443 (PROVIDER_URL and remote.connection.default.protocol + remote.connection.default.port)

       

      logs for 2 in attached file

       

        • 1. Re: activemq exception
          jbertram

          Based on your comment I can't really tell what you're trying to do or what's really going wrong.  Can you clarify your use-case including what you expect to see and what you're actually seeing?

           

          Also, the log URL seems to be invalid.

          • 2. Re: activemq exception
            tbw

            I want to use jms on ssl.

            Ssl is working, after adding jms queue to standalone-full.xml i get errors.

            Currently i see only errors at http and https.

             

            UPD. For ssl i see: "unable to find valid certification path to requested target". For ssl problem is in xml configuration.

            For http - don't know.

            • 3. Re: activemq exception
              jbertram

              Can you outline steps required to reproduce the error you're seeing?

              • 4. Re: activemq exception
                tbw

                I get one code for two ways.

                1. I'm starting wildfly with standalong-full.xml. It contain ssl configuration and only one line (creating queue) for jms.

                2. i'm starting client with ssl (now i see: "unable to find valid certification path to requested target" -> i need to set ssl config for jms at xml, but i don't know how)

                3. i'm starting this client with http-remote (without ssl) and getting timeout error (don't know why) at:

                JMSContext jmsContext = conFactory.createContext();
                Destination destination = (Destination) ctx.lookup(queueName);

                JMSConsumer consumer = jmsContext.createConsumer(destination); //here

                Logs for path 3 at first message of topic.

                • 5. Re: activemq exception
                  jbertram

                  I get one code for two ways.

                  I'm not sure what you mean here.

                   

                  1. I'm starting wildfly with standalong-full.xml. It contain ssl configuration...

                  Are you referring to this?

                   

                  <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>

                   

                  ...only one line (creating queue) for jms.

                  What do you mean by this?

                   

                  2. i'm starting client with ssl (now i see: "unable to find valid certification path to requested target" -> i need to set ssl config for jms at xml, but i don't know how)

                  Are you referring to your JNDI client or your JMS client here?

                   

                  3. i'm starting this client with http-remote (without ssl) and getting timeout error (don't know why) at...

                  Based on the logs you attached it looks like your client and server libraries are mismatched or something.  Are you certain the client is using the libraries shipped with the server?

                  • 6. Re: activemq exception
                    tbw

                    Full config here

                     

                    >Based on the logs you attached it looks like your client and server libraries are mismatched or something.  Are you certain the client is using the libraries shipped with the server?

                    Libraries is equal to server version:

                     

                    <dependency>
                      <groupId>org.wildfly</groupId>
                      <artifactId>wildfly-jms-client-bom</artifactId>
                      <version>10.1.0.Final</version>
                      <type>pom</type>
                    </dependency>

                     

                    ...

                     

                    <dependencyManagement>
                      <dependencies>
                      <dependency>
                      <groupId>org.jboss.spec</groupId>
                      <artifactId>jboss-javaee-7.0</artifactId>
                      <version>1.0.4.Final</version>
                      <type>pom</type>
                      <scope>import</scope>
                      </dependency>
                      <dependency>
                      <groupId>org.wildfly.bom</groupId>
                       <!--<artifactId>jboss-javaee-7.0-wildfly</artifactId>-->
                       <artifactId>wildfly-javaee7-with-tools</artifactId>
                      <version>10.1.0.Final</version>
                      <type>pom</type>
                      <scope>import</scope>
                      </dependency>
                      </dependencies>
                    </dependencyManagement>

                    • 7. Re: activemq exception
                      tbw

                      I was changed configuration for ssl:

                                      <http-acceptor name="http-acceptor" http-listener="default">

                                              <param name="ssl-enabled" value="true"/>

                                             <param name="key-store-path" value="D:\middlewaremagic_server.keystore"/>

                                              <param name="key-store-password" value="middleware+magic"/>

                                     </http-acceptor>

                      but have a similar result (after successful ejb call):

                      DEBUG org.jboss.naming.remote.client.HaRemoteNamingStore - Failed to connect to server https-remoting://localhost:8443

                      ...

                      SEVERE: Failed to connect to any server. Servers tried: [https-remoting://localhost:8443 (javax.net.ssl.SSLHandshakeException: General SSLEngine problem)]

                      ...

                      sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

                      • 8. Re: activemq exception
                        tbw

                        java.lang.ClassCastException: org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionBindingQueryResponseMessage_V2 cannot be cast to org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionBindingQueryResponseMessage_V3

                        • 9. Re: activemq exception
                          tbw

                          Problem for jms without ssl is in spring boot dependency!

                          WTF!?

                           

                          <!--<parent>-->
                            <!--<groupId>org.springframework.boot</groupId>-->
                            <!--<artifactId>spring-boot-starter-parent</artifactId>-->
                            <!--<version>1.4.2.RELEASE</version>-->

                          <!--</parent>-->

                          • 10. Re: activemq exception
                            jbertram

                            If you enable SSL on the acceptor then you need to enable SSL on the corresponding connector.  Furthermore, if you use a self-signed certificate on the acceptor then you have to import the server's certificate into a trust-store and use that on the client.

                            • 11. Re: activemq exception
                              jbertram

                              I'm not sure what could be happening here.  Do you have a test-case I could use to reproduce what you're seeing?

                              • 12. Re: activemq exception
                                jbertram

                                Not sure what could be happening here either.  A reproducible test-case would be good to have to investigate further.

                                • 13. Re: activemq exception
                                  tbw

                                  This is full code for test.

                                  By default it work. Then change http-remote to https and get ssl error (only for jms, ejb is work).

                                  Without https ejb and jms is working on one context.

                                  • 14. Re: activemq exception
                                    jbertram

                                    Are you still getting this:

                                     

                                    java.lang.ClassCastException: org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionBindingQueryResponseMessage_V2 cannot be cast to org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionBindingQueryResponseMessage_V3

                                     

                                    If so, that's really bizarre because Wildfly 10.1.0.Final ships with Artemis 1.1.0 which doesn't even contain the class org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionBindingQueryResponseMessage_V3.

                                    1 2 3 Previous Next