Xray_onekey
Xray_onekey copied to clipboard
[BUG] 全新机器安装后无法启动NGINX,提示端口绑定失败
感谢你向 Xray_onekey 提交 issue!
在提交之前,请确认:
- [ ] 如果你可以自己 debug 并解决的话,提交 PR 吧!
- [x] 我已经在 issues 中找过我要提出的问题;
- [x] 我已经使用最新版本的脚本测试过,问题依旧存在;
- [x] 我已经仔细看过脚本报错提示并无法自行解决问题。
请注意,如果你没有遵照此 Issue Template 填写内容,我们将看心情关闭这个 issue。
服务运行情况
请运行命令 service xray status
并粘贴输出:
xray.service - Xray Service Loaded: loaded (/etc/systemd/system/xray.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/xray.service.d └─10-donot_touch_single_conf.conf Active: active (running) since Thu 2023-10-12 11:10:04 UTC; 13min ago Docs: https://github.com/xtls Main PID: 747 (xray) Tasks: 6 Memory: 26.7M CGroup: /system.slice/xray.service └─747 /usr/local/bin/xray run -config /usr/local/etc/xray/config.json
Oct 12 11:10:04 guangming systemd[1]: Started Xray Service. Oct 12 11:10:04 guangming xray[747]: Xray 1.8.4 (Xray, Penetrates Everything.) Custom (go1.21.0 linux/amd64) Oct 12 11:10:04 guangming xray[747]: A unified platform for anti-censorship. Oct 12 11:10:04 guangming xray[747]: 2023/10/12 11:10:04 [Info] infra/conf/serial: Reading config: /usr/local/etc/xray/config.json
请运行命令 service nginx status
并粘贴输出:
nginx.service - nginx - high performance web server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: signal) since Thu 2023-10-12 11:12:01 UTC; 12min ago Docs: https://nginx.org/en/docs/ Process: 743 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS) Main PID: 757 (code=killed, signal=KILL)
Oct 12 11:10:04 guangming systemd[1]: Starting nginx - high performance web server... Oct 12 11:10:04 guangming systemd[1]: Started nginx - high performance web server. Oct 12 11:12:01 guangming systemd[1]: nginx.service: Main process exited, code=killed, status=9/KILL Oct 12 11:12:01 guangming systemd[1]: nginx.service: Failed with result 'signal'.
环境 Environment
- 服务器提供商及服务器操作系统
Vultr-Debian 10
- 是否全新安装
是
- 其他可以补充的信息 输入NGINX显示信息:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) nginx: [emerg] bind() to 127.0.0.1:60000 failed (98: Address already in use) nginx: [emerg] bind() to 127.0.0.1:60001 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) nginx: [emerg] bind() to 127.0.0.1:60000 failed (98: Address already in use) nginx: [emerg] bind() to 127.0.0.1:60001 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) nginx: [emerg] bind() to 127.0.0.1:60000 failed (98: Address already in use) nginx: [emerg] bind() to 127.0.0.1:60001 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) nginx: [emerg] bind() to 127.0.0.1:60000 failed (98: Address already in use) nginx: [emerg] bind() to 127.0.0.1:60001 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) nginx: [emerg] bind() to 127.0.0.1:60000 failed (98: Address already in use) nginx: [emerg] bind() to 127.0.0.1:60001 failed (98: Address already in use) nginx: [emerg] still could not bind()
NGINX配置conf
server { listen 80; listen [::]:80; server_name vultr.*********.site; return 301 https://$http_host$request_uri;
access_log /dev/null;
error_log /dev/null;
}
server { listen 127.0.0.1:60000 proxy_protocol; listen 127.0.0.1:60001 http2 proxy_protocol; server_name vultr.guangming.site; index index.html index.htm index.php default.php default.htm default.html; root /www/xray_web; add_header Strict-Transport-Security "max-age=63072000" always;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
error_log off;
}
location ~ .*\.(js|css)?$
{
expires 12h;
error_log off;
}
}
说明 Description
旧版本正常使用很长一段时间,今天安装了新版本后无法连接,以为是系统问题,重置系统后安装xray前置问题依旧,看样子是NGINX没有启动。安装的是 Xray (VLESS + TCP + XTLS / TLS + Nginx 及 VLESS + TCP + TLS + Nginx + WebSocket 回落并存模式)选项
伪装网站无法打开,NGINX配置文件我重装了不同系统都只看到80端口没有看到443端口的配置,不知道会不会可能是这个原因导致。