-1

Very new at this, so forgive my ignorance; I have portainer container running in docker on my Pi 'Model B. al was working fine and suddenly I cannot go on internet (altough connected via either eth or wlan) through my pi. On my laptop i have wifi. I have a "strange interface" which is called currently vethc7e2903 (as it changes). what is veth and how to disable this i think it is stealing my connection?? It shows the same ip address as wlan0.

Please help me

Thanks!!

Update from a comment:
The strange interface is on my pi. On my mac I can connect to the internet. Meaning that the internet itself is not the problem.

4
  • so, this "strange interface" is on the laptop? If not, then I fail to see the relevance of the "On my laptop i have wifi" statement, as it is in no way related to anything you've said Commented Jun 11, 2020 at 2:42
  • @JaromandaX, On my laptop i have wifi ... i think that it is a confirmation that the WiFi has been checked and is functional
    – jsotola
    Commented Jun 11, 2020 at 3:52
  • @jsotola - yeah, it kinda does I guess Commented Jun 11, 2020 at 4:07
  • The strange interface is on my pi. On my mac I can connect to the internet. Meaning that the internet itself is not the problem. sorry for not being clear Commented Jun 11, 2020 at 7:18

1 Answer 1

0

From Reddit (not my post, thanks u/Cuban_Cigar):

This will sound crazy, but I believe its a DHCP issue. Reason is I dealt with this more than I would like to admit with a Pi4, 8GB of RAM and an m.2 SSD, so no SD Card. Your explanation and information sounds identical to my scenario.

The fix, deny the veth interfaces from being assigned by the pi host via dhcpcd and allow docker to handle it.

sudo vi /etc/dhcpcd.conf

Then add the following line to the bottom:

denyinterfaces veth*

Restart DHCPCD service

systemctl restart dhcpcd

If you want to confirm this is the issue BEFORE making changes, what I did was I changed the lease on my DHCP server (in my case my router which looks like your setup as well) to something like 5 minutes. I would setup a second terminal and ping pi constantly, sure enough after about 5 minutes it would stop pinging, I could not SSH in, could not do DNS resolution from pihole as that was one of the containers on mine as well. Reboot and issue was gone, until 5 minutes later. My DHCP lease was 24 hours which is the typical default, sound familiar ;)

For reference, I had pihole, wireguard and about 10 other containers all running on a user defined network which I believe plays a part in this (see you are doing the same).

I wont claim to be an expert but my understanding is that with the latest raspbian there is an issue with the DHCP service getting flooded with requests on docker containers startup. The service fails to assign the IPs at the host level and dhcpcd service fails (you can do systemctl status dhcpcd and you will see errors) but keeps running. When the leases expire, it cannot renew the IP and the avahi daemon will just basically say "well this IP looks old" and basically remove it. I fought with this legitimately for months and many times I threw up my hands and moved to different hardware until I came back figured this out. Here is a reference to a thread that ultimately lead to this solution for me, here is hoping this is the solution for you.

https://forums.raspberrypi.com/viewtopic.php?t=308463

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.