[SOLVED] No internet connection after december update

Hi everybody!

I was really happy with OSMC. A couple of days ago, a new update was made available for my Raspberry Pi box. I have been waiting a couple of days to install it because I was afraid, it would break my system.

Today I finally decided to update the system. I took approx. 1h15m to update but everything went well… until I realized that I dont have connection to internet anymore. When I type “ping www.google.com” it comes an error and the machine is not able to connect to any internet site. I have no connection at all. So all Kodi plugins that rely on Internet are not working anymore. The only thing that it is working is the LAN connection to other servers within my network.

My connection to internet is fine (I am sending this message with my laptop) and all other machines have no issues. I also checked the internet connection of my Raspberry Pi before making the update and everything was fine.

Can you please help me?

Thanks a lot!

Best regards,

Ricardo.

Well not that easy without internet access. But considering that LAN is working I assume you still can reach the device via SSH can you post the output of this commands:

ifconfig
route -n
ping <PUT HERE THE IP THAT IS SHOWN IN THE OUTPUT BEHIND 0.0.0.0>
ping 8.8.8.8
host www.google.com
cat /etc/resolv.conf

Hi! First of all, thanks for the quick answer. Here you are the output of these commands:

osmc@osmc:~$ ifconfig
eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.0.6  netmask 255.255.255.0  broadcast 192.168.0.255
        ether b8:27:eb:25:32:ff  txqueuelen 1000  (Ethernet)
        RX packets 27524  bytes 3866163 (3.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 27326  bytes 3370670 (3.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 30774  bytes 2793520 (2.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 30774  bytes 2793520 (2.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

osmc@osmc:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    202    0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0
192.168.0.1     0.0.0.0         255.255.255.255 UH    0      0        0 eth0
osmc@osmc:~$ ping 192.168.0.0
Do you want to ping broadcast? Then -b. If not, check your local firewall rules.
osmc@osmc:~$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=1.02 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.809 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.792 ms
^C
--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.792/0.874/1.022/0.107 ms
osmc@osmc:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=13.0 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=13.1 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 13.084/13.111/13.139/0.117 ms
osmc@osmc:~$ host www.google.com
;; connection timed out; no servers could be reached
osmc@osmc:~$ cat /etc/resolv.conf 
# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
nameserver 127.0.0.1
# /etc/resolv.conf.tail can replace this line
osmc@osmc:~$ 

I hope you can help me. Thanks!

Best regards,

Ricardo.

Ok so I assume you use DHCP to configure your network, or?
The problem is somehow now DNS Server is configured or better to say the local machine is your DNS Server.

Did you install any network-manager or VPN solution?
I suggest to try to configure your Network Settings manually to see if you can get connected again to then be able to upload logs so we find out whats going on/

Looks like your DHCP server is not assigning a DNS IP address. Or previously your OSMC was running its own dns server. Resolv conf is pointing to local box.

Try changing this to your routers IP or Google’s DNS
File: /etc/resolv.conf
nameserver 192.168.0.1
or
nameserver 8.8.8.8

0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    202    0        0 eth0

The routing table has two default gateways.

# Generated by dhcpcd from eth0.dhcp

You’ve installed dhcpd, which will conflict with ConnMan. Are you running PiHole, by any chance?

1 Like

Thanks to @fzinken and to @gmc!!

I just changed the /etc/resolv.conf file to:

nameserver 8.8.8.8

and now it works!!! I don’t know why this file was changed, but now I have internet connection again!!!

Thanks very much!

But not for long, as @dillthedog wrote you have installed a package that breaks OSMC network. Remove that package

Manually editing /etc/resolv.conf will not last. Even if you didn’t have dhcpd installed (which you shouldn’t) connman will overwrite resolv.conf next time you connect to the network. If you need to manually specify dns you should do it either via my osmc->network or from the command line using connmanctl.

You were right. The solution does not last. I don’t have dhcpd installed and I don not need to specify manually a dns. How I can just make the change nameserver 8.8.8.8 last? Thanks!

This would be a manual specification of your DNS.

Well, you are right, but if I look at my_osmc -> Network, the specified DNS is 198.168.0.1, which is my router (it’s correct). But if I reboot, the file /etc/resolv.conf is changed to nameserver 127.0.0.1, which is not correct… Who is changing the configuration?

You need to explain why you have dhcpd installed, which is causing problems.

As I asked earlier, did you install something like PiHole on the Pi?

I don’t have dhcpd installed:

osmc@osmc:~$ sudo apt-get purge udhcpd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'udhcpd' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

And:

osmc@osmc:~$ sudo apt-get purge dhcpd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'udhcpd' instead of 'dhcpd'
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

I think I installed once pihole but now if I run:

osmc@osmc:~$ sudo pihole uninstall
sudo: pihole: command not found

So I suppose that this program is not installed anymore.

Does it make any sense? This error is happening only after I updated the last time. I had already booted the Raspberry Pi many times before and with the November version of OSMC this problem didn’t occur.

Thanks for the help!

Something is messing with /etc/resolv.conf. What’s the output from:

dpkg -l | grep dhcp
1 Like
osmc@osmc:~$ dpkg -l | grep dhcp
ii  dhcpcd5                               6.10.1-1                          armhf        DHCPv4, IPv6RA and DHCPv6 client with IPv4LL support

There you go. PiHole also installs dhcpcd5. You need to run sudo apt-get purge dhcpcd5.

1 Like

Now it’s working!!! I just removed dhcpcd5 and now it is keeping the cannman configuration after reboot!

Thanks guys! You are the best! :slight_smile:

To all the OSMC and Pihole fans: here’s what I did to use both [SOLVED] -bash: pihole: command not found - #9 by tepeer - Help - Pi-hole Userspace

Edit: it’s good to change logs location according to

Get some old, small usb stick and stop killing your sdcard.

1 Like