OSMC on Pi Connects to Network but Kodi Doesn't

I just got home from a long vacation. I had been running OSMC Alpha 4 on a Model B Pi. It is wired to an Airport express. OSMC and Kodi have been working fine. Watched videos all afternoon.

After the video session I downloaded RC 2 and installed it. It seemed fine. I can SSH into it and connect via SFTP. I copied over the necessary userdata files to connect to my shared MySQL Library and Media files, both of which are hosted on a MacMini.

Unfortunately, OSMC cannot connect to the network, so it doesn’t see the shared library or the media files.

When I go to MyOSMC -> Network, It shows a Wired connection but that the adapter is disabled. Attempting to enable it causes a short “Busy - Please Wait” notice but the adapter remains disabled.

The last entry in kodi.log is this one:

17:12:32 T:2885100576   DEBUG: Skin Widgets: Total time needed to request random queries: 0:00:07.979773

This is very odd, because I didn’t start fooling with this until about 17:20. But there are no log entries for my trying to enable the adapter, etc.

I should note that I also installed RC2 on a B+ this afternoon using the same installer. It works fine. OSMC connects to the network and is able to use the shared library and remote media files.

How do I fix this?

And, if anyone has the patience, please help me understand how the Raspbery Pi does have a network connection, but that OSMC does not.

I don’t suppose you tried to configure Static IP’s and then changed it back to DHCP ?

No, I did not. The router assigns static IPs to all devices on the LAN. No need to do that on each device.

Here’s sort of proof that the Pi is connected. SSH into the Pi and ping a known domain (my own).

osmc@osmc:~$ ping mgnewman.com
PING mgnewman.com (124.217.255.131): 56 data bytes
64 bytes from 124.217.255.131: seq=0 ttl=53 time=53.785 ms
64 bytes from 124.217.255.131: seq=1 ttl=53 time=53.898 ms

Could you reproduce the connection problems and then try uploading your logs with the log uploader ? (Assuming it will let you)

It won’t. What logs would you like to see? I can post to pastebin, but not until tomorrow. Happy Hour here in Thailand.

The Kodi log is here:

kodi.log

I don’t know where the other logs are. This page doesn’t help me find them:

Getting OSMC logs to diagnose problems

sudo journalctl | paste-log
2 Likes

Results of: sudo journalctl | paste-log

Just in case it might help:

osmc@osmc:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:76:02:e5  
inet addr:192.168.0.139  Bcast:192.168.0.255  Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fe76:2e5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST DYNAMIC  MTU:1500  Metric:1
RX packets:1412 errors:0 dropped:0 overruns:0 frame:0
TX packets:752 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 
RX bytes:1747071 (1.6 MiB)  TX bytes:75704 (73.9 KiB)

I decided to reinstall. No joy. Same problem. Pi connects to network just fine, OSMC does not.

Hi Buadhai,

first to avoid any confusion:
“Pi” = Raspberry Pi = A piece of hardware that runs software but doesn’t connect to any network
“OSMC” = Open Source Media Center = A combination of a OS (Debian Linux) with a Media Center running on top (Kodi).

I guess from what you are writing your Raspberry Pi running OSMC is connected to the network as you can access it via SSH but it seems Kodi can not connect to your Library on your network?
You might want to give us the information on which network (IP Address) your Mac Mini is. Reading thru your log besides the many disconnect there is one strange point you have “route 192.168.0.1 gw 0.0.0.0” while your IP address is 192.168.0.139/24. Seems your DHCP is distributing wrong routing information.

Cheers

Fred

This sounds to me like a routing problem.

What is the output of ‘route’

I would try the following:

sudo route add default gw ip-of-router

S

Can you try enabling the wait for network option in networking and reboot ?

If that doesn’t fix it could you try connecting your working Pi B+ to the same airport express and verify that it works ok there ? (I assume it is plugged in elsewhere)

Finally if the B+ works ok on the airport express could you try adding

total_mem=256

To its config.txt and rebooting to see if you can reproduce the problem ? When finished make sure you remove this line.

Sorry for writing OSMC when I meant Kodi.

Here’s the routing table from the Pi that is not working:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
google-public-d 192.168.0.1     255.255.255.255 UGH   0      0        0 eth0
cns1.3bb.co.th  192.168.0.1     255.255.255.255 UGH   0      0        0 eth0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
192.168.0.1     *               255.255.255.255 UH    0      0        0 eth0

Here is the routing table for the Pi that is working:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
google-public-d 192.168.0.1     255.255.255.255 UGH   0      0        0 eth0
cns1.3bb.co.th  192.168.0.1     255.255.255.255 UGH   0      0        0 eth0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
192.168.0.1     *               255.255.255.255 UH    0      0        0 eth0

Here’s the command that Sam asked me to try:

osmc@osmc:~$ sudo route add default gw 192.168.0.1
SIOCADDRT: File exists

The IP address of the Mac Mini is 192.168.0.75

I have already tried enabling “wait for network”. No joy.

When I have time, I will swap Airport Expresses. It seems odd, though, that the Airport Express would fail at exactly the same time as I upgraded from Alpha 4 or RC 2, doesn’t it?

However, this doesn’t look good, does it:

--- 192.168.0.139 ping statistics ---
37 packets transmitted, 29 packets received, 21.6% packet loss
round-trip min/avg/max/stddev = 1.471/142.344/3956.111/721.050 ms

Anyway, this may all be moot. I believe my wife will pick up my new Vero today which means the old Pi B and Airport Express can be retired.

based on the routing there shouldn’t been an issue. But the high packet loss is quite strange but should also not be a showstopper.
Suggest you let us know if you still have problems when you get the Vero or if you need this fixed as then I suggest we do some checking on PM

I moved the suspect Airport Express to the known good Pi/OSMC/Kodi. Everything woks fine; even when I set: total_mem=256. It still connects to the shared library and remote media files. It has Internet access.

I moved the known-good Airport Express to the failing Pi/OSMC/Kodi.
Still doesn’t work. I can SSH to OSMC, but Kodi has no network.

Edit: It seems like this is a problem worth solving; even if I no longer need to use this particular piece of hardware. Hard for the to relax without knowing exactly what went wrong.

Ok, can you detail that “Kodi has no network” a bit more. E.g. if you use youtube addon can you play youtube video? How are you adding your library (SMB/NFS/…)?

Kodi can’t do anything that requires a network connection. It cannot connect to the shared MySQL library or to the remote media volume. It cannot connect to YouTube. It cannot upload log files. It cannot connect to the App Store.

Media files are shared via NFS. The volume is on an external drive hanging off the Mac Mini. At this moment I am using the known-good Pi to watch a video on that drive.

I am very baffled by this. How is it that the OS has a network connection but Kodi does not?

Did you try swapping power adaptors as well ?

I disagree - 21.6% package loss for a small ping packets is horrendous.

This is going to make any TCP connection completely unreliable to the point of being unusable. This needs to be followed up to find why the packet loss is so bad and this is very likely the cause of the problem.

Change the Ethernet cable

Also dmesg will show you some interesting issues with networking.

S

Your router is the issue
it has nothing to do with your Pi or OSMC/Kodi.The default gateway isn’t forwarding DNS traffic externally, specifically for reserved IPs.