Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZB2MQTT 2.2.0 cannot start Could not init sd_notify: Could not locate the bindings file #26946

Closed
Nardol opened this issue Apr 2, 2025 · 8 comments
Labels
problem Something isn't working

Comments

@Nardol
Copy link

Nardol commented Apr 2, 2025

What happened?

Since I updated to 2.2.0, the Zigbee2mqtt systemd service cannot run anymore. It worked just fine before.

What did you expect to happen?

I expected that it could run as before

How to reproduce it (minimal and precise)

Update to Zigbee2MQTT 2.2.0 on an installtion using the Linux installation method

Zigbee2MQTT version

2.2.0

Adapter firmware version

20240710

Adapter

Sonof dongle not ezsp

Setup

Zigbee2MQTT non-containerized on an Odroid N2+ under Raspbian, Node 22

Debug log

[02/04/2025 10:38:23] error: 	z2m: Could not init sd_notify: Could not locate the bindings file. Tried:
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/Debug/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/Release/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/out/Debug/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/Debug/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/out/Release/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/Release/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/default/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/compiled/22.14.0/linux/arm64/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/addon-build/release/install-root/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/addon-build/debug/install-root/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/addon-build/default/install-root/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/lib/binding/node-v127-linux-arm64/unix_dgram.node
@Nardol Nardol added the problem Something isn't working label Apr 2, 2025
@Nardol
Copy link
Author

Nardol commented Apr 2, 2025

Debug log related to this error is a follow:

[02/04/2025 11:55:16] error: 	z2m: Could not init sd_notify: Could not locate the bindings file. Tried:
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/Debug/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/Release/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/out/Debug/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/Debug/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/out/Release/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/Release/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/default/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/compiled/22.14.0/linux/arm64/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/addon-build/release/install-root/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/addon-build/debug/install-root/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/addon-build/default/install-root/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/lib/binding/node-v127-linux-arm64/unix_dgram.node
[02/04/2025 11:55:16] debug: 	z2m: Error: Could not locate the bindings file. Tried:
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/Debug/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/Release/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/out/Debug/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/Debug/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/out/Release/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/Release/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/build/default/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/compiled/22.14.0/linux/arm64/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/addon-build/release/install-root/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/addon-build/debug/install-root/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/addon-build/default/install-root/unix_dgram.node
 → /opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/lib/binding/node-v127-linux-arm64/unix_dgram.node
    at bindings (/opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/opt/zigbee2mqtt/node_modules/.pnpm/[email protected]/node_modules/unix-dgram/lib/unix_dgram.js:4:34)
    at Module._compile (node:internal/modules/cjs/loader:1554:14)
    at Object..js (node:internal/modules/cjs/loader:1706:10)
    at Module.load (node:internal/modules/cjs/loader:1289:32)
    at Function._load (node:internal/modules/cjs/loader:1108:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
    at cjsLoader (node:internal/modules/esm/translators:262:5)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:7)

Lines before and after are not related.

@Nardol
Copy link
Author

Nardol commented Apr 2, 2025

I can start Zigbee2MQTT by running `node index.js" by hand so until a solution can be found I started using a screen which is not a solution at all.

@Nardol

This comment has been minimized.

@Nardol
Copy link
Author

Nardol commented Apr 2, 2025

Since I (as it looks like) have restored my network by setting another channel, starting zb2mqtt, stopping, change back to the original channel then startarted again, I tried to rollback to 2.1.3.
Before the update, it worked, now, it restart in loop even with 1.1.3.

My systemd unit is the following:

Description=zigbee2mqtt
After=network.target mosquitto.service

[Service]
Environment=ZIGBEE2MQTT_DATA=/home/homeassistant/config/zigbee2mqtt
Environment=NODE_ENV=production
Environment=Z2M_WATCHDOG=default
Type=notify
ExecStart=/usr/bin/node index.js
WorkingDirectory=/opt/zigbee2mqtt
#StandardOutput=null
#StandardError=inherit
WatchdogSec=10s
Restart=always
RestartSec=10s
User=homeassistant
#CPUSchedulingPolicy=rr
#CPUSchedulingPriority=80

[Install]
WantedBy=multi-user.target

So it worked before 2.2.0, I was able to use Zigbee2MQTT as expected but since the update, even with a rollback it does not work anymore. Very strange but more anoying.
It looks it is really SystemD which is not notified and which restarts Zigbee2MQTT automatically.

@Nardol
Copy link
Author

Nardol commented Apr 2, 2025

With a fresh reinstall of /opt/zigbee2mqtt it starts again with 2.1.3
I have not tried with 2.2.0 yet because I don't see why it would work again and I don't really want to have to reinstall again without trying something suggested to me before.

@Koenkk
Copy link
Owner

Koenkk commented Apr 2, 2025

Suggestion by @Nerivec in #26935 (reply in thread)

Can you try this?

pnpm i --frozen-lockfile
pnpm rebuild unix-dgram

@Nardol
Copy link
Author

Nardol commented Apr 2, 2025

I have updated from my previous installation from scratch but cannot reproduce my issue, Zigbee2MQTT starts again. A strange issue from the begining to the end, I'm realy sorry for all the noise I made around this issue.

@Nardol Nardol closed this as completed Apr 2, 2025
@Nerivec
Copy link
Collaborator

Nerivec commented Apr 2, 2025

For future reference, this can help when dependencies are misbehaving (it clears the local cache completely):

rm -rf $(pnpm store path)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants