openhab-addons: [network] (Docker) Still massively slowing down boon when extended default-adress-pools are used in /etc/docker/daemon.json

Expected Behavior

When openHAB boots, the pingdevices shall be initialized relatively quickly. The network-binding-things should be editable when clicking on them and not be loading forever. The network-binding should not slow down other things to be discovered/initialized

Current Behavior

Sorry for re-opening this, already referenced in:

As seen/documented in the linked discussions im pretty sure, that the combination

  • using the network-binding
  • configuring openHAB with network_mode: host
  • using a extended docker-daemon default-address-pool causes the network binding to scan/ping a extremely high range of IP addresses which results in CPU-load and/or delays in boot and usage.

I even upgraded my server recently to basically a gaming PC hardware and even then i am experiencing

  • network-devices need a extremely long time to initialize (like 10 minutes) after boot
  • these network-things are not accessible via MainUI --> Only loading skeleton can be seen
  • this seems to slow down other things like mqtt binding/things too

I deinstalled the network binding and everything is fine

Possible Solution

Not sure, because all of this was already discussed in the other topics but the result overall was something like “with the current version things should be better”

To repeat already discussed solutions:

  • Possibility to limit/configure the relevant IP adress range in the network binding
  • Using the “primary” address from mainUI settings

I have no advanced knowledge in all of these things but i feel like there could be something like a additional setting in the “advanced” section of the network-binding, extremely reducing the amount of scanned IPs to a normal range

My Hardware is way too overpowered for openHAB but this is significantly slowing down boot and interfering with the general openHAB stability

Steps to Reproduce (for Bugs)

  1. Use openHAB docker in network_mode: host
  2. Install network binding
  3. Extend default-address-pool
  4. Boot

Context

daemon.json

{
   "default-address-pools": [
        {
            "base":"172.17.0.0/12",
            "size":16
        },
        {
            "base":"192.168.0.0/16",
            "size":20
        }
    ]
}

Your Environment

  • Version used: openHAB 4.2.0.M3
  • Environment name and version (e.g. Chrome 76, Java 8, Node.js 12.9, …): Firefox 126.0
  • Operating System and version
$ cat /etc/os-release
NAME="Fedora Linux"
VERSION="40.20240416.3.1 (CoreOS)"
ID=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora CoreOS 40.20240416.3.1"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:40"
HOME_URL="https://getfedora.org/coreos/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-coreos/"
SUPPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
BUG_REPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=40
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=40
SUPPORT_END=2025-05-13
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='40.20240416.3.1'

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 26 (13 by maintainers)

Most upvoted comments

Would you be able to get a debug log for the full 10-15 mins of the slow start for the binding?

Hello dear developers!

It’s me! Help me!

openHAB versions 4.1.0 and previous ones work great and do not cause any problems. When I update to 4.1.1, 4.2.0 or any other versions (including snapshot and milestone), I always get a problem with Network Binding.

I’ve been struggling with network binding for 7 months now!!! I need a doctor!

My system: ASUS PN41 PE (PentiumSilver N6000 1.10GHz /8GB RAM/SSD) / WinSrv2022 Latest OHv4.2.0, AzuleJDK v17 Latest, Mosquitto v2.0.18, Z2M v1.39.0, PosgeSQLv14.10 + rrd4j (oh bult-in)

IP address 192.168.13.5/24 [eth5] is selected in openHAB (IPv6 is disabled), the broadcast address 192.168.13.255 is specified.

The system has LAN and WIFI adapters installed. The server is connected to the network via LAN. The server also has the Hyper-V (Virtual Machines) role installed, so there are two virtual adapters: one for the internal network of virtual machines and the second, this is a virtual one over a physical LAN (The system works through this adapter. Standard connection for Hyper-V).

2024-07-25_134728

Through network binding I monitor the state:

  1. Internet connection status (server ping by dns name)
  2. Status of hosts on the network: computers, TVs, routers, smart devices - total 26 devices (ping device IPб)
  3. The status of services on the server - 9 (sql server, mail server, zigbee2mqtt and others). Connection to application port (server machine local ip 127.0.0.1).

Some Network Binding things 2024-07-25_122543

Netwok Device common config 2024-07-25_122653

Server service standart config 2024-07-25_122628

What works wrong in network binding:

  1. If the WIFI adapter and/or the internal network adapter of virtual machines is enabled, then initialization of openHAB (System reached start level 100) after startup takes up to 5 minutes (if you specify the interface through which to ping devices) and up to 10-15 minutes (if you do not specify the interface).
  2. When the specified network adapters are enabled, the properties of the things are opened very slowly through the web interface. At least 5-6 seconds (or more).
  3. When pinging or connecting to a port (service discovery), the OFF state is often detected, although it should be ON. In version 4.1.0 everything is stable; in newer versions, determining the state of the host/service does not work correctly (random OFF state). The state of other (WI-FI or Virtual Machine adapters) adapters does not matter - the problem always remains.

Temporarily I disabled unnecessary network adapters. In the settings of things, I specified interface eth5 (for network devices) or lo0 (for services on the server) on which they should work.

2024-07-25_122412

Now the openHAB v4.2.0 loads and shows the state of things (of network binding) quickly, (unnecessary network adapters are turned off!), but determines the state of hosts and services is not stable (many OFF states).

v4.1.0 (was fine) and v4.2.0 (random OFF). Solid is ON, empty if OFF 2024-07-25_134218_1

v4.2.0 (image enlarged for convenience) 2024-07-25_134312_2

I do not know what to do. I would like to use the latest version of the system, and not stay on 4.1.0. Maybe I can help somehow? Well, help!

My old topic for 4.1.1 update

Currently i deinstalled the Network binding and i am sending my magic packets via node-red

Can you just give me a very quick description/link on what to try? I tired to follow your link and look at the PR but not sure how i should try it.

Is it

  1. Re-install network binding
  2. Limit IP-Ranges in network binding settings
  3. Try

I would love to be able to set a network address range

  1. Your subnets are huge. The /12 has 1 million addresses I can’t think of why you want it that large in a private setting. /24 or /22 is usually enough. The second one is also huge /16. I would expect more issues sooner or later that have nothing todo with openHAB.
  2. the added configuration option is documented. You can set/limit the interfaces in the thing configuration, it depends where if you use UI or file based config.

You can limit the interfaces to use in the Advanced settings of your Thing:

config