Networking issues on boot. Fail to get IP address

After having failed updates with the December release, I decided to do a fresh install of OSMC today on my RPi3.

However, after the fresh install I find OSMC fails to apply the IP offered via DHCP. This results in a 169 address. The workaround has been to pull the networking cable and re-attach it. After this, OSMC will quite happily apply the address and has IP connectivity.

I’ve also tried assigning a static IP, but this too has network connectivity issues. Despite “System > System Info” showing the static IP, it has no IP connectivity.

So I’m a bit stumped on what to do, as I’ve not very experienced with connman. To statically assign an IP, I did:

osmc@osmc:~$ sudo cat /var/lib/connman/ethernet_b827eb402ea2_cable/settings
[ethernet_b827eb402ea2_cable]
Name=Wired
AutoConnect=true
Modified=2018-02-05T10:59:19.677299Z
IPv4.method=dhcp
IPv6.method=off
IPv6.privacy=disabled
IPv4.netmask_prefixlen=24
IPv4.local_address=192.168.1.60
IPv4.gateway=192.168.1.254
IPv4.DHCP.LastAddress=192.168.1.60

logs: https://paste.osmc.tv/oxeyetupej

Actually I’ve just notice one blunder.

Ipv4.method above should be manual, not dhcp.

I’ve just done several reboots, and I seem to have IP connectivity after doing this… However, this still doesn’t solve the problem I’ve had where the Pi just won’t get an IP via DHCP on boot.

I’ve found the OSMC networking wizard to be quite flakey when it comes to going between static and DHCP, hence why I was trying to do this using connman.

Any potential thoughts on what I should do if I put this back to DHCP?

Hi,

Have you got wait for network enabled in myosmc?

Thanks Tom.

Your router is providing an IP address:

Feb 05 23:02:02 osmc avahi-daemon[263]: Registering new address record for 192.168.1.60 on eth0.IPv4.
Feb 05 23:02:02 osmc connmand[262]: ipconfig state 3 ipconfig method 1
Feb 05 23:02:02 osmc connmand[262]: eth0 {add} route fe80:: gw :: scope 0 <UNIVERSE>
Feb 05 23:02:02 osmc connmand[262]: eth0 {add} address 192.168.1.60/24 label eth0 family 2
Feb 05 23:02:02 osmc connmand[262]: eth0 {add} route 192.168.1.0 gw 0.0.0.0 scope 253 <LINK>
Feb 05 23:02:02 osmc connmand[262]: eth0 {add} route 192.168.1.254 gw 0.0.0.0 scope 253 <LINK>
Feb 05 23:02:02 osmc connmand[262]: eth0 {add} route 0.0.0.0 gw 192.168.1.254 scope 0 <UNIVERSE>
Feb 05 23:02:02 osmc connmand[262]: eth0 {del} route fe80:: gw :: scope 0 <UNIVERSE>
Feb 05 23:02:02 osmc connmand[262]: eth0 {add} route 0.0.0.0 gw 192.168.1.254 scope 0 <UNIVERSE>
Feb 05 23:02:02 osmc connmand[262]: eth0 {add} route 192.168.1.0 gw 0.0.0.0 scope 253 <LINK>
Feb 05 23:02:02 osmc connmand[262]: eth0 {add} route 192.168.1.254 gw 0.0.0.0 scope 253 <LINK>

but you have no access to the Internet and the connection gets dropped.

I suggest you try a new cable and/or port on the router.

It might also be an issue with the router. What’s the router?

1 Like

Thanks for having a look at my logs.

I’ve tried troubleshooting this again tonight.

I suggest you try a new cable and/or port on the router.
It might also be an issue with the router. What’s the router?

Have tried different ports however this doesn’t make a difference. I don’t think there’s an issue with the router (Fritzbox 7360) as no other connected devices exhibit this problem.

Probably 1/3 attempts fails. As you say, connmand seems to be adding the relevant routes:

Feb 24 20:47:08 osmc connmand[303]: ipconfig state 3 ipconfig method 1
Feb 24 20:47:08 osmc connmand[303]: eth0 {add} address 192.168.1.60/24 label eth0 family 2
Feb 24 20:47:08 osmc connmand[303]: eth0 {add} route 192.168.1.0 gw 0.0.0.0 scope 253 <LINK>
Feb 24 20:47:08 osmc connmand[303]: eth0 {add} route 192.168.1.254 gw 0.0.0.0 scope 253 <LINK>
Feb 24 20:47:08 osmc connmand[303]: eth0 {add} route 0.0.0.0 gw 192.168.1.254 scope 0 <UNIVERSE>
Feb 24 20:47:13 osmc connmand[303]: Online check failed for 0x564e8838 Wired

However as per last log, connectivity fails.

As per above, I’m setting the IP address statically.

From ifconfig’s perspective the address is added correctly, so I’m currently stumped where to check next.

I suspect an issue in connman, but I’m not as familiar with it as Ubuntu’s /etc/network/interfaces method of assigning addresses.

Any thoughts what else to try?

For reference in connman I have configured:

osmc@osmc:~$ sudo cat /var/lib/connman/settings
[global]
OfflineMode=false

[WiFi]
Enable=false
Tethering=false

[Wired]
Enable=true
Tethering=false

[Bluetooth]
Enable=false
Tethering=false
osmc@osmc:~$ sudo cat /var/lib/connman/ethernet_b827eb402ea2_cable/settings
[ethernet_b827eb402ea2_cable]
Name=Wired
AutoConnect=true
Modified=2018-02-24T07:49:58.287318Z
IPv4.method=manual
IPv6.method=off
IPv6.privacy=disabled
IPv4.netmask_prefixlen=24
IPv4.local_address=192.168.1.60
IPv4.gateway=192.168.1.254
IPv4.DHCP.LastAddress=192.168.1.60
Nameservers=192.168.1.254;

Hi,

I would try a different network cable as dilthedog suggested, if you haven’t already.

My only other thought is that another device on your network may have the 192.168.1.60 ip address.

Thanks Tom.

Yep, have already tried another cable.

I can also confirm no other devices on the network have 192.168.1.60.

This has had me pretty stumped. I do have another Pi3 here, so might try some testing with a new image again tomorrow on that one and see results…

Are you manually editing this file? (You shouldn’t be. Connman settings should be changed using connmanctl.)

What’s the current output from running

connmanctl services ethernet_b827eb402ea2_cable

I’d also recommend trying DHCP one more time:

connmanctl config ethernet_b827eb402ea2_cable --ipv4 dhcp

and then reboot.

This is so weird, but my issue is possibly sorted…

I spent some time today trying to narrow things down, and it is possible the issue was my Fritzbox 7360.

Basically I tried:

  • Multiple network cables
  • Multiple routers
  • Multiple raspberry PIs
  • 2 different images of OSMC

Low and behold, I could reproduce the issue on my other raspberry pi, with a fresh install of OSMC. I was going to try another image not using connman, however this looks like it wasn’t needed because I then tried another router instead.

I couldn’t reproduce the issue on the other router with either raspberry PI.

It just so happens that I acquired a cheap Fritzbox 7490 today too, and thus far having no issues on that (same cables), so I really can only point to the Fritzbox 7360 I have…

Has me completely stumped, as the layer 1/2 connectivity also looked fine (using ethtool).

Anyway - Hopefully this is the last of my problems… :slight_smile: