Bug 989451 - Cannot establish WebSocket connection to Vertx.io application
Cannot establish WebSocket connection to Vertx.io application
Status: CLOSED NOTABUG
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
1.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Mrunal Patel
libra bugs
: SupportQuestion
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-29 05:49 EDT by Igor Azarny
Modified: 2013-08-08 08:08 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-08 08:08:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Igor Azarny 2013-07-29 05:49:06 EDT
Description of problem:

Cannot establish WebSocket connection to Vertx.io application. 

Version-Release number of selected component (if applicable):


How reproducible:

Open ws connection.

Steps to Reproduce:
1. Create simple vertx.io 2.0.0 diy application, which accept ws connection. Java code below
public class TestVerticle extends Verticle {

    public void start() {

        final HttpServer server = vertx.createHttpServer();

       server.websocketHandler(new Handler<ServerWebSocket>() {
         public void handle(ServerWebSocket ws) {  
             System.out.println("Connected")  ;
         }
       });

        final String host = System.getenv("OPENSHIFT_DIY_IP");

        final String port = System.getenv("OPENSHIFT_DIY_PORT");

        server.listen(Integer.valueOf(port), host);

   }

}
2. Try to establich websocket connection. Java script code below
<script>

    var sock = new WebSocket("ws://app.addre.rhcloud.com");
    console.log('Using web socket');


</script>




Actual results:
Web socket socket in pending state

Expected results:
WebSocket connection is open. 


Additional info:
The SockJS failback to xhr long polling, because also cannot establish websocket connectin.
Comment 1 Rob Millner 2013-07-29 16:20:27 EDT
Hi Igor,

Incoming websocket requests should go to port 8000, it looks like your code above just uses the standard http ports.

Try that and see if it works.  Thanks!
Comment 2 Igor Azarny 2013-07-30 07:32:29 EDT
(In reply to Rob Millner from comment #1)
> Hi Igor,
> 
> Incoming websocket requests should go to port 8000, it looks like your code
> above just uses the standard http ports.
> 
> Try that and see if it works.  Thanks!

Hi Rob,

Unfortunately result still the same.

In additional I would like to add following:

1. I am able to open connection telnet to 8000, hence this is not firewall issue.
2. The web socket closed abnornally from server side. Close even code has 1006 value.

May be support of websockets not configured for diy package ?
Comment 3 Igor Azarny 2013-08-08 08:08:13 EDT
Close, because of wirewal issue

Note You need to log in before you can comment on or make changes to this bug.