trojanpanel / install-script

Multi-user web administration panel supporting Xray/Trojan-Go/Hysteria/NaiveProxy
https://trojanpanel.github.io
1.79k stars 468 forks source link

如何排查问题?脚本安装后,网页版的控制面板可以登录并配置节点了,将节点配置到Qv2ray了,但无法访问google.com #159

Open cooge70 opened 1 year ago

cooge70 commented 1 year ago

如标题所述。

cooge70 commented 1 year ago

不好意思,问题描述还没写完,按回车就发布进来了.....

VPS 是vultr,OS 是ubutu22.10

我创建了个Trojan Go 的链接,配置到Qv2ray里后,运行 延时测试,正常可以通过,延时239ms,但是无法访问google.com等网站。端口用2443,Qv2ray里日志没有报错。 运行16.故障检测后,运行17.日志查询

1.VPS里运行“1.Trojan Panel 日志如下: 日志如下: {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-02-28 19:07:54"} {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-02-28 19:07:55"} {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-02-28 19:07:55"} {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-02-28 19:25:28"} {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-02-28 19:25:29"} {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-03-03 10:45:16"} {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-03-03 10:45:17"} {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-03-03 10:45:17"}

2..VPS里运行“1.Trojan Panel Core 日志如下: {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-03-03 10:45:17"} {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-03-03 10:45:17"} {"level":"error","msg":"数据库连接异常 err: dial tcp 127.0.0.1:9507: connect: connection refused","time":"2023-03-03 10:45:18"}

jonssonyan commented 1 year ago

面板和内核部署在一台服务器还是多台?看日志的时间是用的时候报的错误么?

cooge70 commented 1 year ago

面板和内核部署在一台服务器还是多台?看日志的时间是用的时候报的错误么? 谢谢博主的回复。部署在同一台服务器上;是的,用的时候的错误。 现在我将服务器os重装了,但是安装脚本后,自动申请证书报错,估计是同一个域名申请证书多次的缘故。我准备换个域名重新安装看看。

cooge70 commented 1 year ago

重装了OS,换了个二级域名,尝试用脚本安装,依然没能成功,看日志貌似跟服务器ubuntu的防火墙有关?(日志里 (likely firewall problem)?应该还是卡在申请证书环节。

--> Trojan Panel后端安装完成 请输入Trojan Panel前端端口(默认:8888): 请选择Trojan Panel前端是否开启https?(0/关闭 1/开启 默认:1/开启): Using default tag: latest latest: Pulling from jonssonyan/trojan-panel-ui 8663204ce13b: Pull complete a1484661dfe6: Pull complete 2f78a3560d10: Pull complete a517401f7a94: Pull complete 294d17c34d13: Pull complete 7051f5a2f4b1: Pull complete 8ec474ffff92: Pull complete 4f4fb700ef54: Pull complete e40e4f0d3214: Pull complete Digest: sha256:cef1ef5d8b3fb62749f87b3136fc8fa2626696d91a7766497d39c9633ba389d1 Status: Downloaded newer image for jonssonyan/trojan-panel-ui:latest docker.io/jonssonyan/trojan-panel-ui:latest 6ed4470213d6f5e1dd08aa1b7fe2ca2dd051ecebf05042a95f43eb9073974888 ---> Trojan Panel前端安装失败或运行异常,请尝试修复或卸载重装

连接断开 ---------------------------------异常,就给断开连接了。 连接主机...----------------------我再次连接服务器,看看日志 连接主机成功 Welcome to Ubuntu 22.10 (GNU/Linux 5.19.0-35-generic x86_64)

  1. 故障检测
  2. 日志查询
  3. 版本查询 请选择:16 ---> 故障检测开始 ---> 证书申请异常,请尝试 1.换个子域名重新搭建 2.重启服务器将重新申请证书 3.重新搭建选择自定义证书选项 日志如下: {"level":"error","ts":1677944813.3763587,"logger":"http.acme_client","msg":"challenge failed","identifier":"我的二级域名","challenge_type":"http-01","problem":{"type":"urn:ietf:params:acme:error:connection","title":"","detail":"我的服务器ip: Fetching http://我的二级域名/.well-known/acme-challenge/di37rJ1T1WFzUx8UeTdbbJDm0MqOyIS6tGWeshbf39w: Timeout during connect (likely firewall problem)","instance":"","subproblems":[]}} {"level":"error","ts":1677944813.377026,"logger":"http.acme_client","msg":"validating authorization","identifier":"我的二级域名","problem":{"type":"urn:ietf:params:acme:error:connection","title":"","detail":"我的服务器ip: Fetching http://我的二级域名/.well-known/acme-challenge/di37rJ1T1WFzUx8UeTdbbJDm0MqOyIS6tGWeshbf39w: Timeout during connect (likely firewall problem)","instance":"","subproblems":[]},"order":"https://acme-v02.api.letsencrypt.org/acme/order/993623337/168156752417","attempt":1,"max_attempts":3} {"level":"error","ts":1677944825.1034756,"logger":"http.acme_client","msg":"challenge failed","identifier":"我的二级域名","challenge_type":"tls-alpn-01","problem":{"type":"urn:ietf:params:acme:error:connection","title":"","detail":"我的服务器ip: Timeout during connect (likely firewall problem)","instance":"","subproblems":[]}} {"level":"error","ts":1677944825.1035366,"logger":"http.acme_client","msg":"validating authorization","identifier":"我的二级域名","problem":{"type":"urn:ietf:params:acme:error:connection","title":"","detail":"我的服务器ip: Timeout during connect (likely firewall problem)","instance":"","subproblems":[]},"order":"https://acme-v02.api.letsencrypt.org/acme/order/993623337/168156769287","attempt":2,"max_attempts":3} {"level":"error","ts":1677944825.103846,"logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"我的二级域名","issuer":"acme-v02.api.letsencrypt.org-directory","error":"HTTP 400 urn:ietf:params:acme:error:connection - 我的服务器ip: Timeout during connect (likely firewall problem)"} {"level":"error","ts":1677944825.1042058,"logger":"tls.obtain","msg":"will retry","error":"[我的二级域名] Obtain: [我的二级域名] solving challenge: 我的二级域名: [我的二级域名] authorization failed: HTTP 400 urn:ietf:params:acme:error:connection - 我的服务器ip: Timeout during connect (likely firewall problem) (ca=https://acme-v02.api.letsencrypt.org/directory)","attempt":1,"retrying_in":60,"elapsed":22.699279639,"max_duration":2592000} ---> Trojan Panel前端运行异常 日志如下: 2023/03/04 23:47:26 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 2023/03/04 23:47:26 [emerg] 1#1: cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: [emerg] cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) 2023/03/04 23:47:27 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 2023/03/04 23:47:27 [emerg] 1#1: cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: [emerg] cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) 2023/03/04 23:47:27 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 2023/03/04 23:47:27 [emerg] 1#1: cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: [emerg] cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) 2023/03/04 23:47:28 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 2023/03/04 23:47:28 [emerg] 1#1: cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: [emerg] cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) 2023/03/04 23:47:29 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 2023/03/04 23:47:29 [emerg] 1#1: cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: [emerg] cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) 2023/03/04 23:47:30 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 2023/03/04 23:47:30 [emerg] 1#1: cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: [emerg] cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) 2023/03/04 23:47:34 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 2023/03/04 23:47:34 [emerg] 1#1: cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: [emerg] cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) 2023/03/04 23:47:40 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 2023/03/04 23:47:40 [emerg] 1#1: cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: [emerg] cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) 2023/03/04 23:47:53 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/default.conf:6 2023/03/04 23:47:53 [emerg] 1#1: cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: [emerg] cannot load certificate "/tpdata/caddy/cert/我的二级域名.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/tpdata/caddy/cert/我的二级域名.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) ---> 故障检测结束
jonssonyan commented 1 year ago

“我的二级域名”?不应该输入你的解析二级域名么?为什么要输入汉字,为什么你会这样理解

jonssonyan commented 1 year ago

还有“我的服务器ip”,ip都没有怎么连接到服务器

cooge70 commented 1 year ago

还有“我的服务器ip”,ip都没有怎么连接到服务器

我将日志里的真实ip地址和域名 被我用“我的服务器ip”和“我的二级域名”替换了才复制到这里发布啊。

jonssonyan commented 1 year ago

上面写了,证书申请异常,请尝试 1.换个子域名重新搭建 2.重启服务器将重新申请证书 3.重新搭建选择自定义证书选项 。 /tpdata/caddy/cert/ 看这个文件夹里面有没有你的证书,应该是没有的。前端也是公用的Caddy的证书,所以也会报错。

cooge70 commented 1 year ago

上面写了,证书申请异常,请尝试 1.换个子域名重新搭建 2.重启服务器将重新申请证书 3.重新搭建选择自定义证书选项 。 /tpdata/caddy/cert/ 看这个文件夹里面有没有你的证书,应该是没有的。前端也是公用的Caddy的证书,所以也会报错。

收到,谢谢。我再尝试一下。

cooge70 commented 1 year ago

在Ubuntu中,我使用sudo ufw disable命令来关闭防火墙后,可以顺利安装脚本了,但是前端控制面板里的服务器API端口8100超时....

日志里:

可以查询日志的应用如下:

  1. Trojan Panel
  2. Trojan Panel Core
  3. 退出 请选择应用(默认:1): 1 请输入查询的行数(默认:20): 日志如下: {"level":"error","msg":"gRPC ping 异常 ip: 我的服务器ip grpc port: 8100 err: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 我的服务器ip:8100: connect: connection refused\"","time":"2023-03-06 17:40:11"}
cooge70 commented 1 year ago

可以了。重新执行了

  1. 安装Trojan Panel Core
cooge70 commented 1 year ago

可以了。重新执行了

  1. 安装Trojan Panel Core

但是.....我创建了节点后导入到Qv2ray,却仍是无法访问墙外网站