You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/08/19 02:57:47 UTC

[GitHub] [apisix] michaelh1355 opened a new issue, #7742: help request: how to fix websocket connection error on apisix

michaelh1355 opened a new issue, #7742:
URL: https://github.com/apache/apisix/issues/7742

   ### Description
   
   hello 你好,
   
   apisix启用websocket之后,遇到报错,无法使用,upstream有多台server,Algorithm为Round Robin,从client 浏览器访问server,在连接websocket窗口,报错信息:
   
   vendors-app.8cf4308c.js:8 [2022-08-18T08:23:01.794Z] Error: Failed to start the transport 'WebSockets': Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.
   
   
   vendors-app.8cf4308c.js:8 [2022-08-18T08:23:01.795Z] Error: Failed to start the connection: Error: Unable to connect to the server with any of the available transports. Error: WebSockets failed: Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled. ServerSentEvents failed: Error: 'ServerSentEvents' is disabled by the client. LongPolling failed: Error: 'LongPolling' is disabled by the client.
   
   请问如何解决这个问题?谢谢!
   
   
   ### Environment
   
   - APISIX version (run `apisix version`):
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] michaelh1355 commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by GitBox <gi...@apache.org>.
michaelh1355 commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1220537605

   the websocket conneciton works when the upstream server is keep one.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1698872002

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1220375040

   1. Please provide environment details
   2. Please provide your configuration about Route, Upstream and so on
   3. Any error logs in APISIX?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1222381370

   hi @michaelh1355, you need to provide what as @tokers said


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1224214342

   > nodes:
   > 
   > * host: 192.168.101.3
   >   port: 5001
   >   weight: 1
   > * host: 192.168.101.4
   >   port: 5001
   >   weight: 1
   >   timeout:
   >   connect: 18
   >   send: 18
   >   read: 18
   >   type: roundrobin
   >   scheme: http
   >   pass_host: pass
   >   name: sales
   >   keepalive_pool:
   >   idle_timeout: 60
   >   requests: 1000
   >   size: 320
   
   Please optimize the formatting, which is almost unreadable.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] michaelh1355 commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by GitBox <gi...@apache.org>.
michaelh1355 commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1220544506

   [app@websrv ~]# uname -a
   Linux nginx 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
   [app@websrv ~]# openresty -V
   nginx version: openresty/1.21.4.1
   built by gcc 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC) 
   built with OpenSSL 1.1.1n  15 Mar 2022
   TLS SNI support enabled
   configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DAPISIX_BASE_VER=1.21.4.1.0 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl111/include' --add-module=../ngx_devel_kit-0.3.1 --add-module=../echo-nginx-module-0.62 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.33 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.09 --add-module=../srcache-nginx-module-0.32 --add-module=../ngx_lua-0.10.21 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.9 --add-module=../ngx_stream_lua-0.0.11 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -Wl,-rpath,/usr/local/openresty/wasmtime-c-ap
 i/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl111/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl111/lib' --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../mod_dubbo-1.0.2 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../ngx_multi_upstream_module-1.1.0 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../apisix-nginx-module-1.9.0 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../apisix-nginx-module-1.9.0/src/stream --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../apisix-nginx-module-1.9.0/src/meta --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../wasm-nginx-module-0.6.1 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../lua-var-nginx-module-v0.5.2 --with-poll_module --with-pcre-jit --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_
 smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-compat --with-stream --with-http_ssl_module
   [app@websrv ~]# curl http://127.0.0.1:9090/v1/server_info
   {"boot_time":1656958371,"etcd_version":"3.4.0","id":"8b33d0ed-8ec0-4a54-9754-c50a3507ce89","version":"2.14.1","hostname":"nginx"}


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] michaelh1355 commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by GitBox <gi...@apache.org>.
michaelh1355 commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1223487295

   hello:
   
   **upstream configuration :**
   nodes:
     - host: 192.168.101.3
       port: 5001
       weight: 1
     - host: 192.168.101.4
       port: 5001
       weight: 1
   timeout:
     connect: 18
     send: 18
     read: 18
   type: roundrobin
   scheme: http
   pass_host: pass
   name: sales
   keepalive_pool:
     idle_timeout: 60
     requests: 1000
     size: 320
   
   
   **Router configuration :**
   
   uri: /sale/*
   name: sale
   methods:
     - GET
     - POST
     - PUT
     - DELETE
     - PATCH
     - HEAD
     - OPTIONS
     - CONNECT
     - TRACE
   host: gateway.test.com
   plugins:
     limit-conn:
       allow_degradation: false
       burst: 10
       conn: 20
       default_conn_delay: 0.1
       disable: true
       key: remote_addr
       key_type: var
       only_use_default_delay: false
       rejected_code: 507
       rejected_msg: '507'
     limit-req:
       burst: 5000
       disable: false
       key: remote_addr
       key_type: var
       nodelay: false
       rate: 50
       rejected_code: 509
     proxy-rewrite:
       regex_uri:
         - ^/sale/(.*)
         - /$1
   upstream_id: '414062948550446421'
   enable_websocket: true
   status: 1
   
   **APISIX error.log:**
   
   2022/08/23 11:28:12 [error] 14122#14122: *523753223 [lua] client.lua:116: reportServiceInstance(): Instance report fails, connection refused, context: ngx.timer
   2022/08/23 11:28:15 [error] 14122#14122: *523753883 [lua] client.lua:116: reportServiceInstance(): Instance report fails, connection refused, context: ngx.timer


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1224213171

   any error logs about websocket?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] closed issue #7742: help request: how to fix websocket connection error on apisix

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7742: help request: how to fix websocket connection error on apisix
URL: https://github.com/apache/apisix/issues/7742


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1225059172

   @michaelh1355 At least please provide how did you send the request, including the URI, headers, query string and etc.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] michaelh1355 commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by GitBox <gi...@apache.org>.
michaelh1355 commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1222195944

   hello:
   
   
   ***@***.*** ~]# uname -a
   Linux nginx 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
   ***@***.*** ~]# openresty -V
   nginx version: openresty/1.21.4.1
   built by gcc 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)
   built with OpenSSL 1.1.1n 15 Mar 2022
   TLS SNI support enabled
   configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DAPISIX_BASE_VER=1.21.4.1.0 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl111/include' --add-module=../ngx_devel_kit-0.3.1 --add-module=../echo-nginx-module-0.62 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.33 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.09 --add-module=../srcache-nginx-module-0.32 --add-module=../ngx_lua-0.10.21 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.9 --add-module=../ngx_stream_lua-0.0.11 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -Wl,-rpath,/usr/local/openresty/wasmtime-c-ap
 i/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl111/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl111/lib' --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../mod_dubbo-1.0.2 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../ngx_multi_upstream_module-1.1.0 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../apisix-nginx-module-1.9.0 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../apisix-nginx-module-1.9.0/src/stream --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../apisix-nginx-module-1.9.0/src/meta --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../wasm-nginx-module-0.6.1 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../lua-var-nginx-module-v0.5.2 --with-poll_module --with-pcre-jit --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_
 smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-compat --with-stream --with-http_ssl_module
   ***@***.*** ~]# curl http://127.0.0.1:9090/v1/server_info
   {"boot_time":1656958371,"etcd_version":"3.4.0","id":"8b33d0ed-8ec0-4a54-9754-c50a3507ce89","version":"2.14.1","hostname":"nginx"}
   
   
   
   
   
   ***@***.***
    
   From: Alex Zhang
   Date: 2022-08-19 16:04
   To: apache/apisix
   CC: michaelh1355; Author
   Subject: Re: [apache/apisix] help request: how to fix websocket connection error on apisix (Issue #7742)
   Please provide environment details
   Please provide your configuration about Route, Upstream and so on
   Any error logs in APISIX?
   —
   Reply to this email directly, view it on GitHub, or unsubscribe.
   You are receiving this because you authored the thread.Message ID: ***@***.***>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] commented on issue #7742: help request: how to fix websocket connection error on apisix

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7742:
URL: https://github.com/apache/apisix/issues/7742#issuecomment-1678699575

   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org