[wildfly-dev] Issue with HTTP upgrade for remote naming on OpenShit?

Farah Juma fjuma at redhat.com
Tue Feb 18 16:19:13 EST 2014


I'm looking into this as well to see if there's a way to make this work. When using port forwarding, I'm finding that an error still occurs:

INFO: JBoss Remoting version 4.0.0.Final
Feb 18, 2014 4:09:23 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main
INFO: Attempting to acquire connection factory "jms/RemoteConnectionFactory"
Feb 18, 2014 4:09:23 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main
INFO: Found connection factory "jms/RemoteConnectionFactory" in JNDI
Feb 18, 2014 4:09:23 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main
INFO: Attempting to acquire destination "jms/queue/test"
Feb 18, 2014 4:09:23 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main
INFO: Found destination "jms/queue/test" in JNDI
Feb 18, 2014 4:09:24 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main
SEVERE: Failed to create session factory
Feb 18, 2014 4:09:24 PM org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1$MessageReceiver handleEnd
ERROR: Channel end notification received, closing channel Channel ID cba05e7a (outbound) of Remoting connection 2e3ed883 to null


Farah

----- Original Message -----
> From: "Jason Greene" <jason.greene at redhat.com>
> To: "Tomaž Cerar" <tomaz.cerar at gmail.com>
> Cc: "Stuart Douglas" <stuart.w.douglas at gmail.com>, "WildFly Dev" <wildfly-dev at lists.jboss.org>, "Farah Juma"
> <fjuma at redhat.com>
> Sent: Tuesday, February 18, 2014 3:58:49 PM
> Subject: Re: [wildfly-dev] Issue with HTTP upgrade for remote naming on OpenShit?
> 
> Farah mentions port forwards in here blog. I suppose this is the only
> solution currently.
> 
> https://community.jboss.org/people/fjuma/blog/2014/02/14/wildfly-8-final-on-openshift
> 
> 
> On Feb 18, 2014, at 2:40 PM, Tomaž Cerar <tomaz.cerar at gmail.com> wrote:
> 
> > Looks like this is issue with openshift itself.
> > 
> > there is proxy in front of gear and that proxy does not know how to do http
> > upgrade.
> > For web sockets there is special exception to make this work on different
> > port.
> > 
> > see:
> > https://www.openshift.com/content/at-least-one-port-for-external-use-excluding-8080-please
> > https://www.openshift.com/blogs/paas-websockets
> > https://www.openshift.com/content/websockets-on-port-80-and-443
> > https://bugzilla.redhat.com/show_bug.cgi?id=978597
> > 
> > I will do some more digging to see if we can use some hack/workaround to
> > make it work.
> > 
> > --
> > tomaz
> > 
> > 
> > 
> > On Mon, Feb 17, 2014 at 4:09 PM, Stuart Douglas
> > <stuart.w.douglas at gmail.com> wrote:
> > The relevant config item should be in the remoting subsystem:
> > 
> > 
> >        <http-connector name="http-remoting-connector"
> >        connector-ref="default" security-realm="ApplicationRealm"/>
> > 
> > This is the bit that registers the HTTP upgrade handler with Undertow.
> > 
> > Stuart
> > 
> > 
> > On Mon, Feb 17, 2014 at 8:12 PM, Jeff Mesnil <jmesnil at redhat.com> wrote:
> > Hi,
> > 
> > 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.
> > 
> > The helloworld-mdb is working fine but I have an issue with the
> > helloworld-jms one[1].
> > 
> > In this quick start, the Java client makes a lookup to JNDI to retrieve the
> > JMS resources.
> > 
> > The quickstart uses the “http-remoting://localhost:8080” as the JNDI
> > provider URL for a local WildFly server.
> > 
> > When I host WildFly on OpenShift, that URL should translate to
> > http-remoting://<app>-<namespace>.rhcloud.com:80 (in my case
> > http-remoting://helloworldjms-jmesnil.rhcloud.com:80)
> > However this does not work:
> > 
> > 
> > $ mvn clean compile exec:java
> > -Djava.naming.provider.url=http-remoting://helloworldjms-jmesnil.rhcloud.com:80
> > …
> > Feb 17, 2014 3:28:46 PM org.xnio.Xnio <clinit>
> > INFO: XNIO version 3.2.0.Final
> > Feb 17, 2014 3:28:46 PM org.xnio.nio.NioXnio <clinit>
> > INFO: XNIO NIO Implementation Version 3.2.0.Final
> > Feb 17, 2014 3:28:46 PM org.jboss.remoting3.EndpointImpl <clinit>
> > INFO: JBoss Remoting version 4.0.0.Final
> > Feb 17, 2014 3:28:46 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient
> > main
> > INFO: Attempting to acquire connection factory
> > "jms/RemoteConnectionFactory"
> > Feb 17, 2014 3:28:47 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient
> > main
> > SEVERE: Failed to connect to any server. Servers tried:
> > [http-remoting://helloworldjms-jmesnil.rhcloud.com:80
> > (java.io.IOException: Invalid response code 200)]
> > 
> > Remote naming is correctly complaining that the HTTP Upgrade handshake
> > responded with a 200 OK instead of a 100 Continue.
> > Indeed, the deployed WildFly server does not upgrade my connection. You can
> > check by hand using curl:
> > 
> > $ curl -v http://helloworldjms-jmesnil.rhcloud.com -H 'Connection:upgrade'
> > -H 'Upgrade:jboss-remoting' -H 'Sec-JbossRemoting-Key:
> > Xj8ZjttC3aixB1bAZ9w39A=='
> > ...
> > * Connected to helloworldjms-jmesnil.rhcloud.com (50.17.25.239) port 80
> > (#0)
> > > GET / HTTP/1.1
> > > User-Agent: curl/7.30.0
> > > Host: helloworldjms-jmesnil.rhcloud.com
> > > Accept: */*
> > > Connection:upgrade
> > > Upgrade:jboss-remoting
> > > Sec-JbossRemoting-Key: Xj8ZjttC3aixB1bAZ9w39A==
> > >
> > < HTTP/1.1 200 OK
> > < Date: Mon, 17 Feb 2014 14:23:37 GMT
> > * Server Wildfly 8 is not blacklisted
> > < Server: Wildfly 8
> > < Last-Modified: Mon, 17 Feb 2014 14:20:22 GMT
> > < X-Powered-By: Undertow 1
> > < Content-Type: text/html
> > < Content-Length: 41708
> > < Vary: Accept-Encoding
> > …
> > [Home Page content follows]
> > 
> > The undertow’s http-listener is the default one;
> > 
> >     <http-listener name="default" socket-binding="http"
> >     proxy-address-forwarding="true”/>
> > 
> > I tried removing the proxy-address-forwarding attribute but that did not
> > change anything.
> > 
> > Has someone managed to use remote naming with WildFly on OpenShift?
> > Am I missing something obvious to make it run?
> > 
> > jeff
> > 
> > [1]
> > https://github.com/jmesnil/quickstart/blob/helloworld-jms-openshift/helloworld-jms/README.md#build-and-deploy-the-quickstart---to-openshift
> > --
> > Jeff Mesnil
> > JBoss, a division of Red Hat
> > http://jmesnil.net/
> > 
> > 
> > _______________________________________________
> > wildfly-dev mailing list
> > wildfly-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/wildfly-dev
> > 
> > 
> > _______________________________________________
> > wildfly-dev mailing list
> > wildfly-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/wildfly-dev
> > 
> > _______________________________________________
> > wildfly-dev mailing list
> > wildfly-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/wildfly-dev
> 
> --
> Jason T. Greene
> WildFly Lead / JBoss EAP Platform Architect
> JBoss, a division of Red Hat
> 
>



More information about the wildfly-dev mailing list