xray问题排查,curl: (35) Encountered end of file(已解决)

经过了好几次排查,都没找到问题,先说问题的排查过程,多次确认了user信息,包括用户id和alterid,都没问题,头大的一逼

问题排查过程

确保本地的xray服务是正常的

[root@k8s-master01 xray]# systemctl status xray
● xray.service - Xray ServiceLoaded: loaded (/etc/systemd/system/xray.service; enabled; vendor preset: disabled)Active: active (running) since 六 2024-03-16 22:12:12 CST; 16min agoMain PID: 16207 (xray)CGroup: /system.slice/xray.service└─16207 /usr/local/xray/xray -config /usr/local/xray/config.json3月 16 22:12:12 k8s-master01 systemd[1]: Started Xray Service.
3月 16 22:12:12 k8s-master01 xray[16207]: Xray 1.8.6 (Xray, Penetrates Everything.) Custom (go1.21.4 linux/amd64)
3月 16 22:12:12 k8s-master01 xray[16207]: A unified platform for anti-censorship.
3月 16 22:12:12 k8s-master01 xray[16207]: 2024/03/16 22:12:12 [Info] infra/conf/serial: Reading config: /usr/local/xray/config.json

从这一步看上去没问题,接着又开始第二步,通过journalctl排查

[root@k8s-master01 xray]# journalctl -f -xu xray
-- Logs begin at 一 2024-03-04 18:07:02 CST. --
3月 16 22:12:07 k8s-master01 systemd[1]: Started Xray Service.
-- Subject: Unit xray.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit xray.service has finished starting up.
-- 
-- The start-up result is done.
3月 16 22:12:07 k8s-master01 xray[16057]: Xray 1.8.6 (Xray, Penetrates Everything.) Custom (go1.21.4 linux/amd64)
3月 16 22:12:07 k8s-master01 xray[16057]: A unified platform for anti-censorship.
3月 16 22:12:07 k8s-master01 xray[16057]: 2024/03/16 22:12:07 [Info] infra/conf/serial: Reading config: /usr/local/xray/config.json
3月 16 22:12:12 k8s-master01 systemd[1]: Stopping Xray Service...
-- Subject: Unit xray.service has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit xray.service has begun shutting down.
3月 16 22:12:12 k8s-master01 systemd[1]: Stopped Xray Service.
-- Subject: Unit xray.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit xray.service has finished shutting down.
3月 16 22:12:12 k8s-master01 systemd[1]: Started Xray Service.
-- Subject: Unit xray.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit xray.service has finished starting up.
-- 
-- The start-up result is done.
3月 16 22:12:12 k8s-master01 xray[16207]: Xray 1.8.6 (Xray, Penetrates Everything.) Custom (go1.21.4 linux/amd64)
3月 16 22:12:12 k8s-master01 xray[16207]: A unified platform for anti-censorship.
3月 16 22:12:12 k8s-master01 xray[16207]: 2024/03/16 22:12:12 [Info] infra/conf/serial: Reading config: /usr/local/xray/config.json

也没看出什么问题,windows上测试几次都是正常的

为了保持统一,已经把windows上的config.json的内容复制粘贴到centos上了

现在开始接下来操作就是配日志(服务端和客户端都配置了)

  "log": {"access": "/var/log/xray/access.log","error": "/var/log/xray/error.log","loglevel": "debug"},

然后通过tail命令查看

服务端日志是这个

2024/03/16 14:10:09 [Info] [4164381125] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:11:01 [Info] [634757384] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:14:01 [Info] [1120841913] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:14:57 [Info] [1537117142] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:14:57 [Info] [549166064] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:15:05 [Info] [1278316473] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:15:15 [Info] [1619787935] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:16:07 [Info] [336587068] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:19:14 [Info] [3178032418] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:20:02 [Info] [1422900044] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:20:19 [Info] [2559318044] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:20:22 [Info] [1461925477] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist
2024/03/16 14:21:16 [Info] [850676330] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 183.222.204.175:0 > proxy/vmess/encoding: invalid user > user do not exist

 客户端日志是这个

