mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6796] [Bug]: Fix Xray startup failure caused by ProtectKernelTunables=yes and read-only rp_filter after panel updates / گزارش باگ: اجرا نشدن Xray به دلیل فقطخواندنی شدن rp_filter پس از آپدیت پنل #4526
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4526
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @montiego on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6796
Describe the bug
Bug Report: Xray Fails to Start Due to Read-Only
rp_filterAfter Panel UpdatesDescription
After updating the 3X-UI panel, Xray fails to start and reports the following error in the logs:
Root Cause
The issue appears to be related to the
ProtectKernelTunables=yessetting in thex-ui.servicesystemd unit. This setting can make/proc/sysread-only for the service, preventing Xray from modifying the IPv4rp_filterkernel parameter during startup.Workaround
Currently, I manually edit
/etc/systemd/system/x-ui.serviceand change:to:
After reloading the systemd configuration and restarting the service, Xray starts successfully.
However, after each panel update, the problem returns and I have to repeat this modification.
Expected Behavior
Xray should start successfully after a panel update without requiring manual changes to the systemd service configuration. Panel updates should also preserve any required service configuration changes, or the default service configuration should allow Xray to modify
rp_filterwhen necessary.Actual Behavior
Xray fails to start because it cannot access
/proc/sys/net/ipv4/conf/all/rp_filterfor writing. The issue reappears after panel updates.Environment
x-ui.serviceRequest
Could you please investigate the systemd service configuration and the handling of the
ProtectKernelTunablessetting during panel updates, and provide a permanent fix?Thank you for your work on this project.
گزارش باگ: اجرا نشدن Xray به دلیل فقطخواندنی شدن
rp_filterپس از آپدیت پنلشرح مشکل
پس از هر بار آپدیت پنل 3X-UI، سرویس Xray اجرا نمیشود و خطای زیر در لاگها نمایش داده میشود:
علت احتمالی
به نظر میرسد این مشکل به تنظیم
ProtectKernelTunables=yesدر فایل سرویس systemd مربوط باشد. این گزینه میتواند دسترسی نوشتن سرویس به/proc/sysرا محدود کند و مانع تغییر پارامتر کرنلrp_filterتوسط Xray هنگام راهاندازی شود.راهحل موقت
در حال حاضر، فایل زیر را بهصورت دستی ویرایش میکنم:
/etc/systemd/system/x-ui.serviceو مقدار زیر را:
به مقدار زیر تغییر میدهم:
سپس تنظیمات systemd را بارگذاری مجدد کرده و سرویس را راهاندازی مجدد میکنم. پس از این تغییر، Xray با موفقیت اجرا میشود.
بااینحال، پس از هر آپدیت پنل، مشکل دوباره ظاهر میشود و مجبورم این تغییر را تکرار کنم.
رفتار مورد انتظار
پس از آپدیت پنل، Xray باید بدون نیاز به تغییر دستی فایل سرویس systemd اجرا شود. همچنین، تنظیمات ضروری سرویس نباید در جریان آپدیت از بین بروند؛ یا پیکربندی پیشفرض سرویس باید اجازه تغییر
rp_filterتوسط Xray را فراهم کند.رفتار فعلی
Xray به دلیل نداشتن دسترسی نوشتن به مسیر
/proc/sys/net/ipv4/conf/all/rp_filterاجرا نمیشود و این مشکل بعد از آپدیتهای پنل تکرار میشود.مشخصات محیط
x-ui.serviceدرخواست
لطفاً پیکربندی systemd سرویس و نحوه مدیریت گزینه
ProtectKernelTunablesهنگام آپدیت پنل را بررسی کنید و یک راهحل دائمی برای این مشکل ارائه دهید.با تشکر از توسعهدهندگان این پروژه.
How to reproduce the problem
Bug Report: Xray Fails to Start Due to Read-Only
rp_filterAfter Panel UpdatesDescription
After updating the 3X-UI panel, Xray fails to start and reports the following error in the logs:
Root Cause
The issue appears to be related to the
ProtectKernelTunables=yessetting in thex-ui.servicesystemd unit. This setting can make/proc/sysread-only for the service, preventing Xray from modifying the IPv4rp_filterkernel parameter during startup.Workaround
Currently, I manually edit
/etc/systemd/system/x-ui.serviceand change:to:
After reloading the systemd configuration and restarting the service, Xray starts successfully.
However, after each panel update, the problem returns and I have to repeat this modification.
Expected Behavior
Xray should start successfully after a panel update without requiring manual changes to the systemd service configuration. Panel updates should also preserve any required service configuration changes, or the default service configuration should allow Xray to modify
rp_filterwhen necessary.Actual Behavior
Xray fails to start because it cannot access
/proc/sys/net/ipv4/conf/all/rp_filterfor writing. The issue reappears after panel updates.Environment
x-ui.serviceRequest
Could you please investigate the systemd service configuration and the handling of the
ProtectKernelTunablessetting during panel updates, and provide a permanent fix?Thank you for your work on this project.
گزارش باگ: اجرا نشدن Xray به دلیل فقطخواندنی شدن
rp_filterپس از آپدیت پنلشرح مشکل
پس از هر بار آپدیت پنل 3X-UI، سرویس Xray اجرا نمیشود و خطای زیر در لاگها نمایش داده میشود:
علت احتمالی
به نظر میرسد این مشکل به تنظیم
ProtectKernelTunables=yesدر فایل سرویس systemd مربوط باشد. این گزینه میتواند دسترسی نوشتن سرویس به/proc/sysرا محدود کند و مانع تغییر پارامتر کرنلrp_filterتوسط Xray هنگام راهاندازی شود.راهحل موقت
در حال حاضر، فایل زیر را بهصورت دستی ویرایش میکنم:
/etc/systemd/system/x-ui.serviceو مقدار زیر را:
به مقدار زیر تغییر میدهم:
سپس تنظیمات systemd را بارگذاری مجدد کرده و سرویس را راهاندازی مجدد میکنم. پس از این تغییر، Xray با موفقیت اجرا میشود.
بااینحال، پس از هر آپدیت پنل، مشکل دوباره ظاهر میشود و مجبورم این تغییر را تکرار کنم.
رفتار مورد انتظار
پس از آپدیت پنل، Xray باید بدون نیاز به تغییر دستی فایل سرویس systemd اجرا شود. همچنین، تنظیمات ضروری سرویس نباید در جریان آپدیت از بین بروند؛ یا پیکربندی پیشفرض سرویس باید اجازه تغییر
rp_filterتوسط Xray را فراهم کند.رفتار فعلی
Xray به دلیل نداشتن دسترسی نوشتن به مسیر
/proc/sys/net/ipv4/conf/all/rp_filterاجرا نمیشود و این مشکل بعد از آپدیتهای پنل تکرار میشود.مشخصات محیط
x-ui.serviceدرخواست
لطفاً پیکربندی systemd سرویس و نحوه مدیریت گزینه
ProtectKernelTunablesهنگام آپدیت پنل را بررسی کنید و یک راهحل دائمی برای این مشکل ارائه دهید.با تشکر از توسعهدهندگان این پروژه.
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
dev
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
ubuntu 26
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting