Skip to content

LinuxNetworkInterface.GetLinuxNetworkInterfaces - An invalid IP address was specified. #49515

Closed

Description

@BaronGreenback

.NET 5

Got this error reported today: jellyfin/jellyfin#5454

Today I updated my NAS (Helios Kobol64 Armbian 10 Buster aarch64). After the upgrade from 10.6. to 10.7.0 I wasn't able to start Jellyfin anymore.

Mär 11 07:47:40 kobold jellyfin[4209]: [07:47:40] [FTL] [1] Main: Unhandled Exception Mär 11 07:47:40 kobold jellyfin[4209]: System.ArgumentException: An invalid IP address was specified. (Parameter 'address') Mär 11 07:47:40 kobold jellyfin[4209]: at System.Net.IPAddress..ctor(ReadOnlySpan1 address)
Mär 11 07:47:40 kobold jellyfin[4209]: at System.Net.NetworkInformation.LinuxNetworkInterface.GetLinuxNetworkInterfaces()
Mär 11 07:47:40 kobold jellyfin[4209]: at Jellyfin.Networking.Manager.NetworkManager.InitialiseInterfaces()
Mär 11 07:47:40 kobold jellyfin[4209]: at Jellyfin.Networking.Manager.NetworkManager.UpdateSettings(Object configuration)
Mär 11 07:47:40 kobold jellyfin[4209]: at Jellyfin.Networking.Manager.NetworkManager..ctor(IConfigurationManager configurationManager, ILogger1 logger) Mär 11 07:47:40 kobold jellyfin[4209]: at Emby.Server.Implementations.ApplicationHost..ctor(IServerApplicationPaths applicationPaths, ILoggerFactory loggerFactory, IStartupOptions options, IConfiguration startupConfig, IFileSystem fileSystem, IServiceCollection serviceCollection) Mär 11 07:47:40 kobold jellyfin[4209]: at Jellyfin.Server.CoreAppHost..ctor(IServerApplicationPaths applicationPaths, ILoggerFactory loggerFactory, IStartupOptions options, IConfiguration startupConfig, IFileSystem fileSystem, IServiceCollection collection) Mär 11 07:47:40 kobold jellyfin[4209]: at Jellyfin.Server.Program.StartApp(StartupOptions options) Mär 11 07:47:40 kobold jellyfin[4209]: at Jellyfin.Server.Program.<Main>(String[] args)

He's posted the network settings on his device as

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:08:9b:f0:0b:a1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.207/24 brd 192.168.1.255 scope global enp3s0
       valid_lft forever preferred_lft forever
    inet6 fd00:0:0:1::207/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::1aff:c6f8:b727:b587/64 scope link 
       valid_lft forever preferred_lft forever
    inet6 fe80::208:2aff:feff:6739/64 scope link 
       valid_lft forever preferred_lft forever
3: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:08:9b:f0:0b:a2 brd ff:ff:ff:ff:ff:ff

ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 64:62:66:d0:05:ac brd ff:ff:ff:ff:ff:ff
    inet 192.168.109.10/24 brd 192.168.109.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.109.50/24 brd 192.168.109.255 scope global secondary dns
       valid_lft forever preferred_lft forever
    inet 192.168.109.51/24 brd 192.168.109.255 scope global secondary nfs
       valid_lft forever preferred_lft forever
    inet 192.168.109.52/24 brd 192.168.109.255 scope global secondary oscam
       valid_lft forever preferred_lft forever
    inet 192.168.109.53/24 brd 192.168.109.255 scope global secondary tvheadend
       valid_lft forever preferred_lft forever
    inet6 fe80::6662:66ff:fed0:5ac/64 scope link 
       valid_lft forever preferred_lft forever

3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 64:62:66:d0:05:ad brd ff:ff:ff:ff:ff:ff

Code starts at https://github.com/jellyfin/jellyfin/blob/8615847a8aba1f504b184e79907e6885215ffdaa/Jellyfin.Networking/Manager/NetworkManager.cs#L1051

Any ideas?

