› NGINX
› NGINX Trac
› 3rd Party Modules
› Security Advisories
› CHANGES
› OpenResty
› ngx_lua
› Tengine
在线学习资源
› NGINX 开发从入门到精通
NGINX Modules
› ngx_echo
jiechan
V2EX  ›  NGINX

Nginx 配置 Socket 转发,客户端收不到服务器返回信息

  •  
  •   jiechan · Jan 29, 2018 · 4551 views
    This topic created in 3187 days ago, the information mentioned may be changed or developed.

    在 Nginx 上配置了 Socket 转发,转发到一台 SocketServer 上对 Socket 连接进行处理

    Nginx 服务器配置如下

    Stream {

    tcp_nodelay on;
    upstream bss_socket {
    	hash $remote_addr consistent;
        server 10.140.0.2:3344
    }
    
    server {
    	listen 95 so_keepalive=on;
        proxy_pass bss_socket;
    }
    

    }

    但是我从本地通过 socket 连接 Nginx 服务器的时候发现,SocketServer 能够收到客户端请求,但是客户端无法收到服务器的返回信息,这是什么原因呢?是缺少什么配置什么吗?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5998 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 02:47 · PVG 10:47 · LAX 19:47 · JFK 22:47
    ♥ Do have faith in what you're doing.