title: Red Hat EAP 7.2 ActiveMQ Artemis over SSL in Openshift 3.11
body: <p>I have the following scenario:</p>
  <ul>
  <li>Red Hat EAP 7.2 configured with SSL.</li>
  <li>ActiveMQ Artemis configured to use https acceptor/connector.</li>
  </ul>
  <p>Testing on a local installation, I am able to send a test message to a test queue on https 8443.</p>
  <p>When deploying the same configuration on Openshift 3.11 I'm not able to deliver a test message.
  So wrap it up on OSCP side:</p>
  <ul>
  <li>Red Hat EAP 7.2 configured with SSL.</li>
  <li>ActiveMQ Artemis configured to use https acceptor/connector.</li>
  <li>Openshift route is set-up as passthrough -&gt; 8443.</li>
  </ul>
  <p>Adding standalone-full.xml</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;subsystem xmlns=&quot;urn:jboss:domain:messaging-activemq:4.0&quot;&gt;
      &lt;server name=&quot;default&quot;&gt;
          &lt;journal pool-files=&quot;10&quot;/&gt;
          &lt;security-setting name=&quot;#&quot;&gt;
              &lt;role name=&quot;guest&quot; send=&quot;true&quot; consume=&quot;true&quot; create-non-durable-queue=&quot;true&quot; delete-non-durable-queue=&quot;true&quot;/&gt;
          &lt;/security-setting&gt;
          &lt;address-setting name=&quot;#&quot; dead-letter-address=&quot;jms.queue.DLQ&quot; expiry-address=&quot;jms.queue.ExpiryQueue&quot; max-size-bytes=&quot;10485760&quot; page-size-bytes=&quot;2097152&quot; message-counter-history-day-limit=&quot;10&quot;/&gt;
          &lt;http-connector name=&quot;http-connector&quot; **socket-binding=&quot;https&quot;** endpoint=&quot;http-acceptor&quot;&gt;
              &lt;param name=&quot;ssl-enabled&quot; value=&quot;true&quot;/&gt;
          &lt;/http-connector&gt;
          &lt;http-connector name=&quot;http-connector-throughput&quot; **socket-binding=&quot;https&quot;** endpoint=&quot;http-acceptor-throughput&quot;&gt;
              &lt;param name=&quot;ssl-enabled&quot; value=&quot;true&quot;/&gt;
              &lt;param name=&quot;batch-delay&quot; value=&quot;50&quot;/&gt;
          &lt;/http-connector&gt;
          &lt;in-vm-connector name=&quot;in-vm&quot; server-id=&quot;0&quot;&gt;
              &lt;param name=&quot;buffer-pooling&quot; value=&quot;false&quot;/&gt;
          &lt;/in-vm-connector&gt;
          &lt;http-acceptor name=&quot;http-acceptor&quot; http-listener=&quot;https&quot;&gt;
              &lt;param name=&quot;ssl-enabled&quot; value=&quot;true&quot;/&gt;
          &lt;/http-acceptor&gt;
          &lt;http-acceptor name=&quot;http-acceptor-throughput&quot; http-listener=&quot;https&quot;&gt;
              &lt;param name=&quot;ssl-enabled&quot; value=&quot;true&quot;/&gt;
              &lt;param name=&quot;batch-delay&quot; value=&quot;50&quot;/&gt;
              &lt;param name=&quot;direct-deliver&quot; value=&quot;false&quot;/&gt;
          &lt;/http-acceptor&gt;
          &lt;in-vm-acceptor name=&quot;in-vm&quot; server-id=&quot;0&quot;&gt;
              &lt;param name=&quot;buffer-pooling&quot; value=&quot;false&quot;/&gt;
          &lt;/in-vm-acceptor&gt;
          &lt;jms-queue name=&quot;ExpiryQueue&quot; entries=&quot;java:/jms/queue/ExpiryQueue&quot;/&gt;
          &lt;jms-queue name=&quot;DLQ&quot; entries=&quot;java:/jms/queue/DLQ&quot;/&gt;
          &lt;jms-queue name=&quot;TestQ&quot; entries=&quot;queue/TestQ java:/jboss/exported/jms/queue/TestQ&quot;/&gt;
          &lt;connection-factory name=&quot;InVmConnectionFactory&quot; entries=&quot;java:/ConnectionFactory&quot; connectors=&quot;in-vm&quot;/&gt;
          &lt;connection-factory name=&quot;RemoteConnectionFactory&quot; entries=&quot;java:jboss/exported/jms/RemoteConnectionFactory&quot; **connectors=&quot;http-connector&quot;**/&gt;
          &lt;pooled-connection-factory name=&quot;activemq-ra&quot; entries=&quot;java:/JmsXA java:jboss/DefaultJMSConnectionFactory&quot; connectors=&quot;in-vm&quot; transaction=&quot;xa&quot;/&gt;
  
  &lt;subsystem xmlns=&quot;urn:jboss:domain:remoting:4.0&quot;&gt;
      &lt;http-connector name=&quot;http-remoting-connector&quot; **connector-ref=&quot;https&quot;** security-realm=&quot;ApplicationRealm&quot;/&gt;
  &lt;/subsystem&gt;
  
      &lt;security-realm name=&quot;ApplicationRealm&quot;&gt;
          &lt;server-identities&gt;
              &lt;ssl&gt;
                  &lt;keystore path=&quot;/opt/jboss/security/xxx.keystore&quot; keystore-password=&quot;xxx&quot; alias=&quot;xxx&quot;/&gt;
              &lt;/ssl&gt;
          &lt;/server-identities&gt;
          &lt;authentication&gt;
              &lt;truststore path=&quot;/opt/jboss/security/xxx.jks&quot; keystore-password=&quot;xxx&quot;/&gt;
              &lt;local default-user=&quot;$local&quot; allowed-users=&quot;*&quot; skip-group-loading=&quot;true&quot;/&gt;
              &lt;properties path=&quot;application-users.properties&quot; relative-to=&quot;jboss.server.config.dir&quot;/&gt;
          &lt;/authentication&gt;
          &lt;authorization&gt;
              &lt;properties path=&quot;application-roles.properties&quot; relative-to=&quot;jboss.server.config.dir&quot;/&gt;
          &lt;/authorization&gt;
      &lt;/security-realm&gt;
  &lt;/security-realms&gt;
  
  &lt;subsystem xmlns=&quot;urn:jboss:domain:undertow:7.0&quot; default-server=&quot;default-server&quot; default-virtual-host=&quot;default-host&quot; default-servlet-container=&quot;default&quot; default-security-domain=&quot;other&quot;&gt;
      &lt;buffer-cache name=&quot;default&quot;/&gt;
      &lt;server name=&quot;default-server&quot;&gt;
          &lt;http-listener name=&quot;default&quot; socket-binding=&quot;http&quot; redirect-socket=&quot;https&quot; enable-http2=&quot;true&quot;/&gt;
          &lt;https-listener name=&quot;https&quot; socket-binding=&quot;https&quot; secure=&quot;true&quot; security-realm=&quot;ApplicationRealm&quot; enabled-cipher-suites=&quot;HIGH:!aNULL:!eNULL:!DES:!RC4:!MD5:!RC2:!IDEA:!EXPORT&quot; enabled-protocols=&quot;TLSv1.1,TLSv1.2&quot;/&gt;
          &lt;host name=&quot;default-host&quot; alias=&quot;localhost&quot;/&gt;
      &lt;/server&gt;
      &lt;servlet-container name=&quot;default&quot;&gt;
          &lt;jsp-config x-powered-by=&quot;false&quot;/&gt;
          &lt;websockets/&gt;
      &lt;/servlet-container&gt;
  &lt;/subsystem&gt;
  </code></pre>
  <p>Besides of the above, I also tried configuring an outbound-socket as below and binding the connector to use it:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;outbound-socket-binding name=&quot;https-messaging&quot;&gt;
      &lt;remote-destination host=&quot;${jboss.messaging.host:localhost}&quot; port=&quot;${jboss.http.port:8443}&quot;/&gt;
  &lt;/outbound-socket-binding&gt;
  </code></pre>
  <p>Startup command is using <code>-Djboss.bind.address</code> and <code>-Djboss.messaging.host=</code>, both binding to the pod's IP.</p>
  <p>Client JMS code:</p>
  <pre class="lang-java prettyprint-override"><code>public class HelloWorldJMSClient {
      private static final Logger log = Logger.getLogger(HelloWorldJMSClient.class.getName());
  
      // Set up all the default values
      private static final String DEFAULT_MESSAGE = &quot;Hello, World!&quot;;
      private static final String DEFAULT_CONNECTION_FACTORY = &quot;jms/RemoteConnectionFactory&quot;;
      private static final String DEFAULT_DESTINATION = &quot;jms/queue/TestQ&quot;;
      private static final String DEFAULT_MESSAGE_COUNT = &quot;1&quot;;
      private static final String DEFAULT_USERNAME = &quot;jmsuser&quot;;
      private static final String DEFAULT_PASSWORD = &quot;jmsuser@123&quot;;
      private static final String INITIAL_CONTEXT_FACTORY = &quot;org.jboss.naming.remote.client.InitialContextFactory&quot;;
      //private static final String INITIAL_CONTEXT_FACTORY = &quot;org.wildfly.naming.client.WildFlyInitialContextFactory&quot;;
      private static final String PROVIDER_URL = &quot;https-remoting://myOpenshiftRouteURL:443&quot;;
  </code></pre>
  <p>When running te JMS java app, getting below exception:</p>
  <pre><code>Feb 03, 2022 9:47:31 AM HelloWorldJMSClient main
  INFO: Attempting to acquire connection factory &quot;jms/RemoteConnectionFactory&quot;
  Feb 03, 2022 9:47:34 AM HelloWorldJMSClient main
  INFO: Found connection factory &quot;jms/RemoteConnectionFactory&quot; in JNDI
  Feb 03, 2022 9:47:34 AM HelloWorldJMSClient main
  INFO: Attempting to acquire destination &quot;jms/queue/TestQ&quot;
  Feb 03, 2022 9:47:34 AM HelloWorldJMSClient main
  INFO: Found destination &quot;jms/queue/TestQ&quot; in JNDI
  Feb 03, 2022 9:47:55 AM HelloWorldJMSClient main
  SEVERE: Failed to create session factory
  Exception in thread &quot;main&quot; javax.jms.JMSException: Failed to create session factory
          at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:837)
          at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:282)
          at HelloWorldJMSClient.main(HelloWorldJMSClient.java:69)
  Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
          at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:797)
          at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:835)
          ... 2 more
  </code></pre>
  <p>Please let me know if I was explicit enough on describing the setup in Openshift. I cannot figure out what's missing though, or what I'm doing wrong. Any suggestions/inputs/hints are highly appreciated.</p>