v2ray-core: rejected common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found

你正在使用哪个版本的 V2Ray?

V2Ray 4.44.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.17.3 linux/amd64)

你的使用场景是什么?

翻阅内部防火墙

你看到的异常现象是什么?

服务端出现rejected common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found , 并且客户端无法连接网络

你期待看到的正常表现是怎样的?

不出现错误日志,并且客户端可以正常使用网络

请附上你的配置

服务端配置:

// 在这里附上服务器端配置文件
{
  "log": {
    "loglevel": "debug"
  },
  "inbounds": [
    {
        "port": 16823, // 服务器监听端口
        "protocol": "vmess",    // 主传入协议
        "settings": {
          "clients": [
            {
              "id": "b831381d-6324-4d53-ad4f-8cda48b30811",  // 用户 ID,客户端与服务器必须相同
              "alterId": 0
            }
          ]
        }
      }
  ],
  "outbounds": [
     {
      "protocol": "freedom",  // 主传出协议
      "settings": {}
      }
    ],

"dns": {
"servers": [
"114.114.114.114",
"localhost"
]
 }

}

客户端配置:

// 在这里附上客户端配置
{
    "log": {
        "loglevel": "debug",
        "access": "/var/log/v2ray/access.log", // ~Y~X Linux ~Z~D路~D
        "error": "/var/log/v2ray/error.log"
    },
    "inbounds": [
        {
            "tag": "transparent",
            "port": 12345,
            "protocol": "dokodemo-door",
            "settings": {
                "network": "tcp,udp",
                "followRedirect": true
            },
            "sniffing": {
                "enabled": true,
                "destOverride": [
                    "http",
                    "tls"
                ]
            },
            "streamSettings": {
                "sockopt": {
                    "tproxy": "tproxy", // ~@~O~X~N代~P~F使~T TPROXY ~V~O
                    "mark": 255
                }
            }
        }
    ],
"outbounds": [
        {
            "protocol": "vmess", // 出口协议
            "settings": {
                "vnext": [
                    {
                        "address": "192.168.51.131", // 服务器地址,请修改为你自己的服务器 IP 或域名
                        "port": 16823, // 服务器端口
                        "users": [
                            {
                                "id": "b831381d-6324-4d53-ad4f-8cda48b30811", // 用户 ID,必须与服务器端配置相同
                                "alterId": 0 // 此处的值也应当与服务器相同
                            }
                        ]
                    }
                ]
            }
        }
    ],
    "dns": {
        "servers": [
            {
                "address": "192.168.1.1", //中国大陆域名使用 114 的 DNS (备用)
                "port": 53,
                "domains": [
                    "geosite:cn",
                    "ntp.org", // NTP 服务器
                    "$myserver.address" // 此处改为你 VPS 的域名
                ]
            },
{
                "address": "8.8.8.8", //非中国大陆域名使用 Google 的 DNS
                "port": 53,
                "domains": [
                    "geosite:geolocation-!cn"
                ]
            },
            {
                "address": "1.1.1.1", //非中国大陆域名使用 Cloudflare 的 DNS
                "port": 53,
                "domains": [
                    "geosite:geolocation-!cn"
                ]
            }
        ]
    }
}

请附上出错时软件输出的错误日志

服务器端错误日志:

// 在这里附上服务器端日志
2022/02/14 18:05:53 172.20.122.189:35832 rejected  common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found
2022/02/14 18:05:53 [Info] [2337968776] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 172.20.122.189:35832 > common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found
2022/02/14 18:05:53 172.20.122.189:35830 rejected  common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found
2022/02/14 18:05:53 [Info] [1121610257] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 172.20.122.189:35830 > common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found
2022/02/14 18:05:53 172.20.122.189:35840 rejected  common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found
2022/02/14 18:05:53 [Info] [449892505] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 172.20.122.189:35840 > common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found
2022/02/14 18:05:53 172.20.122.189:35838 rejected  common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found
2022/02/14 18:05:53 [Info] [117733608] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 172.20.122.189:35838 > common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found
2022/02/14 18:05:53 172.20.122.189:35846 rejected  common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found
2022/02/14 18:05:53 [Info] [4227250692] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 172.20.122.189:35846 > common/drain: common/drain: unable to drain connection > EOF > proxy/vmess/encoding: invalid user > proxy/vmess: Not Found
^C2022/02/14 18:05:56 [Debug] app/log: Logger closing

客户端错误日志:

// 在这里附上客户端日志

请附上访问日志

// 在这里附上服务器端日志

其它相关的配置文件(如 Nginx)和相关日志

如果 V2Ray 无法启动,请附上 --test 命令的输出

如果 V2Ray 服务运行异常,请附上 journal 日志

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (4 by maintainers)

Most upvoted comments

如果您使用的linux发行版为debian

不妨执行如下命令:

apt-get install -y ntp && /lib/systemd/systemd-sysv-install enable ntp

当我执行这串命令,再次重启程序,客户端可以进行连接,希望能够帮到你!

关闭VMessAEAD。。。v2ray.vmess.aead.forced = false

You don’t have to worry about this, it may be the replay attacks from GFW.

关键这不涉及到 GFW, VMESS协议只跨越一个局域网

Sorry, I didn’t read it carefully.

Generally, this is caused by inaccurate system time.

可能是客户端与服务器 alterId 不匹配, 不知道服务器设置的话把客户端的设为0就好了

My server time already synced this error happened when using ws protocol with dynamic ports but once changed the protocol type into tcp, this error was gone