3月 04 18:16:00 k8s-master01 xray[1346]: 2024/03/04 18:16:00 [Warning] [2403275693] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:16:02 k8s-master01 xray[1346]: 2024/03/04 18:16:02 127.0.0.1:46674 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:16:10 k8s-master01 xray[1346]: 2024/03/04 18:16:10 [Warning] [2594380722] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:16:12 k8s-master01 xray[1346]: 2024/03/04 18:16:12 127.0.0.1:46770 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:16:20 k8s-master01 xray[1346]: 2024/03/04 18:16:20 [Warning] [1302667946] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:16:22 k8s-master01 xray[1346]: 2024/03/04 18:16:22 127.0.0.1:46874 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:16:30 k8s-master01 xray[1346]: 2024/03/04 18:16:30 [Warning] [2697733957] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:16:32 k8s-master01 xray[1346]: 2024/03/04 18:16:32 127.0.0.1:46966 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:16:38 k8s-master01 xray[1346]: 2024/03/04 18:16:38 websocket: failed to close network connection: close tcp 192.168.10.10:43776->8.210.103.219:443: use of closed network connection
3月 04 18:16:40 k8s-master01 xray[1346]: 2024/03/04 18:16:40 websocket: failed to close network connection: close tcp 192.168.10.10:43786->8.210.103.219:443: use of closed network connection
3月 04 18:16:40 k8s-master01 xray[1346]: 2024/03/04 18:16:40 [Warning] [1423899102] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:16:42 k8s-master01 xray[1346]: 2024/03/04 18:16:42 127.0.0.1:47070 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:16:50 k8s-master01 xray[1346]: 2024/03/04 18:16:50 [Warning] [3280367621] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:16:50 k8s-master01 xray[1346]: 2024/03/04 18:16:50 websocket: failed to close network connection: close tcp 192.168.10.10:43890->8.210.103.219:443: use of closed network connection
3月 04 18:16:52 k8s-master01 xray[1346]: 2024/03/04 18:16:52 127.0.0.1:47164 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:16:58 k8s-master01 xray[1346]: 2024/03/04 18:16:58 websocket: failed to close network connection: close tcp 192.168.10.10:43974->8.210.103.219:443: use of closed network connection
3月 04 18:17:00 k8s-master01 xray[1346]: 2024/03/04 18:17:00 [Warning] [2142162998] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:17:10 k8s-master01 xray[1346]: 2024/03/04 18:17:10 [Warning] [1406668282] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:17:53 k8s-master01 xray[1346]: 2024/03/04 18:17:53 127.0.0.1:47750 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:18:03 k8s-master01 xray[1346]: 2024/03/04 18:18:03 127.0.0.1:47840 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:18:06 k8s-master01 xray[1346]: 2024/03/04 18:18:06 [Warning] [4145448540] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:18:13 k8s-master01 xray[1346]: 2024/03/04 18:18:13 127.0.0.1:47942 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:18:16 k8s-master01 xray[1346]: 2024/03/04 18:18:16 [Warning] [1365796855] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:18:23 k8s-master01 xray[1346]: 2024/03/04 18:18:23 127.0.0.1:48032 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:18:26 k8s-master01 xray[1346]: 2024/03/04 18:18:26 [Warning] [2392807403] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:18:33 k8s-master01 xray[1346]: 2024/03/04 18:18:33 127.0.0.1:48136 accepted //registry-1.docker.io:443 [http -> proxy]
3月 04 18:18:36 k8s-master01 xray[1346]: 2024/03/04 18:18:36 [Warning] [2814008583] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:18:46 k8s-master01 xray[1346]: 2024/03/04 18:18:46 [Warning] [2119998531] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/
3月 04 18:20:09 k8s-master01 xray[1346]: 2024/03/04 18:20:09 127.0.0.1:49040 accepted //registry-1.docker.io:443 [http -> proxy]

说实话,看了上面两个日志,我是摸不着头,因为userid和alterid都确认过都不知道多少次了,都感觉没问题

一度怀疑是xray的问题,于是换了一个客户端,采用v2ray的客服端

于是用v2ray进行本地服务配置,可还是出现同样的问题

后面网上说通过alter为0可以解决,然后还有其它乱七八着的解决方法,还是不行

终于,看到一条有用的信息,时间差

于是,更新centos的时间

 ntpdate time.windows.com

 再次查看

