Score:1

Ubuntu 20.04.5 LTS Ethernet IP address disappears after boot

ss flag

I have installed my ASUS PC with Ubuntu 20.04.5 LTS. After I setup a python environment to run applications. It is plugged into my wifi box that is plugged to the router. I have internet through a local ip address to the ethernet port. Everything works fine.

However, when I reboot, it turns back on without access to the internet and the local ip address that I was previously connecting to is missing. This does not occur all the time. There have been a few times after reboot that there is still an internet connection/local ip address.

The problem seems to be it does not recognize the ethernet connection. Port is recognized on the Ubuntu/ASUS machine, but maybe not found in the wifi/router? Here is a screen shot of running ip addr after it has lost connection.

enter image description here

I have reinstalled Ubuntu multiple times in hopes that the reinstall would somehow fix the problem, but it seems that this loss of internet/ethernet/netplan keeps reoccurring after reboot and I don’t know where to look next.

I don't intend to reboot often but I don't want to have a server that cannot be rebooted ever with fear that I will lose my internet connection.

Any suggestions?

Here are other things I’ve considered:

  1. This is a similar problem: Netplan Interface Disappears on Ubuntu 20.04 -- > I do not understand solution if there is one in this post

  2. I’ve tried to configure a static IP address https://linuxize.com/post/how-to-configure-static-ip-address-on-ubuntu-20-04/

In my /etc/netplan/ there is only a file called 00-installer-config.yaml. I edit that based on the #2 article and here is what it looks like. But when i try to sudo netplan apply I get : sudo: netplan: command not found

enter image description here

guiverc avatar
cn flag
Have you changed the default `python3` version on your system, as if the default python3 is changed (`python3` is enabled by default as Ubuntu tools use it), you'll find all the tools that rely on `python3` will stop working, as they're coded for that default version. *Ubuntu 20.04 is the 2020-April release of Ubuntu, so it uses a now rather old version of python3, but it was still newish back on release in April 2020 (20.04)*
Terrance avatar
id flag
I am guessing that you are using Network Manager. Try running the following line and then reboot: `sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf` It creates a blank file that allows Network Manager to control the devices. To me it sounds like Network Manager may not be managing your devices so they are not coming up on reboot.
Costa rica avatar
ss flag
@Terrance: Inside my /etc/NetworkManger/ there is no conf.d, only dispatcher.d/ with one file hook-network-manager @guiverc: my environment set up includes removing the existing python3.8, installing python3.10, add `alias python=python3.10` to .profile Could my python changes be impacting netplan? Because netplan completely disappears at the same time I have this problem (reboot > local ip and port disappear).
Terrance avatar
id flag
I think I missed the part about the Python stuff and around the same time your Netplan stopped working as far as executing it goes. I don't know enough about Netplan since I don't use it anymore and went back to `ifupdown` since I prefer the Legacy stuff as I feel it works better. Here is a +1 to help you on your way. I hope that someone has experienced the same thing and knows how to fix it.
Costa rica avatar
ss flag
@guiverc: In the end it seems removing python3.8 was the problem. I have left 3.8 on and just installed python3.10 as well. Thank you! This is odd because I am pretty sure I have machines running the same OS where I wholesale removed python3.8 with python3.10 but maybe there was an update since those machines causes my problem. Terrance: I appreciate the help!
guiverc avatar
cn flag
Many Ubuntu tools (esp. user front ends & desktop utilities) rely on the default python. If you remove the default python3 (*version matters for code to work*) you risk features not working, or WORSE having them work incorrectly (*which can cause data corruption!*). You should not change the default python3 version if you value user features (*features/apps working*) & avoiding data corruption (*working incorrectly*)...
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.