Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

服务端日志大量报错failed to drain connection DrainSize #487

Closed
timnick-snow opened this issue Dec 3, 2020 · 13 comments
Closed

Comments

@timnick-snow
Copy link

除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。
如果你遇到的问题不是 V2Ray 的 bug,比如你不清楚要如何配置,请使用Discussion进行讨论。

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
    V2Ray 4.33.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.15.5 linux/amd64)
    A unified platform for anti-censorship.

  2. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
    vmess代理访问部分外网

  3. 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)

客户端正确配置后是可以正常访问需要访问的外网的, 但是不知道什么原因, 服务端日志有大量报错日志,
rejected v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 20 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found

并且来源ip很奇怪

  1. 你期待看到的正确表现是怎样的?

这种报错是正常的吗? 什么原因导致的?

  1. 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

{
  "log": {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "error"
  },
  "inbounds": [
    {
      "tag": "default",
      "port": port,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "uuid",
            "alterId": 2
          }
        ]
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "none"
        }
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom"
    }
  ],
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "type": "field",
        "domain": [
          "xxx.xxx"
        ],
        "inboundTag": [
          "default"
        ],
        "outboundTag": "direct"
      }
    ]
  }
}
  1. 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:

     2020/12/03 14:09:29 113.128.104.24:35626 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 10 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:09:39 222.79.48.11:55444 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 13 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:09:50 222.79.48.11:58494 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 1 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:10:01 119.39.46.100:38458 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 5 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:39:07 175.152.31.31:51712 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 16 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:39:22 119.118.5.179:60178 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 18 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:55:43 222.79.48.61:54670 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 19 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:56:42 60.208.208.155:43530 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 13 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:56:57 60.208.208.155:46354 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 8 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:57:28 182.138.158.52:53762 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 9 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:57:38 182.138.158.52:55930 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 17 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 14:57:48 61.181.2.241:42220 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 14 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 15:23:49 27.211.187.191:57244 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 2 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 15:24:06 27.211.187.191:60118 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 2 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 15:31:28 110.177.183.79:40076 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 0 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 15:37:19 121.57.229.74:49732 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 2 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 15:43:22 124.235.138.127:55048 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 11 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 15:58:57 220.200.174.188:43456 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 0 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 15:59:07 220.200.174.188:47510 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 5 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 16:02:34 220.200.165.44:57650 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 10 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 16:18:14 27.224.137.217:43920 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 14 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 16:18:25 27.224.137.217:47322 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 4 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 16:18:37 27.224.137.217:50832 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 7 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 16:46:12 221.13.12.108:55358 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 20 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 16:46:22 221.13.12.108:59058 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 6 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 16:46:31 221.213.75.95:38942 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 17 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 16:46:32 221.13.12.108:34658 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 19 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 17:20:44 112.115.193.194:60500 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 14 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 17:26:01 113.128.104.155:57594 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 20 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
2020/12/03 17:26:11 113.128.104.155:33157 rejected  v2ray.com/core/proxy/vmess/encoding: failed to drain connection DrainSize = 3253 21 20 > v2ray.com/core/proxy/vmess/encoding: invalid user > v2ray.com/core/proxy/vmess: Not Found
@kslr
Copy link
Contributor

kslr commented Dec 3, 2020

看起来是uuid错了

@timnick-snow
Copy link
Author

@kslr 访问的ip是未经授权的ip, 怎么禁止这些ip访问呀, 一直访问一直报错.

@kslr
Copy link
Contributor

kslr commented Dec 4, 2020

设置防火墙

@darhwa
Copy link
Contributor

darhwa commented Dec 5, 2020

全是三大运营商的空闲IP,明显是在被探测嘛。

先把alterId改成0。非0值早就证明不安全了(v2ray/v2ray-core#2523),为0的情况是后面加的AEAD模式,相对更安全。

@1265578519
Copy link

4.28版本或以上 启动AEAD加密即可 服务端和客户端的alterId改成0

@timnick-snow
Copy link
Author

timnick-snow commented Jan 8, 2021

改用vless了,tls+回落,挺好使的

@weaming
Copy link

weaming commented Mar 8, 2021

使用 macOS 上的 Clash Pro 出现这种现象,重启客户端电脑后恢复正常。不知道原因。 :(

@xiebruce
Copy link

虽然这个问题已经关闭,不过我还是想说一下我遇到的情况:那就是因为录制视频的关系,我把系统时间改了,结果就出现跟楼主一模一样的问题,然后我才想起来客户端和服务器时间差不能超过貌似是90秒吧?我把时间改回正常时间,就好了,跟alterID无关

@weaming
Copy link

weaming commented Nov 16, 2021

虽然这个问题已经关闭,不过我还是想说一下我遇到的情况:那就是因为录制视频的关系,我把系统时间改了,结果就出现跟楼主一模一样的问题,然后我才想起来客户端和服务器时间差不能超过貌似是90秒吧?我把时间改回正常时间,就好了,跟alterID无关

同样原因,非常感谢。

@yogkang
Copy link

yogkang commented Apr 1, 2022

我重新部署的时候也出现这个问题,后来发现更换UUID就好了,这是为什么呀!

@MackXue
Copy link

MackXue commented May 2, 2022

虽然这个问题已经关闭,不过我还是想说一下我遇到的情况:那就是因为录制视频的关系,我把系统时间改了,结果就出现跟楼主一模一样的问题,然后我才想起来客户端和服务器时间差不能超过貌似是90秒吧?我把时间改回正常时间,就好了,跟alterID无关

遇到同样的问题,很不起眼的问题,但是又很难排查.非常感谢你能把问题爆露出来

@zy-zzf2000
Copy link

同样的问题,感谢!

@daneilooh
Copy link

牛逼,同样的问题,同步一下时间就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests