'Connecting with Portainer: "resource is online but isn't responding to connection attempts"

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?



Solution 1:[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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1