<div dir="ltr">The relevant config item should be in the remoting subsystem:<div><br></div><div><div><br></div><div> <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/></div>
</div><div><br></div><div>This is the bit that registers the HTTP upgrade handler with Undertow.</div><div><br></div><div>Stuart</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 17, 2014 at 8:12 PM, Jeff Mesnil <span dir="ltr"><<a href="mailto:jmesnil@redhat.com" target="_blank">jmesnil@redhat.com</a>></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://<app>-<namespace>.<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 <clinit><br>
INFO: XNIO version 3.2.0.Final<br>
Feb 17, 2014 3:28:46 PM org.xnio.nio.NioXnio <clinit><br>
INFO: XNIO NIO Implementation Version 3.2.0.Final<br>
Feb 17, 2014 3:28:46 PM org.jboss.remoting3.EndpointImpl <clinit><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 "jms/RemoteConnectionFactory"<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 'Connection:upgrade' -H 'Upgrade:jboss-remoting' -H 'Sec-JbossRemoting-Key: Xj8ZjttC3aixB1bAZ9w39A=='<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>
> GET / HTTP/1.1<br>
> User-Agent: curl/7.30.0<br>
> Host: <a href="http://helloworldjms-jmesnil.rhcloud.com" target="_blank">helloworldjms-jmesnil.rhcloud.com</a><br>
> Accept: */*<br>
> Connection:upgrade<br>
> Upgrade:jboss-remoting<br>
> Sec-JbossRemoting-Key: Xj8ZjttC3aixB1bAZ9w39A==<br>
><br>
< HTTP/1.1 200 OK<br>
< Date: Mon, 17 Feb 2014 14:23:37 GMT<br>
* Server Wildfly 8 is not blacklisted<br>
< Server: Wildfly 8<br>
< Last-Modified: Mon, 17 Feb 2014 14:20:22 GMT<br>
< X-Powered-By: Undertow 1<br>
< Content-Type: text/html<br>
< Content-Length: 41708<br>
< Vary: Accept-Encoding<br>
…<br>
[Home Page content follows]<br>
<br>
The undertow’s http-listener is the default one;<br>
<br>
<http-listener name="default" socket-binding="http" proxy-address-forwarding="true”/><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 class="HOEnZb"><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">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>