换了一台服务器全新安装了服务端,配置文件粘贴复制过来,可以正常启动。
=========================
(1)你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
V2Ray v3.6
(2)你的使用场景是什么?
无,v2ray无法启动。
(3)你看到的不正常的现象是什么?
centos 7 x64 系统使用脚本安装正常运行,今天手欠运行脚本升级,升级成功,v2ray启动失败。
启动失败:
Active: failed (Result: start-limit) since Wed 2018-01-17 09:49:43 CST; 3s ago
Process: 746 ExecStart=/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json (code=exited, status=255)
具体如下:
service v2ray status
Redirecting to /bin/systemctl status v2ray.service
Jan 17 09:49:43 systemd[1]: Unit v2ray.service entered failed state.
Jan 17 09:49:43 systemd[1]: v2ray.service failed.
Jan 17 09:49:43 systemd[1]: v2ray.service holdoff time over, scheduling restart.
Jan 17 09:49:43 systemd[1]: start request repeated too quickly for v2ray.service
Jan 17 09:49:43 systemd[1]: Failed to start V2Ray Service.
Jan 17 09:49:43 systemd[1]: Unit v2ray.service entered failed state.
Jan 17 09:49:43 systemd[1]: v2ray.service failed.
(4)你期待看到的正确表现是怎样的?
能无错运行。
(5)请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。
服务器配置:
{
"log": {
"access": "",
"error": "",
"loglevel": ""
},
"inbound": {
"port": xxx,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "xxx",
"alterId": xx,
"level": 1
"security": "aes-128-gcm"
}
]
},
"streamSettings": {
"network": "kcp",
"security": "",
"tcpSettings": null,
"kcpSettings": {
"mtu": 1350,
"tti": 50,
"uplinkCapacity": 100,
"downlinkCapacity": 100,
"congestion": false,
"readBufferSize": 2,
"writeBufferSize": 2,
"header": {
"type": "none",
"request": null,
"response": null
}
},
"wsSettings": null
}
},
"outbound": {
"tag": null,
"protocol": "freedom",
"settings": null,
"streamSettings": null,
"mux": null
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": xx,
"settings": {
"method": "xx",
"password": "xx",
"udp": true
}
}
],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": null,
"tag": "blocked"
}
],
"dns": null,
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": null,
"rules": [
{
"type": "field",
"port": null,
"outboundTag": "blocked",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"domain": null
}
]
}
}
}
客户端错误日志:
无
使用jq命令检查下config.json格式有没问题!
用 journalctl -u v2ray 看一下出了什么错
@DarienRaymond 我也有同样的问题。
journalctl中看到的日志如下:
Jan 18 09:44:50 nashor systemd[1]: Starting V2Ray Service...
Jan 18 09:44:50 nashor v2ray[24846]: V2Ray v3.6 (die Commanderin) 20180112
Jan 18 09:44:50 nashor v2ray[24846]: An unified platform for anti-censorship.
Jan 18 09:44:50 nashor v2ray[24846]: Main: failed to create server > Core: InboundHandlerManager not set.
Jan 18 09:44:50 nashor systemd[1]: v2ray.service: main process exited, code=exited, status=255/n/a
Jan 18 09:44:50 nashor systemd[1]: Unit v2ray.service entered failed state.
Jan 18 09:44:50 nashor systemd[1]: v2ray.service failed.
Jan 18 09:44:51 nashor systemd[1]: v2ray.service holdoff time over, scheduling restart.
@SgtDaJim 请再开一个issue并附上你的配置文件
我也遇到了 同样的问题 也是升级到 3.6
更新:
问题找到了 我把 /var/log/v2ray/ 这个目录删除了 导致日志文件无法创建了 所以报错了
遇到同样的问题了,请问如何解决?
如果你使用的是go.sh这个脚本进行升级的话需要手动拷贝v2ctl至/usr/bin/v2ray目录,v2ray和v2ctl两个文件版本需要同步
我更新后也出现了,你仔细看这条: ExecStart=/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json (code=exited, status=255)
试试这条命令ls /usr/bin/v2ray
如果没有这个文件夹或者是里面没有v2ray的话就是这个问题了,我当时想用pacman安装v2ray,安装完发现服务失败,但执行v2ray -config /etc/v2ray/config.json是没有问题的,后面实际上是pacman里v2ray路径和之前直接脚本安装的不太一样了。
把/usr/lib/systemd/system/v2ray.service里的/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json改成/usr/bin/v2ray -config /etc/v2ray/config.json就没事了。
检查一下配置,v2的端口以及55的端口是否和其他服务的端口冲突
遇到同样的问题了,请问如何解决?
我的话,直接新建目录就解决了
mkdir /var/log/v2ray/
检查一下配置,v2的端口以及55的端口是否和其他服务的端口冲突
配置代理转发的时候遇到了,因为是直接复制的开始的inbound,so 忘了改端口.改了就OK.如果是WS+TLS+NGINX ,记得去nginx配置文件复制一下原来的 location配置 同时 修改端口 。
我更新后也出现了,你仔细看这条: ExecStart=/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json (code=exited, status=255)
试试这条命令ls /usr/bin/v2ray
如果没有这个文件夹或者是里面没有v2ray的话就是这个问题了,我当时想用pacman安装v2ray,安装完发现服务失败,但执行v2ray -config /etc/v2ray/config.json是没有问题的,后面实际上是pacman里v2ray路径和之前直接脚本安装的不太一样了。
把/usr/lib/systemd/system/v2ray.service里的/usr/bin/v2ray/v2ray -config /etc/v2ray/config.json改成/usr/bin/v2ray -config /etc/v2ray/config.json就没事了。
这个刚好解决我的问题了,点个赞,回顾下历史,我的确手贱过bin下的v2ray 删除了,导致service中的执行路径找不到东西,一直无法启动
Most helpful comment
检查一下配置,v2的端口以及55的端口是否和其他服务的端口冲突