Switching WiFi connection fails with dbus timeout - wifi

When we try to switch wifi network through the sd_bus_call_method(...) interface the call fails with a dbus timeout message. First disconnecting from the current wifi and connecting does work however so it does not appear to be an issue with how we do the connection part. We are on a Warrior Yocto build with Connman 1.37, systemd 2.41. Here are some logs from the failing connection:
Jan 8 20:05:22 rc8000-5e2b avahi-daemon[195]: Withdrawing address record for 192.168.170.128 on wlan0.
Jan 8 20:05:22 rc8000-5e2b avahi-daemon[195]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.170.128.
Jan 8 20:05:22 rc8000-5e2b wpa_supplicant[361]: wlan0: CTRL-EVENT-DISCONNECTED bssid=00:08:2f:ef:04:d3 reason=3 locally_generated=1
Jan 8 20:05:22 rc8000-5e2b systemd-networkd[217]: wlan0: Lost carrier
Jan 8 20:05:22 rc8000-5e2b avahi-daemon[195]: Interface wlan0.IPv4 no longer relevant for mDNS.
Jan 8 20:05:22 rc8000-5e2b avahi-daemon[195]: Withdrawing address record for fe80::76e1:82ff:fe08:5e2b on wlan0.
Jan 8 20:05:22 rc8000-5e2b connmand[5042]: wlan0 {del} address 192.168.170.128/22 label wlan0
Jan 8 20:05:22 rc8000-5e2b connmand[5042]: wlan0 {del} route 192.168.168.0 gw 0.0.0.0 scope 253 <LINK>
Jan 8 20:05:22 rc8000-5e2b connmand[5042]: wlan0 {RX} 11740 packets 1072648 bytes
Jan 8 20:05:22 rc8000-5e2b connmand[5042]: wlan0 {TX} 373 packets 56170 bytes
Jan 8 20:05:22 rc8000-5e2b connmand[5042]: wlan0 {update} flags 36867 <UP>
Jan 8 20:05:22 rc8000-5e2b connmand[5042]: wlan0 {newlink} index 3 address 74:E1:82:08:5E:2B mtu 1500
Jan 8 20:05:22 rc8000-5e2b connmand[5042]: wlan0 {newlink} index 3 operstate 2 <DOWN>
Jan 8 20:05:22 rc8000-5e2b connmand[5042]: wlan0 {del} route fe80:: gw :: scope 0 <UNIVERSE>Jan 8 20:05:22 rc8000-5e2b connmand[5042]: wlan0 {del} route ff00:: gw :: scope 0 <UNIVERSE>
Jan 8 20:05:23 rc8000-5e2b connmand[5042]: Skipping disconnect of 5769736572_managed_psk, network is connecting.
Jan 8 20:05:28 rc8000-5e2b wpa_supplicant[361]: wlan0: SME: Trying to authenticate with 00:08:2f:ef:04:d0 (SSID='SBSR&D_2.4' freq=2437 MHz)
Jan 8 20:05:29 rc8000-5e2b wpa_supplicant[361]: wlan0: Trying to associate with 00:08:2f:ef:04:d0 (SSID='SBSR&D_2.4' freq=2437 MHz)
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {RX} 11741 packets 1072783 bytes
Jan 8 20:05:29 rc8000-5e2b wpa_supplicant[361]: wlan0: Associated with 00:08:2f:ef:04:d0
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {TX} 373 packets 56170 bytes
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {update} flags 102403 <UP,LOWER_UP>
Jan 8 20:05:29 rc8000-5e2b wpa_supplicant[361]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {newlink} index 3 address 74:E1:82:08:5E:2B mtu 1500
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {newlink} index 3 operstate 5 <DORMANT>
Jan 8 20:05:29 rc8000-5e2b wpa_supplicant[361]: wlan0: WPA: Key negotiation completed with 00:08:2f:ef:04:d0 [PTK=CCMP GTK=CCMP]
Jan 8 20:05:29 rc8000-5e2b wpa_supplicant[361]: wlan0: CTRL-EVENT-CONNECTED - Connection to 00:08:2f:ef:04:d0 completed [id=1 id_str=]
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {add} route ff00:: gw :: scope 0 <UNIVERSE>
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {add} route fe80:: gw :: scope 0 <UNIVERSE>
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {RX} 11742 packets 1072952 bytes
Jan 8 20:05:29 rc8000-5e2b systemd-networkd[217]: wlan0: Gained carrier
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {TX} 375 packets 56458 bytes
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {newlink} index 3 address 74:E1:82:08:5E:2B mtu 1500
Jan 8 20:05:29 rc8000-5e2b connmand[5042]: wlan0 {newlink} index 3 operstate 6 <UP>
Jan 8 20:05:30 rc8000-5e2b wpa_supplicant[361]: wlan0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-48 noise=9999 txrate=58500
Jan 8 20:05:30 rc8000-5e2b avahi-daemon[195]: Joining mDNS multicast group on interface wlan0.IPv4 with address 10.175.79.251.
Jan 8 20:05:30 rc8000-5e2b avahi-daemon[195]: New relevant interface wlan0.IPv4 for mDNS.
Jan 8 20:05:30 rc8000-5e2b avahi-daemon[195]: Registering new address record for 10.175.79.251 on wlan0.IPv4.
Jan 8 20:05:30 rc8000-5e2b connmand[5042]: wlan0 {add} address 10.175.79.251/21 label wlan0 family 2Jan 8 20:05:30 rc8000-5e2b systemd-networkd[217]: wlan0: Gained IPv6LL
Jan 8 20:05:30 rc8000-5e2b avahi-daemon[195]: Registering new address record for fe80::76e1:82ff:fe08:5e2b on wlan0.*.
Jan 8 20:05:30 rc8000-5e2b connmand[5042]: wlan0 {add} route 10.175.72.0 gw 0.0.0.0 scope 253 <LINK>
Jan 8 20:05:30 rc8000-5e2b connmand[5042]: wlan0 {add} route 10.175.72.1 gw 0.0.0.0 scope 253 <LINK>
Jan 8 20:05:30 rc8000-5e2b connmand[5042]: wlan0 {add} route 0.0.0.0 gw 10.175.72.1 scope 0 <UNIVERSE>
Jan 8 20:05:47 rc8000-5e2b connman-client[5046]: Service Connect wifi_74e182085e2b_5342535226445f322e34_managed_psk: org.freedesktop.DBus.Error.Timeout
And the dbus trace for the same problem:
method call time=1578952131.483910 sender=:1.22 -> destination=net.connman serial=20 path=/net/connman/service/wifi_74e182085e2b_5342535226445f322e34_managed_psk; interface=net.connman.Service; member=Connect
method call time=1578952131.507736 sender=:1.21 -> destination=fi.w1.wpa_supplicant1 serial=3697 path=/fi/w1/wpa_supplicant1/Interfaces/5; interface=fi.w1.wpa_supplicant1.Interface; member=Disconnect
signal time=1578952131.512794 sender=:1.21 -> destination=(null destination) serial=3698 path=/net/connman/service/wifi_74e182085e2b_5769736572_managed_psk; interface=net.connman.Service; member=PropertyChanged
string "Domains"
variant array [
]
signal time=1578952131.639802 sender=:1.21 -> destination=(null destination) serial=3699 path=/; interface=net.connman.Manager; member=PropertyChanged
string "State"
variant string "ready"
... Trimmed because too long ...
signal time=1578952132.045699 sender=:1.21 -> destination=(null destination) serial=3713 path=/net/connman/service/wifi_74e182085e2b_5769736572_managed_psk; interface=net.connman.Service; member=PropertyChanged
string "State"
variant string "association"
method call time=1578952132.054770 sender=:1.21 -> destination=fi.w1.wpa_supplicant1 serial=3714 path=/fi/w1/wpa_supplicant1/Interfaces/5; interface=fi.w1.wpa_supplicant1.Interface; member=RemoveNetwork
object path "/fi/w1/wpa_supplicant1/Interfaces/5/Networks/0"signal time=1578952132.066571 sender=:1.21 -> destination=(null destination) serial=3715 path=/; interface=net.connman.Manager;
... Trimmed because too long ...
signal time=1578952147.533836 sender=:1.21 -> destination=(null destination) serial=3750 path=/net/connman/technology/wifi; interface=net.connman.Technology; member=PropertyChanged
string "Connected
variant boolean true
signal time=1578952147.536193 sender=:1.21 -> destination=(null destination) serial=3751 path=/; interface=net.connman.Manager; member=PropertyChanged
string "State"
variant string "ready"
signal time=1578952147.536811 sender=:1.21 -> destination=(null destination) serial=3752 path=/net/connman/service/wifi_74e182085e2b_5342535226445f322e34_managed_psk; interface=net.connman.Service; member=PropertyChanged
string "IPv4"
variant array [
]
signal time=1578952147.543999 sender=:1.21 -> destination=(null destination) serial=3753 path=/net/connman/service/wifi_74e182085e2b_5342535226445f322e34_managed_psk; interface=net.connman.Service; member=PropertyChanged
string "IPv4"
variant array [
]
... Trimmed because too long ...```
I noticed that the IP information in the dbus trace appears incomplete and the connman state never gets to online. I also noticed that in syslog for a successful connection additional routes are added:
Jan 12 20:33:54 rc8000-5e2b avahi-daemon[205]: Registering new address record for 192.168.171.81 on wlan0.IPv4.
Jan 12 20:33:54 rc8000-5e2b connmand[222]: wlan0 {add} address 192.168.171.81/22 label wlan0 family 2
Jan 12 20:33:54 rc8000-5e2b connmand[222]: wlan0 {add} route 192.168.168.0 gw 0.0.0.0 scope 253 <LINK>
Jan 12 20:33:54 rc8000-5e2b connmand[222]: wlan0 {add} route 192.168.171.254 gw 0.0.0.0 scope 253 <LINK>
Jan 12 20:33:54 rc8000-5e2b connmand[222]: wlan0 {add} route 8.8.8.8 gw 192.168.171.254 scope 0 <UNIVERSE>
Jan 12 20:33:54 rc8000-5e2b connmand[222]: wlan0 {add} route 8.8.4.4 gw 192.168.171.254 scope 0 <UNIVERSE>
Jan 12 20:33:54 rc8000-5e2b connmand[222]: wlan0 {add} route 0.0.0.0 gw 192.168.171.254 scope 0 <UNIVERSE>
Jan 12 20:33:54 rc8000-5e2b connmand[222]: wlan0 {add} route 212.227.81.55 gw 192.168.171.254 scope 0 <UNIVERSE>
The last one appears to be a "phone home" IP to establish that the device is online. It disappears sometime later and connman does get to the online state.
I am pretty much stumped as to why connman (or systemd ?) behaves that way when trying to switch between wifi networks without first disconnecting. Any help would be appreciated.
EDIT
The following trace show 2 associations going on at the same time
signal time=1578952132.045699 sender=:1.21 -> destination=(null destination) serial=3713 path=/net/connman/service/wifi_74e182085e2b_5769736572_managed_psk; interface=net.connman.Service; member=PropertyChanged
string "State"
variant string "association"
method call time=1578952132.054770 sender=:1.21 -> destination=fi.w1.wpa_supplicant1 serial=3714 path=/fi/w1/wpa_supplicant1/Interfaces/5; interface=fi.w1.wpa_supplicant1.Interface; member=RemoveNetwork
object path "/fi/w1/wpa_supplicant1/Interfaces/5/Networks/0"
signal time=1578952132.066571 sender=:1.21 -> destination=(null destination) serial=3715 path=/; interface=net.connman.Manager; member=ServicesChanged
....
signal time=1578952132.471595 sender=:1.21 -> destination=(null destination) serial=3718 path=/net/connman/service/wifi_74e182085e2b_5342535226445f322e34_managed_psk; interface=net.connman.Service; member=PropertyChanged
string "State"
variant string "association"
signal time=1578952132.577805 sender=:1.21 -> destination=(null destination) serial=3719 path=/; interface=net.connman.Manager; member=ServicesChanged
....
method return time=1578952133.177367 sender=:1.10 -> destination=:1.21 serial=84264 reply_serial=3716
object path "/fi/w1/wpa_supplicant1/Interfaces/5/Networks/0"
method call time=1578952133.181592 sender=:1.21 -> destination=fi.w1.wpa_supplicant1 serial=3720 path=/fi/w1/wpa_supplicant1/Interfaces/5; interface=fi.w1.wpa_supplicant1.Interface; member=SelectNetwork
object path "/fi/w1/wpa_supplicant1/Interfaces/5/Networks/0"
signal time=1578952133.199893 sender=:1.10 -> destination=(null destination) serial=84265 path=/fi/w1/wpa_supplicant1/Interfaces/5; interface=fi.w1.wpa_supplicant1.Interface; member=NetworkAdded
object path "/fi/w1/wpa_supplicant1/Interfaces/5/Networks/1"

Related

Docker (Snap) Containers Getting Stopped

I've installed Docker using Snap. Recently running containers have been getting stopped on their own. This happens say 2-3 times in the space of ~8-10 hours. I've been trying to find a root cause without much success. Relevant information below. Let me know if I can provide more information to help.
$ docker --version
Docker version 19.03.13, build cd8016b6bc
$ snap --version
snap 2.51.4
snapd 2.51.4
series 16
ubuntu 18.04
kernel 5.4.0-81-generic
Docker daemon.json
$ cat /var/snap/docker/current/config/daemon.json
{
"log-level": "error",
"storage-driver": "aufs",
"bip": "172.28.0.1/24"
}
$ dmesg -T
[Tue Sep 14 20:31:37 2021] aufs aufs_fill_super:918:mount[18200]: no arg
[Tue Sep 14 20:31:37 2021] overlayfs: missing 'lowerdir'
[Tue Sep 14 20:31:43 2021] br-6c6facc1a891: port 5(veth4c212a4) entered disabled state
[Tue Sep 14 20:31:43 2021] device veth4c212a4 left promiscuous mode
[Tue Sep 14 20:31:43 2021] br-6c6facc1a891: port 5(veth4c212a4) entered disabled state
[Tue Sep 14 20:31:45 2021] br-6c6facc1a891: port 1(veth1c95aae) entered disabled state
[Tue Sep 14 20:31:45 2021] device veth1c95aae left promiscuous mode
[Tue Sep 14 20:31:45 2021] br-6c6facc1a891: port 1(veth1c95aae) entered disabled state
[Tue Sep 14 20:31:45 2021] br-6c6facc1a891: port 4(veth1dfd80e) entered disabled state
[Tue Sep 14 20:31:45 2021] device veth1dfd80e left promiscuous mode
[Tue Sep 14 20:31:45 2021] br-6c6facc1a891: port 4(veth1dfd80e) entered disabled state
[Tue Sep 14 20:31:46 2021] br-6c6facc1a891: port 2(veth8e48cf4) entered disabled state
[Tue Sep 14 20:31:46 2021] device veth8e48cf4 left promiscuous mode
[Tue Sep 14 20:31:46 2021] br-6c6facc1a891: port 2(veth8e48cf4) entered disabled state
[Tue Sep 14 20:31:46 2021] br-6c6facc1a891: port 3(veth534c1d3) entered disabled state
[Tue Sep 14 20:31:46 2021] device veth534c1d3 left promiscuous mode
[Tue Sep 14 20:31:46 2021] br-6c6facc1a891: port 3(veth534c1d3) entered disabled state
[Tue Sep 14 20:31:47 2021] br-6c6facc1a891: port 6(veth316fdd7) entered disabled state
[Tue Sep 14 20:31:47 2021] device veth316fdd7 left promiscuous mode
Note the difference in timestamp between Docker logs, below and dmesg, above.
The Docker logs appear to be from previous time I restarted containers using docker-compose.
$ sudo snap logs docker
2021-09-14T15:01:19Z docker.dockerd[27385]: time="2021-09-14T20:31:19.783211664+05:30" level=error msg="connecting to shim" error="dial unix \x00/containerd-shim/af7c138e4399d3bb8a5615ec05fd1ba90bc7e98391b468067374a020d792906d.sock: connect: connection refused" id=2b9e8a563dad5f61e2ad525c5d590804c33c6cd323d580fe365c170fd5a68a8a namespace=moby
2021-09-14T15:01:19Z docker.dockerd[27385]: time="2021-09-14T20:31:19.860328985+05:30" level=error msg="connecting to shim" error="dial unix \x00/containerd-shim/281fedfbf5b11053d28853b6ad6175009903b338995d5faa0862e8f1ab0e3b10.sock: connect: connection refused" id=43449775462debc8336ab1bc63e2020e8a554ee25db31befa561dc790c76e1ac namespace=moby
2021-09-14T15:01:19Z docker.dockerd[27385]: time="2021-09-14T20:31:19.878788076+05:30" level=error msg="connecting to shim" error="dial unix \x00/containerd-shim/ff2c9cacd1ef1ac083f93e4823f5d0fa4146593f2b6508a098b22270b48507b4.sock: connect: connection refused" id=4d91c4451a011d87b2d21fe7d74e3c4e7ffa20f2df69076f36567b5389597637 namespace=moby
2021-09-14T15:01:19Z docker.dockerd[27385]: time="2021-09-14T20:31:19.906212149+05:30" level=error msg="connecting to shim" error="dial unix \x00/containerd-shim/017a3907df26803a221be66a2a0ac25e43a994d26432cba30f6c81c078ad62fa.sock: connect: connection refused" id=79e0d419a1d82f83dd81898a02fa1161b909ae88c1e46575a1bec894df31a482 namespace=moby
2021-09-14T15:01:19Z docker.dockerd[27385]: time="2021-09-14T20:31:19.919895281+05:30" level=error msg="connecting to shim" error="dial unix \x00/containerd-shim/47e9b56ce80402793038edf72fe64b44a05f659371c212361e47d1463ad269ae.sock: connect: connection refused" id=99aba37c4f1521854130601f19afeb196231a924effba1cfcfb7da90b5703a86 namespace=moby
2021-09-14T15:01:19Z docker.dockerd[27385]: time="2021-09-14T20:31:19.931562562+05:30" level=error msg="connecting to shim" error="dial unix \x00/containerd-shim/58d5711ddbcc9faf6a4d8d7d0433d4254d5069c9e559d61eb1551f80d193a3eb.sock: connect: connection refused" id=a09358b02332b18dfa99b4dc99edf4b1ebac80671c29b91946875a53e1b8bd7e namespace=moby
2021-09-14T15:01:19Z docker.dockerd[27385]: time="2021-09-14T20:31:19.949511272+05:30" level=error msg="connecting to shim" error="dial unix \x00/containerd-shim/67de51fdf40350feb583255a5e703c719745ef9123a8a47dad72df075c12f953.sock: connect: connection refused" id=ee145dfe0eb44fde323a431b191a62aa47ad265c438239f7243c684e10713042 namespace=moby
2021-09-14T15:01:24Z docker.dockerd[27385]: time="2021-09-14T20:31:24.671615174+05:30" level=error msg="Force shutdown daemon"
2021-09-14T15:01:25Z systemd[1]: Stopped Service for snap application docker.dockerd.
2021-09-14T15:01:37Z systemd[1]: Started Service for snap application docker.dockerd.

docker compose failing (syslog ERROR:Unknown interface index 335 seen even after reload)

Thank you for checking this.
Ubuntu 18 server on AWS EC2, docker-compose up was running just fine, suddenly it stopped building after a reboot. Not sure what changed.
Here is the docker-compose.yml
version: '2'
services:
web:
build: .
restart: "no"
command: gulp serve --max_new_space_size=8192 --max-old-space-size=8192 -LLLL
env_file:
- .env
volumes:
- .:/app/code
ports:
- "8050:8000"
- "8005:8005"
- "8888:8888"
Here is the Dockerfile
FROM node:6.10.3
RUN mkdir /app
RUN mkdir /app/code
WORKDIR /app
# Install JavaScript requirements
COPY package.json /app/
COPY package-lock.json /app/
RUN npm install -d
RUN npm rebuild node-sass
# Link gulp
RUN ln -s /app/node_modules/.bin/gulp /usr/bin/gulp
COPY . /app/code/
WORKDIR /app/code
RUN export NODE_OPTIONS="--max-old-space-size=8192"
# Build webpack files
RUN gulp build
EXPOSE 8000
CMD gulp serve
I see some errors in the syslog, not sure if it is related.
Jun 2 15:25:24 ip-10-0-1-194 kernel: [52500.188965] docker0: port 1(veth638f141) entered blocking state
Jun 2 15:25:24 ip-10-0-1-194 kernel: [52500.188968] docker0: port 1(veth638f141) entered disabled state
Jun 2 15:25:24 ip-10-0-1-194 kernel: [52500.189101] device veth638f141 entered promiscuous mode
Jun 2 15:25:24 ip-10-0-1-194 systemd-networkd[734]: veth638f141: Link UP
Jun 2 15:25:24 ip-10-0-1-194 networkd-dispatcher[947]: WARNING:Unknown index 338 seen, reloading interface list
Jun 2 15:25:24 ip-10-0-1-194 systemd-udevd[5940]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jun 2 15:25:24 ip-10-0-1-194 systemd-udevd[5940]: Could not generate persistent MAC address for veth3a08f68: No such file or directory
Jun 2 15:25:24 ip-10-0-1-194 systemd-udevd[5941]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jun 2 15:25:24 ip-10-0-1-194 systemd-udevd[5941]: Could not generate persistent MAC address for veth638f141: No such file or directory
Jun 2 15:25:24 ip-10-0-1-194 containerd[993]: time="2021-06-02T15:25:24.995557031Z" level=info msg="starting signal loop" namespace=moby path=/run/containerd/io.containerd.runtime.v2.task/moby/7712e133ca3de4a4d407341b7a51428e984c4bcbf2311e27ffbd43cbff56ef44 pid=6001
Jun 2 15:25:25 ip-10-0-1-194 kernel: [52500.489989] eth0: renamed from veth3a08f68
Jun 2 15:25:25 ip-10-0-1-194 systemd-networkd[734]: veth638f141: Gained carrier
Jun 2 15:25:25 ip-10-0-1-194 systemd-networkd[734]: docker0: Gained carrier
Jun 2 15:25:25 ip-10-0-1-194 kernel: [52500.509809] IPv6: ADDRCONF(NETDEV_CHANGE): veth638f141: link becomes ready
Jun 2 15:25:25 ip-10-0-1-194 kernel: [52500.509869] docker0: port 1(veth638f141) entered blocking state
Jun 2 15:25:25 ip-10-0-1-194 kernel: [52500.509870] docker0: port 1(veth638f141) entered forwarding state
Jun 2 15:25:26 ip-10-0-1-194 systemd-networkd[734]: veth638f141: Gained IPv6LL
Jun 2 15:25:27 ip-10-0-1-194 containerd[993]: time="2021-06-02T15:25:27.979112078Z" level=info msg="shim disconnected" id=7712e133ca3de4a4d407341b7a51428e984c4bcbf2311e27ffbd43cbff56ef44
Jun 2 15:25:27 ip-10-0-1-194 dockerd[1010]: time="2021-06-02T15:25:27.979239439Z" level=info msg="ignoring event" container=7712e133ca3de4a4d407341b7a51428e984c4bcbf2311e27ffbd43cbff56ef44 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jun 2 15:25:28 ip-10-0-1-194 kernel: [52503.292104] docker0: port 1(veth638f141) entered disabled state
Jun 2 15:25:28 ip-10-0-1-194 kernel: [52503.292214] veth3a08f68: renamed from eth0
Jun 2 15:25:28 ip-10-0-1-194 systemd-networkd[734]: veth638f141: Lost carrier
Jun 2 15:25:28 ip-10-0-1-194 systemd-udevd[6146]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jun 2 15:25:28 ip-10-0-1-194 systemd-networkd[734]: veth638f141: Link DOWN
Jun 2 15:25:28 ip-10-0-1-194 kernel: [52503.350623] docker0: port 1(veth638f141) entered disabled state
Jun 2 15:25:28 ip-10-0-1-194 kernel: [52503.353895] device veth638f141 left promiscuous mode
Jun 2 15:25:28 ip-10-0-1-194 kernel: [52503.353912] docker0: port 1(veth638f141) entered disabled state
Jun 2 15:25:28 ip-10-0-1-194 networkd-dispatcher[947]: WARNING:Unknown index 337 seen, reloading interface list
Jun 2 15:25:28 ip-10-0-1-194 networkd-dispatcher[947]: **ERROR:Unknown interface index 337 seen even after reload**
Jun 2 15:25:29 ip-10-0-1-194 systemd-networkd[734]: docker0: Lost carrier

Possible to run multiple squid containers on a single host?

I am trying to run multiple squid containers whose configs are built at container run time. Each container needs to route traffic independently from the other. Aside from where traffic is forwarded on, the configs are the same.
I can get a single squid container running and doing what I need it to with no problems.
docker run -v /var/log/squid:/var/log/squid -p 3133-3138:3133-3138 my_images/squid_test:version1.0
Trying to run a second container with:
docker run -v /var/log/squid:/var/log/squid -p 4133-4138:3133-3138 my_images/squid_test:version1.0
This instantly spits out: Aborted (core dumped)
I have one other container running on port 9000 but thats it.
This is a syslog dump from the host at the time the second container launch is attempted
Jun 18 04:45:17 dockerdevr1 kernel: [84821.356170] docker0: port 3(veth89ab0c1) entered blocking state
Jun 18 04:45:17 dockerdevr1 kernel: [84821.356172] docker0: port 3(veth89ab0c1) entered disabled state
Jun 18 04:45:17 dockerdevr1 kernel: [84821.356209] device veth89ab0c1 entered promiscuous mode
Jun 18 04:45:17 dockerdevr1 kernel: [84821.356252] IPv6: ADDRCONF(NETDEV_UP): veth89ab0c1: link is not ready
Jun 18 04:45:17 dockerdevr1 systemd-networkd[765]: veth89ab0c1: Link UP
Jun 18 04:45:17 dockerdevr1 networkd-dispatcher[1048]: WARNING:Unknown index 421 seen, reloading interface list
Jun 18 04:45:17 dockerdevr1 systemd-udevd[25899]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jun 18 04:45:17 dockerdevr1 systemd-udevd[25900]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jun 18 04:45:17 dockerdevr1 systemd-udevd[25899]: Could not generate persistent MAC address for vethb0dffb8: No such file or directory
Jun 18 04:45:17 dockerdevr1 systemd-udevd[25900]: Could not generate persistent MAC address for veth89ab0c1: No such file or directory
Jun 18 04:45:17 dockerdevr1 containerd[1119]: time="2020-06-18T04:45:17.567627817Z" level=info msg="shim containerd-shim started" address="/containerd-shim/moby/85f0acae4a948ed16b3b29988291b5df3d052b10d1965f1198745966e63c3732/shim.sock" debug=false pid=25920
Jun 18 04:45:17 dockerdevr1 kernel: [84821.841905] eth0: renamed from vethb0dffb8
Jun 18 04:45:17 dockerdevr1 kernel: [84821.858172] IPv6: ADDRCONF(NETDEV_CHANGE): veth89ab0c1: link becomes ready
Jun 18 04:45:17 dockerdevr1 kernel: [84821.858263] docker0: port 3(veth89ab0c1) entered blocking state
Jun 18 04:45:17 dockerdevr1 kernel: [84821.858265] docker0: port 3(veth89ab0c1) entered forwarding state
Jun 18 04:45:17 dockerdevr1 systemd-networkd[765]: veth89ab0c1: Gained carrier
Jun 18 04:45:19 dockerdevr1 systemd-networkd[765]: veth89ab0c1: Gained IPv6LL
Jun 18 04:45:19 dockerdevr1 containerd[1119]: time="2020-06-18T04:45:19.221654620Z" level=info msg="shim reaped" id=85f0acae4a948ed16b3b29988291b5df3d052b10d1965f1198745966e63c3732
Jun 18 04:45:19 dockerdevr1 dockerd[1171]: time="2020-06-18T04:45:19.232623257Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Jun 18 04:45:19 dockerdevr1 systemd-networkd[765]: veth89ab0c1: Lost carrier
Jun 18 04:45:19 dockerdevr1 kernel: [84823.251203] docker0: port 3(veth89ab0c1) entered disabled state
Jun 18 04:45:19 dockerdevr1 kernel: [84823.254402] vethb0dffb8: renamed from eth0
Jun 18 04:45:19 dockerdevr1 systemd-networkd[765]: veth89ab0c1: Link DOWN
Jun 18 04:45:19 dockerdevr1 kernel: [84823.293507] docker0: port 3(veth89ab0c1) entered disabled state
Jun 18 04:45:19 dockerdevr1 kernel: [84823.294577] device veth89ab0c1 left promiscuous mode
Jun 18 04:45:19 dockerdevr1 kernel: [84823.294580] docker0: port 3(veth89ab0c1) entered disabled state
Jun 18 04:45:19 dockerdevr1 networkd-dispatcher[1048]: WARNING:Unknown index 420 seen, reloading interface list
Jun 18 04:45:19 dockerdevr1 networkd-dispatcher[1048]: ERROR:Unknown interface index 420 seen even after reload
Jun 18 04:45:19 dockerdevr1 systemd-udevd[26041]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jun 18 04:45:19 dockerdevr1 systemd-udevd[26041]: link_config: could not get ethtool features for vethb0dffb8
Jun 18 04:45:19 dockerdevr1 systemd-udevd[26041]: Could not set offload features of vethb0dffb8: No such device
Has anyone tried something similar to this? I know I can get multiple nginx containers running on different ports. Any insight would be greatly appreciated!

Docker on Ubuntu doesn't connect to localhost

I have been going for hours trying to understand why docker just so happen to doesn't work on my machine. I am using Ubuntu 18.01 Xfce. Have installed docker using the official site and tried to test run an image using docker container run -it -p 8000:80 nginx command. The first it ran ok, but only I try another time the localhost goes into an endless loop of loading. It only works after I restart docker and then only the first time. I also tried editing docker.service file into:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://127.0.0.1:2375
as instructed on the https://docs.docker.com/install/linux/linux-postinstall/ again no change.
Is there a solution to this problem? Is it and OS problem? Some kind of conflict problem? If so, is there a solution?
UPDATE:
This what ip addr show docker0 command is showing when container is running:
5: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:4e:4b:8e:af brd ff:ff:ff:ff:ff:ff
inet6 fe80::42:4eff:fe4b:8eaf/64 scope link
valid_lft forever preferred_lft forever
UPDATE 2:
By entering the commen sudo docker run -t -i nginx /bin/bash and reading the tail -f /var/log/syslog I have the following lines:
Feb 5 11:09:43 unkn0wn27-X550VX dockerd[8188]: time="2020-02-05T11:09:43.010897917+02:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.539911] docker0: port 2(vethb213531) entered disabled state
Feb 5 11:09:43 unkn0wn27-X550VX systemd-networkd[415]: vethb213531: Lost carrier
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.541590] veth4234a1c: renamed from eth0
Feb 5 11:09:43 unkn0wn27-X550VX systemd-timesyncd[994]: Network configuration changed, trying to establish connection.
Feb 5 11:09:43 unkn0wn27-X550VX systemd-udevd[9744]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Feb 5 11:09:43 unkn0wn27-X550VX systemd-timesyncd[994]: Synchronized to time server 194.40.240.12:123 (194.40.240.12).
Feb 5 11:09:43 unkn0wn27-X550VX NetworkManager[1280]: <info> [1580893783.1724] manager: (veth4234a1c): new Veth device (/org/freedesktop/NetworkManager/Devices/43)
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.641548] audit: type=1107 audit(1580893783.171:310): pid=1164 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal" bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="DeviceAdded" name=":1.13" mask="receive" pid=3643 label="snap.telegram-desktop.telegram-desktop" peer_pid=1280 peer_label="unconfined"
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.641548] exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.644507] audit: type=1107 audit(1580893783.171:311): pid=1164 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal" bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="PropertiesChanged" name=":1.13" mask="receive" pid=3643 label="snap.telegram-desktop.telegram-desktop" peer_pid=1280 peer_label="unconfined"
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.644507] exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
Feb 5 11:09:43 unkn0wn27-X550VX NetworkManager[1280]: <info> [1580893783.1829] devices added (path: /sys/devices/virtual/net/veth4234a1c, iface: veth4234a1c)
Feb 5 11:09:43 unkn0wn27-X550VX NetworkManager[1280]: <info> [1580893783.1830] device added (path: /sys/devices/virtual/net/veth4234a1c, iface: veth4234a1c): no ifupdown configuration found.
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.653532] IPv6: ADDRCONF(NETDEV_CHANGE): veth4234a1c: link becomes ready
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.653779] docker0: port 2(vethb213531) entered blocking state
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.653784] docker0: port 2(vethb213531) entered forwarding state
Feb 5 11:09:43 unkn0wn27-X550VX networkd-dispatcher[1265]: WARNING:Unknown index 30 seen, reloading interface list
Feb 5 11:09:43 unkn0wn27-X550VX systemd-timesyncd[994]: Network configuration changed, trying to establish connection.
Feb 5 11:09:43 unkn0wn27-X550VX NetworkManager[1280]: <info> [1580893783.1911] device (veth4234a1c): carrier: link connected
Feb 5 11:09:43 unkn0wn27-X550VX NetworkManager[1280]: <info> [1580893783.1934] device (vethb213531): carrier: link connected
Feb 5 11:09:43 unkn0wn27-X550VX systemd-networkd[415]: veth4234a1c: Gained carrier
Feb 5 11:09:43 unkn0wn27-X550VX systemd-networkd[415]: vethb213531: Gained carrier
Feb 5 11:09:43 unkn0wn27-X550VX systemd-timesyncd[994]: Synchronized to time server 194.40.240.12:123 (194.40.240.12).
Feb 5 11:09:43 unkn0wn27-X550VX avahi-daemon[1159]: Interface vethb213531.IPv6 no longer relevant for mDNS.
Feb 5 11:09:43 unkn0wn27-X550VX avahi-daemon[1159]: Leaving mDNS multicast group on interface vethb213531.IPv6 with address fe80::c0e3:82ff:febc:a5c4.
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.746817] docker0: port 2(vethb213531) entered disabled state
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.753883] device vethb213531 left promiscuous mode
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.753893] docker0: port 2(vethb213531) entered disabled state
Feb 5 11:09:43 unkn0wn27-X550VX avahi-daemon[1159]: Withdrawing address record for fe80::c0e3:82ff:febc:a5c4 on vethb213531.
Feb 5 11:09:43 unkn0wn27-X550VX NetworkManager[1280]: <info> [1580893783.3453] devices removed (path: /sys/devices/virtual/net/veth4234a1c, iface: veth4234a1c)
Feb 5 11:09:43 unkn0wn27-X550VX NetworkManager[1280]: <info> [1580893783.3457] devices removed (path: /sys/devices/virtual/net/vethb213531, iface: vethb213531)
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.816316] audit: type=1107 audit(1580893783.343:312): pid=1164 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal" bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.NetworkManager" member="DeviceRemoved" name=":1.13" mask="receive" pid=3643 label="snap.telegram-desktop.telegram-desktop" peer_pid=1280 peer_label="unconfined"
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.816316] exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
Feb 5 11:09:43 unkn0wn27-X550VX NetworkManager[1280]: <info> [1580893783.3528] device (vethb213531): released from master device docker0
Feb 5 11:09:43 unkn0wn27-X550VX systemd-networkd[415]: veth4234a1c: Lost carrier
Feb 5 11:09:43 unkn0wn27-X550VX systemd-timesyncd[994]: Network configuration changed, trying to establish connection.
Feb 5 11:09:43 unkn0wn27-X550VX systemd-networkd[415]: veth4234a1c: Removing non-existent address: fe80::42:acff:fe11:3/64 (valid forever), ignoring
Feb 5 11:09:43 unkn0wn27-X550VX systemd-networkd[415]: vethb213531: Lost carrier
Feb 5 11:09:43 unkn0wn27-X550VX systemd-timesyncd[994]: Synchronized to time server 194.40.240.12:123 (194.40.240.12).
Feb 5 11:09:43 unkn0wn27-X550VX dockerd[8188]: time="2020-02-05T11:09:43.530168634+02:00" level=warning msg="8f0463438568dab68c318d3fb928d800b9ca6ec99a918bb06bf8aea4886efa48 cleanup: failed to unmount IPC: umount /var/lib/docker/containers/8f0463438568dab68c318d3fb928d800b9ca6ec99a918bb06bf8aea4886efa48/mounts/shm, flags: 0x2: no such file or directory"
I only spotted these lines:
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.746817] docker0: port 2(vethb213531) entered disabled state
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.753883] device vethb213531 left promiscuous mode
Feb 5 11:09:43 unkn0wn27-X550VX kernel: [ 1992.753893] docker0: port 2(vethb213531) entered disabled state
And this line:
Feb 5 11:09:43 unkn0wn27-X550VX NetworkManager[1280]: <info> [1580893783.3528] device (vethb213531): released from master device docker0
Not sure if that helps my case.
UPDATE 3:
A work around solution is to constantly write the command sudo ip addr add 172.17.0.1/16 dev docker0.
The problem was that Docker not keeping it's IPV4 address.
All I had to do was open /etc/systemd/network/mynet.network, and add these 2 lines:
[Match]
Name=docker0
[Link]
Unmanaged=yes
Restart systemctl restart systemd-networkd and systemctl restart docker.
All credits for this solution found here: https://vadosware.io/post/a-reliable-fix-to-docker-not-keeping-its-ipv4-address-on-arch/

Unsuccessful build on gitlab runner

Off recently we are facing the below issue while performing a CI/CD build from gitlab runner.
Below is the log snippet from /var/log/syslog.
pr 22 03:02:04 cirunner dockerd[1103]: time="2019-04-22T03:02:04.136857571Z" level=error msg="Handler for DELETE /v1.18/containers/runner-301e5f4d-project-786-concurrent-0-build-4 returned error: No such container: runner-301e5f4d-project-786-concurrent-0-build-4"
Apr 22 03:02:04 cirunner kernel: [1616845.656927] aufs au_opts_verify:1597:dockerd[1568]: dirperm1 breaks the protection by the permission bits on the lower branch
Apr 22 03:02:04 cirunner kernel: [1616846.186616] aufs au_opts_verify:1597:dockerd[1568]: dirperm1 breaks the protection by the permission bits on the lower branch
Apr 22 03:02:05 cirunner kernel: [1616846.383784] aufs au_opts_verify:1597:dockerd[1568]: dirperm1 breaks the protection by the permission bits on the lower branch
Apr 22 03:02:05 cirunner systemd-udevd[1187]: Could not generate persistent MAC address for veth0675b93: No such file or directory
Apr 22 03:02:05 cirunner kernel: [1616846.385245] device veth8b64bcd entered promiscuous mode
Apr 22 03:02:05 cirunner kernel: [1616846.385299] IPv6: ADDRCONF(NETDEV_UP): veth8b64bcd: link is not ready
Apr 22 03:02:05 cirunner systemd-udevd[1188]: Could not generate persistent MAC address for veth8b64bcd: No such file or directory
Apr 22 03:02:05 cirunner kernel: [1616846.788755] eth0: renamed from veth0675b93
Apr 22 03:02:05 cirunner kernel: [1616846.804716] IPv6: ADDRCONF(NETDEV_CHANGE): veth8b64bcd: link becomes ready
Apr 22 03:02:05 cirunner kernel: [1616846.804739] docker0: port 3(veth8b64bcd) entered forwarding state
Apr 22 03:02:05 cirunner kernel: [1616846.804747] docker0: port 3(veth8b64bcd) entered forwarding state
Apr 22 03:02:20 cirunner kernel: [1616861.819201] docker0: port 3(veth8b64bcd) entered forwarding state
Apr 22 03:37:13 cirunner dockerd[1103]: time="2019-04-22T03:37:13.298195303Z" level=error msg="Handler for GET
/v1.18/containers/6f6b71442b5bbc70f980cd05272c8f05d514735f39e9b73b52a094a0e87db475/json returned error: No such container: 6f6b71442b5bbc70f980cd05272c8f05d514735f39e9b73b52a094a0e87db475"
Could you please help me out what exactly is the issue and how can to trouble shoot.
Let me know if you require additional details from my side.

Resources