XTLS / Xray-core

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
https://t.me/projectXray
Mozilla Public License 2.0
25.16k stars 3.9k forks source link

xray 1.1.1 linux服务端systemd服务启动失败 #33

Closed feileb closed 3 years ago

feileb commented 3 years ago

升级之前使用的是1.0.0版本运行正常,配置模型为nginx + ws 反代 升级到1.1.1,准备试试xtls,于是修改服务端配置,参考这个写的: https://github.com/v2fly/v2ray-examples/blob/master/VLESS-TCP-TLS-WS%20(recommended)/config_server.json 启动失败后,定位如下: 1,怀疑是配置问题,但是通过命令行启动没问题,通过 xray run -test 配置,也无问题 2,精简配置到最简单仍不行 3,修改systemd配置文件,使用root用户或者nobody用户启动均失败 4,最后xray换回1.0.0正常。 查看journalctl 日志如下:

Dec 04 15:13:39 serverx xray[24215]: Xray 1.1.1 (Xray, Penetrates Everything.) Custom (go1.15.6 linux/amd64)
Dec 04 15:13:39 serverx xray[24215]: A unified platform for anti-censorship.
Dec 04 15:13:39 serverx xray[24215]: Filed to start: %!s(PANIC=Error method: runtime error: slice bounds out of range [26:4])
Dec 04 15:13:39 serverx systemd[1]: xray.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 15:13:39 serverx systemd[1]: xray.service: Failed with result 'exit-code'.
Dec 04 15:13:40 serverx systemd[1]: xray.service: Service RestartSec=100ms expired, scheduling restart.
Dec 04 15:13:40 serverx systemd[1]: xray.service: Scheduled restart job, restart counter is at 5.
Dec 04 15:13:40 serverx systemd[1]: Stopped Xray Service.
RPRX commented 3 years ago

看起来有点玄学,等待更多报告

feileb commented 3 years ago

今天太忙了,有时间我再更新试试 ps:Filed to start这里应该是Failed to start吧

feileb commented 3 years ago

另外,我的系统是debian 10 安装脚本: bash <(curl -L https://raw.githubusercontent.com/XTLS/Xray-install/main/install-release.sh)

nJhEqnvK commented 3 years ago

使用teddysun的docker镜像出现同样问题

Xray 1.1.1 (Xray, Penetrates Everything.) Custom (go1.15.6 linux/amd64)
A unified platform for anti-censorship.
2020/12/04 17:23:36 [Info] main/jsonem: Reading config: /etc/xray/config.json
Filed to start: %!s(PANIC=Error method: runtime error: slice bounds out of range [26:4])

触发条件是升级1.1.1后把原配置的xtls-rprx-direct改为xtls-rprx-splice,改回去后能够正常使用

系统环境为: VPS:Linux *** 5.4.0-53-generic #59-Ubuntu SMP Wed Oct 21 09:38:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Client1: Linux vyos 4.19.139-amd64-vyos #1 SMP Sat Aug 15 09:30:29 UTC 2020 x86_64 GNU/Linux Client2: Linux vyos 5.8.5-amd64-vyos #1 SMP Sun Sep 6 15:53:44 UTC 2020 x86_64 GNU/Linux

Docker ver: Docker version 19.03.13, build 4484c46d9d

RPRX commented 3 years ago

@nJhEqnvK

服务端需保持 direct,具体用法及限制请等待 release note 完成

nJhEqnvK commented 3 years ago

@nJhEqnvK

服务端需保持 direct,具体用法及限制请等待 release note 完成

好的,如果需要测试也可以叫上我

nJhEqnvK commented 3 years ago

切换后已稳定使用半小时,应该是这个问题造成的

RPRX commented 3 years ago

@feileb

问题仍然存在吗

RPRX commented 3 years ago

https://github.com/XTLS/Xray-core/releases/tag/v1.1.2

试试最新版本,若问题仍然存在,请开新的 issue。

feileb commented 3 years ago

升级到1.1.2后确认没问题了,不过换回1.1.1的xray也没问题,感觉很奇怪。 配置文件里没有配置splice,用的是"flow": "xtls-rprx-direct",