Activity

  1. transferred this issue fromdotnet/aspnetcoreon Mar 11, 2021
  2. ghost added
    untriaged
    on Mar 11, 2021
  3. added
    os-linux
    on Mar 12, 2021
  4. wfurt commented on Mar 12, 2021

    @wfurt
    Member

    I don't see anything suspicious in the output. I look at the IPAddress() ctor and it would throw ArgumentException only if the address length is neither IPv4 nor IPv6. Matching PAL code uses only those two constant. So that is curious.

    I think the way to debug would be creating simple self-contained app that only gets the interfaces and step through in debugger. Since this is ARM, I'm wondering if there is alignment issue...

  5. karelz commented on Mar 18, 2021

    @karelz
    Member

    @BaronGreenback can you please try to debug it? If we know the root cause (e.g. alignment as @wfurt suggested above), we can help with a fix.
    There does not seem much we can do from the information provided above.

  6. added and removed
    untriaged
    on Mar 18, 2021
  7. added this to the 6.0.0 milestone on Mar 18, 2021
  8. BaronGreenback commented on Mar 18, 2021

    @BaronGreenback
    Author

    @BaronGreenback can you please try to debug it? If we know the root cause (e.g. alignment as @wfurt suggested above), we can help with a fix.
    There does not seem much we can do from the information provided above.

    The error isn't produced on my kit - it's a bug report from one of our users. - I'll put something together for him - based on the original dotnet source to see if i can get some output.

  9. BaronGreenback commented on Mar 25, 2021

    @BaronGreenback
    Author

    Just updating - wrote some code for the user, that outputs the info it's receiving from

    [DllImport("libSystem.Native", EntryPoint = "SystemNative_GetNetworkInterfaces")]
    public static unsafe extern int GetNetworkInterfaces(ref int count, ref NetworkInterfaceInfo* addrs, ref int addressCount, ref IpAddressInfo* aa);

    It looks like its getting all zero's for the address. Have modified the test code again - and asked for it to be re-run.

    Will let you know the outcome.

  10. wfurt commented on Mar 25, 2021

    @wfurt
    Member

    thanks for update. Is addressCount set and does it match expected address count? (should be sum of IPv4 & IPv6 address)

  11. BaronGreenback commented on Mar 26, 2021

    @BaronGreenback
    Author

    It's come back with 4 interfaces. There are 5 on the system , but i don't know if the last one would have an entry.

    lo: 1 IPv4, 1 IPv6
    eth0: 5 IPv4, 1 IPv6
    eth1: not configured, not connected.

  12. BaronGreenback commented on Mar 28, 2021

    @BaronGreenback
    Author

    ip a

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever

    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 64:62:66:d0:05:ac brd ff:ff:ff:ff:ff:ff
    inet 192.168.109.10/24 brd 192.168.109.255 scope global eth0
    valid_lft forever preferred_lft forever
    inet 192.168.109.50/24 brd 192.168.109.255 scope global secondary dns
    valid_lft forever preferred_lft forever
    inet 192.168.109.51/24 brd 192.168.109.255 scope global secondary nfs
    valid_lft forever preferred_lft forever
    inet 192.168.109.52/24 brd 192.168.109.255 scope global secondary oscam
    valid_lft forever preferred_lft forever
    inet 192.168.109.53/24 brd 192.168.109.255 scope global secondary tvheadend
    valid_lft forever preferred_lft forever
    inet6 fe80::6662:66ff:fed0:5ac/64 scope link
    valid_lft forever preferred_lft forever

    3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 64:62:66:d0:05:ad brd ff:ff:ff:ff:ff:ff

  13. 4 remaining items

  14. modified the milestones: 6.0.0, Future on May 6, 2021
  15. ghost closed this as completedon Nov 5, 2021
  16. modified the milestones: Future, 7.0.0 on Nov 23, 2021
  17. ghost locked as resolved and limited conversation to collaborators on Dec 23, 2021
  18. added
    needs-author-action
    and removed on Jan 19, 2022
  19. added
    in-pr
    on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Netin-prneeds-author-actionos-linux

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions