大家好,我是Linux的新手。我已经使用VMware工作站在我的VM上安装了存档。我遵循了下面的指南,但是当我尝试使用它的IP地址( 172.16.0.12:8000 )访问这台机器时,即使没有端口号,我也会得到错误消息。
502 Bad Gatewaynginx/1.18.0 (Ubuntu).
即使我使用curl
,我也会得到相同的错误
arch@archeieve:~$ tail -f /var/log/nginx/error.log
2022/06/18 12:13:33 [error] 1200#1200: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /HTTP/1.1", upstream: "http://127.0.0.1:8001/", host: "127.0.0.1:8000"
ii2022/06/18 12:14:47 [error] 1200#1200: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.16.0.236, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8001/", host: "172.16.0.12:8000"
2022/06/18 12:14:47 [error] 1200#1200: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.16.0.236, server: , request: "GET/favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8001/favicon.ico", host: "172.16.0.12:8000", referrer: "http://172.16.0.12:8000/"
arch@archeieve:~$ tail -f /var/log/nginx/access.log
127.0.0.1 - - [18/Jun/2022:12:13:33 +0000] "GET / HTTP/1.1" 502 166 "-" "curl/7.68.0"
172.16.0.236 - - [18/Jun/2022:12:14:47 +0000] "GET / HTTP/1.1" 502 568 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
172.16.0.236 - - [18/Jun/2022:12:14:47 +0000] "GET /favicon.ico HTTP/1.1" 502 568 "http://172.16.0.12:8000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
172.16.0.236 - - [18/Jun/2022:12:18:07 +0000] "GET / HTTP/1.1" 502 568 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
172.16.0.236 - - [18/Jun/2022:12:18:07 +0000] "GET /favicon.ico HTTP/1.1" 502 568 "http://172.16.0.12:8000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
下面是IPtables的配置行
Chain ufw-user-input (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:8000
ACCEPT tcp -- anywhere anywhere tcp dpt:8002
ACCEPT tcp -- anywhere anywhere tcp dpt:https
确定和解决这一问题的主要步骤是什么?
发布于 2022-06-21 04:37:38
据我所知,这个错误“失败(111:连接被拒绝),同时连接到上游”意味着nginx想要传递连接的服务没有启动,或者没有响应以下超时限制。
因此,请检查您所链接的教程中列出的服务是否已启动,如
sudo systemctl status archivematica-mcp-server
sudo systemctl status archivematica-storage-service
sudo systemctl status archivematica-dashboard
如果其中一个没有启动(活动),那么调查它为什么没有启动
https://serverfault.com/questions/1103661
复制相似问题