[GH-ISSUE #3749] Constant restart xray on new connection by client #2524

Closed
opened 2026-10-31 20:26:07 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Efcolipt on GitHub (Feb 4, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3749

Describe the bug

I setup 3x-ui and create vless-reality-vision
When i am trying connect to server via Hiddify-next i am catching error with Xray ERROR - Failure in running xray-core: exit status 2

I also deleted some routings, just put freedom and bittorent block, off all logs watchers, change dns, remove dns totally, change settings for vision, like add encryption/decryption certs and so on

But always catch ERROR - Failure in running xray-core: exit status 2

So this is error restart whole server when are u using only 1 it almost unnoticeable, but i have many clients and constant reboots will almost completely shut down the server

For detect that error make you i installed only xray and same config on another server and i didn't catch any errors or restarts by xray

{
  "api": {
    "services": [
      "HandlerService",
      "LoggerService",
      "StatsService"
    ],
    "tag": "api"
  },
  "burstObservatory": null,
  "dns": {
    "servers": [
      {
        "address": "https://1.1.1.1/dns-query",
        "domains": [
          "geosite:geolocation-!cn"
        ]
      },
      "1.1.1.1",
      "8.8.8.8"
    ]
  },
  "fakedns": null,
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 47623,
      "protocol": "tunnel",
      "settings": {
        "address": "127.0.0.1"
      },
      "sniffing": null,
      "streamSettings": null,
      "tag": "api"
    },
    {
      "listen": "vps ip",
      "port": 443,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "email": "email",
            "flow": "xtls-rprx-vision",
            "id": "uuid"
          }
        ],
        "decryption": "none",
        "encryption": "none",
        "testseed": [
          759,
          440,
          266,
          447
        ]
      },
      "sniffing": {
        "destOverride": [
          "http",
          "tls",
          "quic"
        ],
        "enabled": false,
        "metadataOnly": false,
        "routeOnly": false
      },
      "streamSettings": {
        "network": "tcp",
        "realitySettings": {
          "maxClientVer": "",
          "maxTimediff": 0,
          "minClientVer": "",
          "mldsa65Seed": "",
          "privateKey": "private",
          "serverNames": [
            "yahoo.com"
          ],
          "shortIds": [
            "2fd32064a9",
          ],
          "show": false,
          "target": "yahoo.com:443",
          "xver": 0
        },
        "security": "reality",
        "tcpSettings": {
          "acceptProxyProtocol": false,
          "header": {
            "type": "none"
          }
        }
      },
      "tag": "inbound-my-ip"
    }
  ],
  "log": {
    "dnsLog": true,
    "error": "",
    "loglevel": "debug",
    "maskAddress": ""
  },
  "metrics": {
    "listen": "127.0.0.1:11111",
    "tag": "metrics_out"
  },
  "observatory": null,
  "outbounds": [
    {
      "protocol": "freedom",
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    },
    {
      "protocol": "wireguard",
      "settings": {
        "address": [
          "172.16.0.2/32",
          "2606:4700:110:865d:7aff:f773:934a:c083/128"
        ],
        "domainStrategy": "ForceIP",
        "mtu": 1280,
        "peers": [
          {
            "allowedIPs": [
              "0.0.0.0/0",
              "::/0"
            ],
            "endpoint": "engage.cloudflareclient.com:2408",
            "publicKey": "pub"
          }
        ],
        "reserved": "res",
        "secretKey": "secret",
        "workers": 2
      },
      "tag": "warp"
    }
  ],
  "policy": {
    "levels": {
      "0": {
        "statsUserDownlink": false,
        "statsUserUplink": false
      }
    },
    "system": {
      "statsInboundDownlink": false,
      "statsInboundUplink": false,
      "statsOutboundDownlink": false,
      "statsOutboundUplink": false
    }
  },
  "reverse": null,
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api",
        "type": "field"
      },
      {
        "outboundTag": "blocked",
        "protocol": [
          "bittorrent"
        ],
        "type": "field"
      }
    ]
  },
  "stats": {},
  "transport": null
}

