Skip to content

[network] Network Binding things are slow to start from OH 4.1 #17956

Description

@rheos13

Since I upgraded from 4.1, without making any changes to my environment, I've started experiencing delays in initializing network stuff. I've checked all the binding information and it's all in accordance with it.
I have a feeling that it only affects OH installations of Windows, but I haven't found much information about complaints in the general forums.

Expected Behavior

In OH 4.1 and earlier, there were no delayed Initializing handler logs, and the full startup of OH was fast (2-3 min)

Current Behavior

Initializing handler is abnormally long. In this log it takes approximately 14 min

2024-12-20 21:15:39.092 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:movil_yol' takes more than 5000ms.
2024-12-20 21:16:20.347 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:movil_jesus' takes more than 5000ms.
2024-12-20 21:17:01.621 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:movil_camino' takes more than 5000ms.
2024-12-20 21:17:42.906 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:sony_bravia' takes more than 5000ms.
2024-12-20 21:18:24.162 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:aio_lan' takes more than 5000ms.
2024-12-20 21:19:05.440 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:aio_yol_wifi' takes more than 5000ms.
2024-12-20 21:19:46.730 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:portatil_yol_wifi' takes more than 5000ms.
2024-12-20 21:21:50.529 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:ps4_lan' takes more than 5000ms.
2024-12-20 21:22:31.803 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:ps4_wifi' takes more than 5000ms.
2024-12-20 21:23:13.066 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:tvbox_cine_lan' takes more than 5000ms.
2024-12-20 21:23:54.347 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:rm4_acsalon' takes more than 5000ms.
2024-12-20 21:24:35.637 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:rm4_gris' takes more than 5000ms.
2024-12-20 21:25:16.917 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:rm4_telecocina' takes more than 5000ms.
2024-12-20 21:25:58.206 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:rm4_marron' takes more than 5000ms.
2024-12-20 21:26:39.468 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:rm4_verde' takes more than 5000ms.
2024-12-20 21:27:20.740 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:rm4_telesalon' takes more than 5000ms.
2024-12-20 21:28:02.029 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:openmqttgatewaysensors' takes more than 5000ms.
2024-12-20 21:28:43.261 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:openmqttgatewaybeacons' takes more than 5000ms.
2024-12-20 21:29:24.502 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:openmqttgatewaybeacons2' takes more than 5000ms.
2024-12-20 21:30:05.808 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'network:pingdevice:xiaomicamera' takes more than 5000ms.

Possible Solution

  1. Start OH 4.3 without network binding and install it after boot with an external script. This does not solve the problem but it does get the whole environment to boot quickly.
  2. Stop using network binding an create rule using ‘actions.Ping.checkVitality’ If only use the network bindind for that.

Steps to Reproduce (for Bugs)

  1. Install OH 4.3 for Windows
  2. Install network Binding
  3. Create network.things file with 20 things and items file.
  4. start OH
  5. Review the logs

Context

In versions higher than 4.1 it was annoying due to the warning logs, in version 4.3 until the initialization of all network bindings is finished it does not load the rest of the rules (this does not always happen). This means that a restart can last 2 minutes (without binding) or 12 minutes due to network binding.

Your Environment

I have performed all possible test combinations:
OH 4.2, 4.2.2, 4.2.3, 4.3
Toshiba Laptop - W10 PRO
HP PC - W10 HOME
Dell Thin Client - W10 PRO
HP Thin Client - W11 PRO
... in all cases with the same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior of an add-on

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions