[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: problem with websockets



If you're using openshift v3 make sure your websocket port is also listed in your service (services list the ports they expose).  You can alter your route to point directly at your websocket port by setting the port field:

$ oc explain route.spec.port
RESOURCE: port <Object>

DESCRIPTION:
     If specified, the port to be used by the router. Most routers will use all
     endpoints exposed by the service by default - set this value to instruct
     routers which port to use.

    RoutePort defines a port mapping from a router to an endpoint in the service endpoints.

FIELDS:
   targetPort   <string> -required-
     The target port on pods selected by the service this route points to. If
     this is a string, it will be looked up as a named port in the target
     endpoints port list. Required

Set it to "8000".


On Wed, Sep 14, 2016 at 10:54 AM, Tony Saxon <tony saxon gmail com> wrote:
I have an application that runs on tomcat and uses websockets. I'm able to build it and test it in a standalone docker container and it works fine. When I deploy that same image to my openshift instance the application can not connect to the websocket. After doing some research I've found some conflicting information. Older articles that i've read mention that you can only connect to websockets on openshift through port 8000 or 8443. However, the documentation at https://docs.openshift.org/latest/architecture/core_concepts/routes.html#routers seems to indicate that websockets are no different then the other protocols handled by the openshift router. Is this the case or does it need to be port 8000? If it's port 8000, do I need to configure a separate connect in tomcat in my docker container for port 8000?

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]