无法访问8080端口

无法访问8080端口

这是目前的情况:

root@vmi1046457:~# docker ps
CONTAINER ID   IMAGE                    COMMAND                  CREATED       STATUS                         PORTS                            NAMES
9cfafc58933b   maptiler/tileserver-gl   "/usr/src/app/docker…"   2 hours ago   Up 2    
hours (healthy)   8080/tcp, 0.0.0.0:8080->80/tcp   dazzling_colden



root@vmi1046457:~# sudo ufw allow 8080/tcp
Skipping adding existing rule
Skipping adding existing rule (v6)

root@vmi1046457:~# nc -l -p 8080 
nc: Address already in use
root@vmi1046457:~# 

root@vmi1046457:~# netstat -an|grep LIST 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:42069         0.0.0.0:*               LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 :::80                   :::*                    LISTEN     
unix  2      [ ACC ]     STREAM     LISTENING     722894   /run/user/0/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     722900   /run/user/0/bus
unix  2      [ ACC ]     STREAM     LISTENING     722902   /run/user/0/gnupg/S.dirmngr
unix  2      [ ACC ]     STREAM     LISTENING     722904   /run/user/0/gnupg/S.gpg-agent.browser
unix  2      [ ACC ]     STREAM     LISTENING     722906   /run/user/0/gnupg/S.gpg-agent.extra
unix  2      [ ACC ]     STREAM     LISTENING     21766    /var/run/docker/libnetwork/314b586c6194.sock
unix  2      [ ACC ]     STREAM     LISTENING     722908   /run/user/0/gnupg/S.gpg-agent.ssh
unix  2      [ ACC ]     STREAM     LISTENING     722910   /run/user/0/gnupg/S.gpg-agent
unix  2      [ ACC ]     STREAM     LISTENING     2392     /run/acpid.socket
unix  2      [ ACC ]     STREAM     LISTENING     2394     /run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     2396     /run/docker.sock
unix  2      [ ACC ]     STREAM     LISTENING     2398     /run/uuidd/request
unix  2      [ ACC ]     STREAM     LISTENING     18003    /run/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     18005    /run/systemd/userdb/io.systemd.DynamicUser
unix  2      [ ACC ]     STREAM     LISTENING     18006    /run/systemd/io.system.ManagedOOM
unix  2      [ ACC ]     STREAM     LISTENING     18025    /run/systemd/journal/stdout
unix  2      [ ACC ]     SEQPACKET  LISTENING     18028    /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     24635    /run/irqbalance/irqbalance509.sock
unix  2      [ ACC ]     STREAM     LISTENING     19343    /run/systemd/journal/io.systemd.journal
unix  2      [ ACC ]     STREAM     LISTENING     24666    /run/systemd/resolve/io.systemd.Resolve
unix  2      [ ACC ]     STREAM     LISTENING     4612     /run/containerd/containerd.sock.ttrpc
unix  2      [ ACC ]     STREAM     LISTENING     4614     /run/containerd/containerd.sock
unix  2      [ ACC ]     STREAM     LISTENING     18235    /var/run/docker/metrics.sock
unix  2      [ ACC ]     STREAM     LISTENING     2431     /var/run/postgresql/.s.PGSQL.5432
unix  2      [ ACC ]     STREAM     LISTENING     795125   /run/containerd/s/dcb7b80af05b61e4b240a5af6588e095dab23ace3a0f87274e50fb6289c889c7


root@vmi1046457:~# sudo nmap 194.x.x.x
Starting Nmap 7.80 ( https://nmap.org ) at 2022-11-23 11:08 CET
Nmap scan report for vmi1046457.contaboserver.net (194.60.201.224)
Host is up (0.000062s latency).
Not shown: 997 closed ports
PORT     STATE    SERVICE
22/tcp   open     ssh
80/tcp   open     http
8080/tcp filtered http-proxy

Nmap done: 1 IP address (1 host up) scanned in 3.41 seconds
root@vmi1046457:~# sudo ufw enable^C
root@vmi1046457:~# 
root@vmi1046457:~# 
root@vmi1046457:~# 
root@vmi1046457:~# sudo netstat -plant | grep 8080
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      188808/docker-proxy 

如果我在浏览器地址栏中输入:http://194.xxx/-> 我正确地得到:

Apache2 Default Page 

如果如果放置:http://194.xxx:8080/-> 我得到:

This site can’t be reached194.x.x.x refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall

和:

root@vmi1046457:~# curl 194.x.x.x
curl: (7) Failed to connect to 194.x.x.x port 8080 after 22 ms: Connection refused

我应该做什么才能连接到194.x.x.x:8080

相关内容