<div dir="ltr"><div><div><div>Looks like this is issue with openshift itself.<br><br></div>there is proxy in front of gear and that proxy does not know how to do http upgrade.<br></div>For web sockets there is special exception to make this work on different port.<br>

<br></div>see: <br><div><a href="https://www.openshift.com/content/at-least-one-port-for-external-use-excluding-8080-please">https://www.openshift.com/content/at-least-one-port-for-external-use-excluding-8080-please</a><br>
<a href="https://www.openshift.com/blogs/paas-websockets">https://www.openshift.com/blogs/paas-websockets</a><br><a href="https://www.openshift.com/content/websockets-on-port-80-and-443">https://www.openshift.com/content/websockets-on-port-80-and-443</a><br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=978597">https://bugzilla.redhat.com/show_bug.cgi?id=978597</a><br><br></div><div>I will do some more digging to see if we can use some hack/workaround to make it work.<br>
<br>--<br></div><div>tomaz<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 17, 2014 at 4:09 PM, Stuart Douglas <span dir="ltr">&lt;<a href="mailto:stuart.w.douglas@gmail.com" target="_blank">stuart.w.douglas@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The relevant config item should be in the remoting subsystem:<div><br></div><div><div><br></div><div>       &lt;http-connector name=&quot;http-remoting-connector&quot; connector-ref=&quot;default&quot; security-realm=&quot;ApplicationRealm&quot;/&gt;</div>

</div><div><br></div><div>This is the bit that registers the HTTP upgrade handler with Undertow.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Stuart</div></font></span></div><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 17, 2014 at 8:12 PM, Jeff Mesnil <span dir="ltr">&lt;<a href="mailto:jmesnil@redhat.com" target="_blank">jmesnil@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Now we have an OpenShift cartridge for WildFly 8.0.0.Final (hanks Farah!), I’m adding instructions to the JMS quickstarts to deploy them on OpenShift.<br>
<br>
The helloworld-mdb is working fine but I have an issue with the helloworld-jms one[1].<br>
<br>
In this quick start, the Java client makes a lookup to JNDI to retrieve the JMS resources.<br>
<br>
The quickstart uses the “http-remoting://localhost:8080” as the JNDI provider URL for a local WildFly server.<br>
<br>
When I host WildFly on OpenShift, that URL should translate to http-remoting://&lt;app&gt;-&lt;namespace&gt;.<a href="http://rhcloud.com:80" target="_blank">rhcloud.com:80</a> (in my case http-remoting://<a href="http://helloworldjms-jmesnil.rhcloud.com:80" target="_blank">helloworldjms-jmesnil.rhcloud.com:80</a>)<br>


However this does not work:<br>
<br>
<br>
$ mvn clean compile exec:java -Djava.naming.provider.url=http-remoting://<a href="http://helloworldjms-jmesnil.rhcloud.com:80" target="_blank">helloworldjms-jmesnil.rhcloud.com:80</a><br>
…<br>
Feb 17, 2014 3:28:46 PM org.xnio.Xnio &lt;clinit&gt;<br>
INFO: XNIO version 3.2.0.Final<br>
Feb 17, 2014 3:28:46 PM org.xnio.nio.NioXnio &lt;clinit&gt;<br>
INFO: XNIO NIO Implementation Version 3.2.0.Final<br>
Feb 17, 2014 3:28:46 PM org.jboss.remoting3.EndpointImpl &lt;clinit&gt;<br>
INFO: JBoss Remoting version 4.0.0.Final<br>
Feb 17, 2014 3:28:46 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main<br>
INFO: Attempting to acquire connection factory &quot;jms/RemoteConnectionFactory&quot;<br>
Feb 17, 2014 3:28:47 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main<br>
SEVERE: Failed to connect to any server. Servers tried: [http-remoting://<a href="http://helloworldjms-jmesnil.rhcloud.com:80" target="_blank">helloworldjms-jmesnil.rhcloud.com:80</a> (java.io.IOException: Invalid response code 200)]<br>


<br>
Remote naming is correctly complaining that the HTTP Upgrade handshake responded with a 200 OK instead of a 100 Continue.<br>
Indeed, the deployed WildFly server does not upgrade my connection. You can check by hand using curl:<br>
<br>
$ curl -v <a href="http://helloworldjms-jmesnil.rhcloud.com" target="_blank">http://helloworldjms-jmesnil.rhcloud.com</a> -H &#39;Connection:upgrade&#39; -H &#39;Upgrade:jboss-remoting&#39; -H &#39;Sec-JbossRemoting-Key: Xj8ZjttC3aixB1bAZ9w39A==&#39;<br>


...<br>
* Connected to <a href="http://helloworldjms-jmesnil.rhcloud.com" target="_blank">helloworldjms-jmesnil.rhcloud.com</a> (50.17.25.239) port 80 (#0)<br>
&gt; GET / HTTP/1.1<br>
&gt; User-Agent: curl/7.30.0<br>
&gt; Host: <a href="http://helloworldjms-jmesnil.rhcloud.com" target="_blank">helloworldjms-jmesnil.rhcloud.com</a><br>
&gt; Accept: */*<br>
&gt; Connection:upgrade<br>
&gt; Upgrade:jboss-remoting<br>
&gt; Sec-JbossRemoting-Key: Xj8ZjttC3aixB1bAZ9w39A==<br>
&gt;<br>
&lt; HTTP/1.1 200 OK<br>
&lt; Date: Mon, 17 Feb 2014 14:23:37 GMT<br>
* Server Wildfly 8 is not blacklisted<br>
&lt; Server: Wildfly 8<br>
&lt; Last-Modified: Mon, 17 Feb 2014 14:20:22 GMT<br>
&lt; X-Powered-By: Undertow 1<br>
&lt; Content-Type: text/html<br>
&lt; Content-Length: 41708<br>
&lt; Vary: Accept-Encoding<br>
…<br>
[Home Page content follows]<br>
<br>
The undertow’s http-listener is the default one;<br>
<br>
    &lt;http-listener name=&quot;default&quot; socket-binding=&quot;http&quot; proxy-address-forwarding=&quot;true”/&gt;<br>
<br>
I tried removing the proxy-address-forwarding attribute but that did not change anything.<br>
<br>
Has someone managed to use remote naming with WildFly on OpenShift?<br>
Am I missing something obvious to make it run?<br>
<br>
jeff<br>
<br>
[1] <a href="https://github.com/jmesnil/quickstart/blob/helloworld-jms-openshift/helloworld-jms/README.md#build-and-deploy-the-quickstart---to-openshift" target="_blank">https://github.com/jmesnil/quickstart/blob/helloworld-jms-openshift/helloworld-jms/README.md#build-and-deploy-the-quickstart---to-openshift</a><br>


<span><font color="#888888">--<br>
Jeff Mesnil<br>
JBoss, a division of Red Hat<br>
<a href="http://jmesnil.net/" target="_blank">http://jmesnil.net/</a><br>
<br>
<br>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
</font></span></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br></blockquote></div><br></div>