How to repeat the problem?

  1. Take my config and put in 3x-ui
  2. Open logs in server
  3. Connect client
  4. Search something

Expected action

No response

Received action

No response

3x-ui Version

2.8.8 - 2.8.9

Xray-core Version

26.1.31 - 26.2.4

Checklist

  • This bug report is written entirely in English.
  • This bug report is new and no one has reported it before me.
Originally created by @Efcolipt on GitHub (Feb 4, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3749 ### Describe the bug I setup 3x-ui and create vless-reality-vision When i am trying connect to server via Hiddify-next i am catching error with Xray ERROR - Failure in running xray-core: exit status 2 I also deleted some routings, just put freedom and bittorent block, off all logs watchers, change dns, remove dns totally, change settings for vision, like add encryption/decryption certs and so on But always catch ERROR - Failure in running xray-core: exit status 2 So this is error restart whole server when are u using only 1 it almost unnoticeable, but i have many clients and constant reboots will almost completely shut down the server For detect that error make you i installed only xray and same config on another server and i didn't catch any errors or restarts by xray ``` { "api": { "services": [ "HandlerService", "LoggerService", "StatsService" ], "tag": "api" }, "burstObservatory": null, "dns": { "servers": [ { "address": "https://1.1.1.1/dns-query", "domains": [ "geosite:geolocation-!cn" ] }, "1.1.1.1", "8.8.8.8" ] }, "fakedns": null, "inbounds": [ { "listen": "127.0.0.1", "port": 47623, "protocol": "tunnel", "settings": { "address": "127.0.0.1" }, "sniffing": null, "streamSettings": null, "tag": "api" }, { "listen": "vps ip", "port": 443, "protocol": "vless", "settings": { "clients": [ { "email": "email", "flow": "xtls-rprx-vision", "id": "uuid" } ], "decryption": "none", "encryption": "none", "testseed": [ 759, 440, 266, 447 ] }, "sniffing": { "destOverride": [ "http", "tls", "quic" ], "enabled": false, "metadataOnly": false, "routeOnly": false }, "streamSettings": { "network": "tcp", "realitySettings": { "maxClientVer": "", "maxTimediff": 0, "minClientVer": "", "mldsa65Seed": "", "privateKey": "private", "serverNames": [ "yahoo.com" ], "shortIds": [ "2fd32064a9", ], "show": false, "target": "yahoo.com:443", "xver": 0 }, "security": "reality", "tcpSettings": { "acceptProxyProtocol": false, "header": { "type": "none" } } }, "tag": "inbound-my-ip" } ], "log": { "dnsLog": true, "error": "", "loglevel": "debug", "maskAddress": "" }, "metrics": { "listen": "127.0.0.1:11111", "tag": "metrics_out" }, "observatory": null, "outbounds": [ { "protocol": "freedom", "tag": "direct" }, { "protocol": "blackhole", "settings": {}, "tag": "blocked" }, { "protocol": "wireguard", "settings": { "address": [ "172.16.0.2/32", "2606:4700:110:865d:7aff:f773:934a:c083/128" ], "domainStrategy": "ForceIP", "mtu": 1280, "peers": [ { "allowedIPs": [ "0.0.0.0/0", "::/0" ], "endpoint": "engage.cloudflareclient.com:2408", "publicKey": "pub" } ], "reserved": "res", "secretKey": "secret", "workers": 2 }, "tag": "warp" } ], "policy": { "levels": { "0": { "statsUserDownlink": false, "statsUserUplink": false } }, "system": { "statsInboundDownlink": false, "statsInboundUplink": false, "statsOutboundDownlink": false, "statsOutboundUplink": false } }, "reverse": null, "routing": { "domainStrategy": "IPIfNonMatch", "rules": [ { "inboundTag": [ "api" ], "outboundTag": "api", "type": "field" }, { "outboundTag": "blocked", "protocol": [ "bittorrent" ], "type": "field" } ] }, "stats": {}, "transport": null } ``` ### How to repeat the problem? 1) Take my config and put in 3x-ui 2) Open logs in server 3) Connect client 4) Search something ### Expected action _No response_ ### Received action _No response_ ### 3x-ui Version 2.8.8 - 2.8.9 ### Xray-core Version 26.1.31 - 26.2.4 ### Checklist - [x] This bug report is written entirely in English. - [x] This bug report is new and no one has reported it before me.
bsakaguchi 2026-10-31 20:26:07 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Akseonov commented on GitHub (Feb 16, 2026):

2026/02/16 03:48:34 WARNING - XRAY: core: Xray 26.2.4 started
2026/02/16 03:48:34 INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json}
2026/02/16 03:48:34 DEBUG - XRAY: A unified platform for anti-censorship.
2026/02/16 03:48:34 DEBUG - XRAY: Xray 26.2.4 (Xray, Penetrates Everything.) 8c3f246 (go1.25.6 linux/amd64)
2026/02/16 03:48:34 DEBUG - X-UI: restart Xray, force:false
2026/02/16 03:48:32 ERROR - X-UI: Failure in running xray-core:exit status 2
2026/02/16 03:48:32 DEBUG - XRAY: :27 +0xdb
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/task/task.go
2026/02/16 03:48:32 DEBUG - XRAY: created by github.com/xtls/xray-core/common/task.Run in goroutine 258
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/task/task.go:28 +0x28
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/task.Run.func1(0xc0004635c0?)
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/task/task.go:12 +0x22
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/freedom.(*Handler).Process.OnSuccess.func9()
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/freedom/freedom.go:221 +0x266
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/freedom.(*Handler).Process.func4()
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/proxy.go:768 +0x9c2
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy.CopyRawConnIfExist({0x1a7c268, 0xc0001a94f0}, {0x1a84a00?, 0xc000054730?}, {0x1a848f8, 0xc000592060}, {0x1a68480, 0xc000077100}, 0xc000468480, 0x0)
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/app/dispatcher/stats.go:16 +0x68
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/app/dispatcher.(*SizeStatWriter).WriteMultiBuffer(0xc000077100, {0xc0000547a8, 0x1, 0x1})
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/proxy.go:390 +0x5dd
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy.(*VisionWriter).WriteMultiBuffer(0xc0002666c0, {0xc0000547a8, 0x1, 0x1})
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/proxy.go:519 +0x79e
2026/02/16 03:48:32 DEBUG - XRAY: ?, {0x1a7c2a0, 0xc0005921b0}, {0xc0002b2200?, 0x4?, 0xc00052c501?})
2026/02/16 03:48:32 DEBUG - XRAY: 0x90
2026/02/16 03:48:32 DEBUG - XRAY: ,
2026/02/16 03:48:32 DEBUG - XRAY: 0xc000266708
2026/02/16 03:48:32 DEBUG - XRAY: ,
2026/02/16 03:48:32 DEBUG - XRAY: 0x0
2026/02/16 03:48:32 DEBUG - XRAY: ,
2026/02/16 03:48:32 DEBUG - XRAY: 0xc000593440
2026/02/16 03:48:32 DEBUG - XRAY: (
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy.XtlsPadding
2026/02/16 03:48:32 DEBUG - XRAY: 153
2026/02/16 03:48:32 DEBUG - XRAY: :
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/buf/buffer.go
2026/02/16 03:48:32 DEBUG - XRAY: )
2026/02/16 03:48:32 DEBUG - XRAY: ...
2026/02/16 03:48:32 DEBUG - XRAY: (
2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/buf.(*Buffer).Extend
2026/02/16 03:48:32 DEBUG - XRAY: ]:
2026/02/16 03:48:32 DEBUG - XRAY: running
2026/02/16 03:48:32 DEBUG - XRAY: [
2026/02/16 03:48:32 DEBUG - XRAY: 279
2026/02/16 03:48:32 DEBUG - XRAY: goroutine
2026/02/16 03:48:32 DEBUG - XRAY: runtime error: slice bounds out of range [405:399]
2026/02/16 03:48:32 DEBUG - X-UI: Core crash detected: panic:

<!-- gh-comment-id:3906240834 --> @Akseonov commented on GitHub (Feb 16, 2026): 2026/02/16 03:48:34 WARNING - XRAY: core: Xray 26.2.4 started 2026/02/16 03:48:34 INFO - XRAY: infra/conf/serial: Reading config: &{Name:bin/config.json Format:json} 2026/02/16 03:48:34 DEBUG - XRAY: A unified platform for anti-censorship. 2026/02/16 03:48:34 DEBUG - XRAY: Xray 26.2.4 (Xray, Penetrates Everything.) 8c3f246 (go1.25.6 linux/amd64) 2026/02/16 03:48:34 DEBUG - X-UI: restart Xray, force:false 2026/02/16 03:48:32 ERROR - X-UI: Failure in running xray-core:exit status 2 2026/02/16 03:48:32 DEBUG - XRAY: :27 +0xdb 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/task/task.go 2026/02/16 03:48:32 DEBUG - XRAY: created by github.com/xtls/xray-core/common/task.Run in goroutine 258 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/task/task.go:28 +0x28 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/task.Run.func1(0xc0004635c0?) 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/task/task.go:12 +0x22 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/freedom.(*Handler).Process.OnSuccess.func9() 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/freedom/freedom.go:221 +0x266 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/freedom.(*Handler).Process.func4() 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/proxy.go:768 +0x9c2 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy.CopyRawConnIfExist({0x1a7c268, 0xc0001a94f0}, {0x1a84a00?, 0xc000054730?}, {0x1a848f8, 0xc000592060}, {0x1a68480, 0xc000077100}, 0xc000468480, 0x0) 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/app/dispatcher/stats.go:16 +0x68 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/app/dispatcher.(*SizeStatWriter).WriteMultiBuffer(0xc000077100, {0xc0000547a8, 0x1, 0x1}) 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/proxy.go:390 +0x5dd 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy.(*VisionWriter).WriteMultiBuffer(0xc0002666c0, {0xc0000547a8, 0x1, 0x1}) 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy/proxy.go:519 +0x79e 2026/02/16 03:48:32 DEBUG - XRAY: ?, {0x1a7c2a0, 0xc0005921b0}, {0xc0002b2200?, 0x4?, 0xc00052c501?}) 2026/02/16 03:48:32 DEBUG - XRAY: 0x90 2026/02/16 03:48:32 DEBUG - XRAY: , 2026/02/16 03:48:32 DEBUG - XRAY: 0xc000266708 2026/02/16 03:48:32 DEBUG - XRAY: , 2026/02/16 03:48:32 DEBUG - XRAY: 0x0 2026/02/16 03:48:32 DEBUG - XRAY: , 2026/02/16 03:48:32 DEBUG - XRAY: 0xc000593440 2026/02/16 03:48:32 DEBUG - XRAY: ( 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/proxy.XtlsPadding 2026/02/16 03:48:32 DEBUG - XRAY: 153 2026/02/16 03:48:32 DEBUG - XRAY: : 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/buf/buffer.go 2026/02/16 03:48:32 DEBUG - XRAY: ) 2026/02/16 03:48:32 DEBUG - XRAY: ... 2026/02/16 03:48:32 DEBUG - XRAY: ( 2026/02/16 03:48:32 DEBUG - XRAY: github.com/xtls/xray-core/common/buf.(*Buffer).Extend 2026/02/16 03:48:32 DEBUG - XRAY: ]: 2026/02/16 03:48:32 DEBUG - XRAY: running 2026/02/16 03:48:32 DEBUG - XRAY: [ 2026/02/16 03:48:32 DEBUG - XRAY: 279 2026/02/16 03:48:32 DEBUG - XRAY: goroutine 2026/02/16 03:48:32 DEBUG - XRAY: runtime error: slice bounds out of range [405:399] 2026/02/16 03:48:32 DEBUG - X-UI: Core crash detected: panic:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#2524
No description provided.