与Portainer连接:“资源是在线的,但没有响应连接尝试。

发布于 2025-01-29 22:55:29 字数 219 浏览 3 评论 0原文

我在旧笔记本电脑上安装了Ubuntu。现在,有Portainer运行的Docker,我想通过同一网络中的主PC访问Portainer。当我尝试通过我的笔记本电脑连接到Portainer(不是Localhost地址)时,它可以正常工作。但是,当我尝试通过我的PC连接时,我会超时。 Windows Diagnostics说:“资源是在线的,但没有响应连接尝试”。如何打开我本地网络的Portainer?还是Ubuntu的问题?

I installed Ubuntu on an older Laptop. Now there is Docker with Portainer running and I want to access Portainer via my main PC in the same network. When I try to connect to Portainer via my Laptop where it is runnig (not Localhost address) it works fine. But when I try to connect via my PC, I get a timeout. Windows diagnostics says: "resource is online but isn't responding to connection attempts". How can I open Portainer to my local network? Or is this a problem with Ubuntu?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小…红帽 2025-02-05 22:55:29

因此,请检查您是否正在运行SSH的OpenSSH服务器!禁用终端上的防火墙sudo ufw disable检查您的网卡是否正在使用名称ETH0 IfConfig在此步骤之后

使用NetPlan,使用NetPlan,这是当今的默认情况。文件/etc/netplan/00-installer-config.yaml文件。但是B4您需要

使用LSHW命令获取串行/MAC查找目标设备Mac/HW地址:

lshw -C network

您将看到一些输出,

root@ys:/etc# lshw -C network
  *-network
       description: Ethernet interface
       physical id: 2
       logical name: eth0
       serial: dc:a6:32:e8:23:19
       size: 1Gbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bcmgenet driverversion=5.8.0-1015-raspi duplex=full ip=192.168.0.112 link=yes multicast=yes port=MII speed=1Gbit/s

因此您进行串行

DC:A6:32:32:E8:23:19

Note Note Note设置名称选项。

这也适用于WiFi部分。
如果您使用Calbe,则可以删除所有内容,仅添加示例仅更改您的序列“ Mac” sudo nano /etc/netplan/00-intplan/00-installer-config.yaml file。

 network:
        version: 2
        ethernets:
            eth0:
                dhcp4: true
                match:
                    macaddress: <YOUR MAC ID HERE>
                set-name: eth0

然后测试此配置运行。

netplan try

重新启动

netplan apply

后,请重新启动Ubuntu

停止portainer容器

sudo docker stop portainer

,请删除Portainer容器,

sudo docker rm portainer

现在在最后一个版本上再次运行

docker run -d -p 8000:8000 -p 9000:9000 \
    --name=portainer --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v portainer_data:/data \
    portainer/portainer-ce:2.13.1

so check if you have openssh server running for ssh! disable firewall on terminal sudo ufw disable check if your network card is running on name eth0 ifconfig if not change following this step below

Using netplan which is the default these days. File /etc/netplan/00-installer-config.yaml file. but b4 you need to get serial/mac

Find the target devices mac/hw address using the lshw command:

lshw -C network

You'll see some output which looks like:

root@ys:/etc# lshw -C network
  *-network
       description: Ethernet interface
       physical id: 2
       logical name: eth0
       serial: dc:a6:32:e8:23:19
       size: 1Gbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bcmgenet driverversion=5.8.0-1015-raspi duplex=full ip=192.168.0.112 link=yes multicast=yes port=MII speed=1Gbit/s

So then you take the serial

dc:a6:32:e8:23:19

Note the set-name option.

This works for the wifi section as well.
if you using calbe you can delete everything add the example only change for your serial "mac" sudo nano /etc/netplan/00-installer-config.yaml file.

 network:
        version: 2
        ethernets:
            eth0:
                dhcp4: true
                match:
                    macaddress: <YOUR MAC ID HERE>
                set-name: eth0

Then then to test this config run.

netplan try

When your happy with it

netplan apply

reboot you ubuntu

after restart

stop portainer container

sudo docker stop portainer

remove portainer container

sudo docker rm portainer

now run again on the last version

docker run -d -p 8000:8000 -p 9000:9000 \
    --name=portainer --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v portainer_data:/data \
    portainer/portainer-ce:2.13.1
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文