Closed grignix closed 1 year ago
chrome: if use direct connection or nginx instead of gravity, then everything works chrome: when connected via gravitee, in gravitee logs the error described above
firefox: does not work, the problem is described here https://github.com/gravitee-io/issues/issues/8224
Hello, I'm also experiencing problems with connection to WebSockets.
GETws://192.168.0.136:8073/websockets [HTTP/1.1 502 Bad Gateway 5ms] Firefox can’t establish a connection to the server at ws://192.168.0.136:8073/websockets.
Port 8073 is gateway and 7071 is WebSocket Server part of application.
Here is APIM entity
{
"id" : "d607dc5d-66f7-4d39-87dc-5d66f72d39db",
"name" : "wsockets",
"version" : "1.0",
"description" : "wsockets-testing",
"groups" : [ ],
"visibility" : "PUBLIC",
"state" : "STARTED",
"tags" : [ ],
"labels" : [ ],
"entrypoints" : [ {
"target" : "https://api.company.com/websockets"
} ],
"execution_mode" : "v3",
"context_path" : "/websockets",
"proxy" : {
"virtual_hosts" : [ {
"path" : "/websockets"
} ],
"strip_context_path" : false,
"preserve_host" : false,
"groups" : [ {
"name" : "default-group",
"endpoints" : [ {
"backup" : false,
"inherit" : true,
"name" : "default",
"weight" : 1,
"type" : "http",
"target" : "ws://192.168.0.136:7071/"
} ],
"load_balancing" : {
"type" : "ROUND_ROBIN"
},
"http" : {
"connectTimeout" : 5000,
"idleTimeout" : 60000,
"keepAlive" : true,
"readTimeout" : 10000,
"pipelining" : false,
"maxConcurrentConnections" : 100,
"useCompression" : true,
"followRedirects" : false
}
} ]
},
"flow_mode" : "DEFAULT",
"flows" : [ ],
"plans" : [ {
"id" : "8835d340-abcf-47ac-b5d3-40abcf27aca1",
"name" : "Basic",
"description" : "asd",
"validation" : "AUTO",
"security" : "KEY_LESS",
"type" : "API",
"status" : "PUBLISHED",
"api" : "d607dc5d-66f7-4d39-87dc-5d66f72d39db",
"order" : 0,
"characteristics" : [ ],
"created_at" : 1658436280890,
"updated_at" : 1658436839962,
"published_at" : 1658436280890,
"paths" : { },
"flows" : [ {
"name" : "",
"path-operator" : {
"path" : "/",
"operator" : "STARTS_WITH"
},
"condition" : "",
"consumers" : [ ],
"methods" : [ ],
"pre" : [ ],
"post" : [ ],
"enabled" : true
} ],
"comment_required" : false
} ],
"gravitee" : "2.0.0",
"deployed_at" : 1658436843048,
"created_at" : 1658436280763,
"updated_at" : 1658436843048,
"owner" : {
"id" : "2c3e61f2-84ba-4469-be61-f284ba1469f9",
"displayName" : "admin",
"type" : "USER"
},
"properties" : [ ],
"services" : { },
"picture_url" : "http://192.168.0.136:8083/management/organizations/DEFAULT/environments/DEFAULT/apis/d607dc5d-66f7-4d39-87dc-5d66f72d39db/picture?hash=1658436843048",
"resources" : [ ],
"path_mappings" : [ ],
"response_templates" : { },
"lifecycle_state" : "PUBLISHED",
"disable_membership_notifications" : false,
"background_url" : "http://192.168.0.136:8083/management/organizations/DEFAULT/environments/DEFAULT/apis/d607dc5d-66f7-4d39-87dc-5d66f72d39db/background?hash=1658436843048"
}
Am I missing something? Any help or advice is greatly appreciated! I can provide
Best Regards Milan.
Hi @mouligno Please tell me if there are any solutions to my problem?
it seems that gravity cannot work with compression in websockets, the Sec-WebSocket-Extensions: permessage-deflate header causes an error (RSV != 0 and no extension negotiated, RSV:4), if you put nginx before gravity and cut the Sec-WebSocket-Extensions: permessage-deflate header, then error (RSV != 0 and no extension negotiated, RSV:4) disappears
Hi, we are facing the same problem on the latest version 3.19.0, please tell me when it is planned to solve this problem?
in version 3.20.1 this error was fixed, is it possible to backport changes to version 3.15.x?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Just a quick update! I'm going to close this issue since it's fixed in APIM 3.20.1+ (no backport on older version is planned). If you have more insights or want to revisit this issue, feel free to reopen or create a new one!
Please tell me if there are any solutions , because I also have this problem
Please tell me if there are any solutions , because I also have this problem
if you use Nginx as a backend, configure it like this: proxy_set_header Sec-WebSocket-Extensions ""; proxy_hide_header Sec-WebSocket-Extensions;
Describe the bug
WebSocket connection not working if using direct connection or nginx instead of gravitee, then everything works
gravitee 3.15.12 Chrome 103.0.5060.114 Edge 103.0.1264.44
in logs