[root@k8s-master01 ~]# curl -x http://127.0.0.1:10809 https://www.google.com -v
* About to connect() to proxy 127.0.0.1 port 10809 (#0)
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 10809 (#0)
* Establish HTTP proxy tunnel to www.google.com:443
> CONNECT www.google.com:443 HTTP/1.1
> Host: www.google.com:443
> User-Agent: curl/7.29.0
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 Connection established
< 
* Proxy replied OK to CONNECT request
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crtCApath: none
* SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate:
*       subject: CN=www.google.com
*       start date: 2月 19 08:19:14 2024 GMT
*       expire date: 5月 13 08:19:13 2024 GMT
*       common name: www.google.com
*       issuer: CN=GTS CA 1C3,O=Google Trust Services LLC,C=US
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: www.google.com
> Accept: */*
> 
< HTTP/1.1 302 Found
< Location: https://www.google.com.hk/url?sa=p&hl=zh-CN&pref=hkredirect&pval=yes&q=https://www.google.com.hk/&ust=1710600070261911&usg=AOvVaw1xFQ6FZSUAQ0p_KF1PPren
< Cache-Control: private
< Content-Type: text/html; charset=UTF-8
< Content-Security-Policy-Report-Only: object-src 'none';base-uri 'self';script-src 'nonce-zeU1oF1mM8-Ul5Hpk8GhNw' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
< P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
< Date: Sat, 16 Mar 2024 14:40:40 GMT
< Server: gws
< Content-Length: 372
< X-XSS-Protection: 0
< X-Frame-Options: SAMEORIGIN
< Set-Cookie: 1P_JAR=2024-03-16-14; expires=Mon, 15-Apr-2024 14:40:40 GMT; path=/; domain=.google.com; Secure
< Set-Cookie: AEC=Ae3NU9PNmRL7EUmFbkfvziLkI-U_QJBZOxNBfkb0OXkO9kOOvAlHiX_gSQ; expires=Thu, 12-Sep-2024 14:40:40 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
< Set-Cookie: NID=512=A4a6jbVPAvqT8ipYJhTvbuS-FsX-hDEA90zLI0FhkT3oDJKoMsYaqQlRyllu2wH_Bw-_nTgAwCrvr4TogqxEOfh77CPlxc4A9jRMmHQBpWjqF7yFiByuBB6O6vgmQNDGALw5zZue0O8irX7h_2w4zRNUrOEZVA32rSLmYoJpl1s; expires=Sun, 15-Sep-2024 14:40:40 GMT; path=/; domain=.google.com; HttpOnly
< Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
< 
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.com.hk/url?sa=p&amp;hl=zh-CN&amp;pref=hkredirect&amp;pval=yes&amp;q=https://www.google.com.hk/&amp;ust=1710600070261911&amp;usg=AOvVaw1xFQ6FZSUAQ0p_KF1PPren">here</A>.
</BODY></HTML>
* Connection #0 to host 127.0.0.1 left intact

成功解决

问题排查方向

VMess: Invalid User 可能的原因:

    1、客户端和服务器端的用户 ID 不匹配;2、客户端和服务器端的用户 alterId 不匹配;3、客户端与服务器的时间不匹配,误差不能超过90秒钟;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/544055.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

桌面待办,电脑桌面待办事项便利贴怎么搞的

电脑桌面待办事项贴便利&#xff0c;是一款非常实用的小工具&#xff0c;可以帮助我们高效管理工作和生活中的各种任务。通过简单的操作&#xff0c;你可以在电脑桌面上添加待办事项&#xff0c;随时提醒自己完成任务&#xff0c;提高工作效率。那么&#xff0c;桌面待办&#…

LLM之RAG实战(三十)| 探索RAG语义分块策略

在LLM之RAG实战&#xff08;二十九&#xff09;| 探索RAG PDF解析解析文档后&#xff0c;我们可以获得结构化或半结构化的数据。现在的主要任务是将它们分解成更小的块来提取详细的特征&#xff0c;然后嵌入这些特征来表示它们的语义&#xff0c;其在RAG中的位置如图1所示&…

创业新手看过来!四招助你开启成功之旅

如果你每个月的薪资仅有几千块&#xff0c;还背负着债务的重担&#xff0c;家中的老少都期盼着你为他们撑起一片天&#xff0c;那么&#xff0c;你每日都可能为了如何打破这一困境而焦虑不安。不过&#xff0c;请稍安勿躁&#xff0c;今天我将为你提供四个建议&#xff0c;或许…

pta上的几个例题

c语言中的小小白-CSDN博客c语言中的小小白关注算法,c,c语言,贪心算法,链表,mysql,动态规划,后端,线性回归,数据结构,排序算法领域.https://blog.csdn.net/bhbcdxb123?spm1001.2014.3001.5343 给大家分享一句我很喜欢我话&#xff1a; 知不足而奋进&#xff0c;望远山而前行&am…

如何批量获取公众号所有文章的阅读数点赞数和留言数导出excel?

如何批量获取公众号所有文章的阅读数点赞数和留言数导出excel&#xff1f;我写了个脚本批量抓取&#xff0c;导出的excel文章数据包含文章日期&#xff0c;文章标题&#xff0c;文章链接&#xff0c;文章简介&#xff0c;文章作者&#xff0c;文章封面图&#xff0c;是否原创&a…

使用tui-image-editor 图片编辑 标注图片

需求背景&#xff1a; 鼠标悬浮在图片上 出现编辑按钮 点击编辑 对该图片进行编辑&#xff08;输入文案、涂鸦、标记、裁剪等&#xff09; 可以体验一下它线上编辑器 Image-editor | TOAST UI :: Make Your Web Delicious! 使用 首先在你的前端项目中安装&#xff1a; np…

Android Studio实现内容丰富的安卓宠物用品商店管理系统

获取源码请点击文章末尾QQ名片联系&#xff0c;源码不免费&#xff0c;尊重创作&#xff0c;尊重劳动。 项目编号128 1.开发环境android stuido jdk1.8 eclipse mysql tomcat 2.功能介绍 安卓端&#xff1a; 1.注册登录 2.系统公告 3.宠物社区&#xff08;可发布宠物帖子&#…

【嵌入式实践】【芝麻】【硬件篇-4】从0到1给电动车添加指纹锁:IO电路简单介绍

0. 前言 该项目是基于stm32F103和指纹模块做了一个通过指纹锁控制电动车的小工具。支持添加指纹、删除指纹&#xff0c;电动车进入P档等待时计时&#xff0c;计时超过5min则自动锁车&#xff0c;计时过程中按刹车可中断P档状态&#xff0c;同时中断锁车计时。改项目我称之为“芝…

创维汽车与创维光伏储能亮相2024上海AWE,感受制造业的升级变迁

2024年3月14日&#xff0c;中国家电及电子消费博览会在上海正式召开。相比往届展会&#xff0c;2024上海AWE进驻更多行业头部力量&#xff0c;出展更多尖端科技&#xff0c;蕴含更深行业思考。创维光伏储能及乘载更先进智驾科技的创维汽车亮相此次展会。 消费电子的革新不断影响…

C#对ListBox控件中的数据进行的操作

目录 1.添加数据&#xff1a; 2.删除数据&#xff1a; 3.清空数据&#xff1a; 4.选择项&#xff1a; 5.排序&#xff1a; 6.获取选中的项&#xff1a; 7.获取ListBox中的所有项&#xff1a; 8.综合示例 C#中对ListBox控件中的数据进行的操作主要包括添加、删除、清空、…

五连杆机构运动学仿真 | Matlab源码 | 机械连杆 | 五杆机构

【程序简介】&#x1f4bb;&#x1f50d; 本程序通过matlab实现了五连杆机构的运动学仿真编程&#xff0c;动态展现了五连杆机构的运动动画。 你将获得&#xff1a;五连杆机构Matlab仿真源码 获取地址&#xff1a;五连杆机构运动学仿真 | Matlab源码 |机械连杆 程序仿真的五…

【JavaScript】JQuery介绍和选择器

JQuery介绍 jQuery概念 jQuery 是一个快速、小型且功能丰富的 JavaScript 库。它通过可在多种浏览器上运行的易于使用的 API&#xff0c;使 HTML 文档遍历和操作、事件处理、动画和 Ajax 等事情变得更加简单。凭借多功能性和可扩展性的结合&#xff0c;jQuery 改变了数百万人…