After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
xurg
Posts: 52
Joined: 17 Aug 2020 22:38

After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Post by xurg »

Just updated from 3.1.4 to 3.2.0 and z-way-server would not start anymore. Adding

Code: Select all

export LD_LIBRARY_PATH=/opt/z-way-server/libs

in /etc/init.d/z-way-server fixed it. Any ideas?
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster)
RaZberry ZW0500 1024/2 SDK: 6.82.01 API: 05.39
Z-Way version v4.1.0
Atomic
Posts: 9
Joined: 28 Jun 2019 20:31

Re: After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Post by Atomic »

Had exactly the same problem.

z-way-server used libmosquitto.so.1 from /usr/lib/arm-linux-gnueabihf, which is an older version installed by libmosquitto1 buster package (dependency of webif z-way-full z-way-server zbw)


While trying to start z-way-server, I received the following error:

Code: Select all

Z-Way version v3.2.0 from 2021-08-26 02:39:38 +0300 (build a4e3216b24b3d47b11f9a0cfc31252079ea32cbd)
Looking for modules in ./modules
Module modinstaller.so loaded
Failed to load module modmqtt.so: /usr/lib/arm-linux-gnueabihf/libmosquitto.so.1: version `MOSQ_1.6' not found (required by ./modules/modmqtt.so)
Illegal instruction
I then added the following line to /etc/init.d/z-way-server above:

Code: Select all

case "$1" in

Code: Select all

export LD_LIBRARY_PATH="$DAEMON_PATH/libs:$LD_LIBRARY_PATH"
to fix this.
Is this a known bug?
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Post by PoltoS »

Yes, this is known, thanks.

Buster has a very old libmosquitto. We have builded a newer libmosquitto and by default it had to use that one in libs. We will check this issue and fix soon
nikitin
Posts: 5
Joined: 02 Dec 2020 16:46

Re: After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Post by nikitin »

Same problem for me, adding the export LD_LIBRARY_PATH line in the init.d fixed it.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Post by PoltoS »

Please install the test v3.2.1 version - we are doing final tests before adding it in the repository
Atomic
Posts: 9
Joined: 28 Jun 2019 20:31

Re: After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Post by Atomic »

Same bug is still in 3.2.2

I still need to add this line to /etc/init.d/z-way-server below PIDFILE=/var/run/$NAME.pid:

Code: Select all

export LD_LIBRARY_PATH="$DAEMON_PATH/libs:$LD_LIBRARY_PATH"
Otherwise it still silently fails.
If I run the start command manually, I see the error:

# start-stop-daemon --start --pidfile /var/run/z-way-server.pid --make-pidfile --background --no-close --chdir /opt/z-way-server --exec z-way-server
Z-Way version v3.2.2 from 2021-11-29 15:40:21 +0300 (build 101045968be0f00797fdc4d1a70e2955271fe4e7)
Looking for modules in ./modules
Failed to load module modmqtt.so: /usr/lib/arm-linux-gnueabihf/libmosquitto.so.1: version `MOSQ_1.6' not found (required by ./modules/modmqtt.so)
Module modskininstaller.so loaded
Module modhttp.so loaded
Module modzbw.so loaded
Module modhomekit.so loaded
Module modinstaller.so loaded
Module moddhs.so loaded
Module modiconinstaller.so loaded
Module modenocean.so loaded
Module modcrypto.so loaded
Module modnotification2ext.so loaded
Module modzwave.so loaded
Atomic
Posts: 9
Joined: 28 Jun 2019 20:31

Re: After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Post by Atomic »

3.2.3 still has same problem. I still need to add export LD_LIBRARY_PATH="$DAEMON_PATH/libs:$LD_LIBRARY_PATH" to /etc/init.d/z-way-server so Buster ist picking up libmosquitto provided by z-way-server. When will we see a fix?
Atomic
Posts: 9
Joined: 28 Jun 2019 20:31

Re: After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Post by Atomic »

Instead of adding a workaround into /etc/init.d/z-way-server, I now installed a newer version of libmosquitto into Buster. So no changes/workarounds are needed anymore.

Code: Select all

wget -O - http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key | apt-key add -
wget -O /etc/apt/sources.list.d/mosquitto-buster.list http://repo.mosquitto.org/debian/mosquitto-buster.list
apt-get update && apt-get upgrade
With this, /usr/lib/arm-linux-gnueabihf/libmosquitto.so.1 is updated to a recent version which works with z-way server.
hedged
Posts: 2
Joined: 26 Sep 2022 12:03

Re: After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Post by hedged »

Same bug still on 3.2.3. I upgraded Debian from Stretch to Buster first and then upgraded z-way-server from 3.1.1 to 3.2.3. And it simply didn't start with the last line in a log file being:
[core] Executing script: /*** Initialize Webserver and Handlers ***************************************** ...

Spent a day to find out that I need to manually add LD_LIBRARY_PATH to /etc/init.d/z-way-server. Started fine after that.
xurg
Posts: 52
Joined: 17 Aug 2020 22:38

Re: After upgrade to 3.2.0 LD_LIBRARY_PATH seems not to be set up correctly

Post by xurg »

hedged wrote:
26 Sep 2022 12:08
Same bug still on 3.2.3. I upgraded Debian from Stretch to Buster first and then upgraded z-way-server from 3.1.1 to 3.2.3. And it simply didn't start with the last line in a log file being:

Spent a day to find out that I need to manually add LD_LIBRARY_PATH to /etc/init.d/z-way-server. Started fine after that.
This is not an issue in 3.2.3. Maybe during the various system upgrades some other dependency got broken. Try using aptitude to check the dependency integrity, in my experience this is a easiest way to sort these things out (once you have gotten the hang of using its UI, that is.)
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster)
RaZberry ZW0500 1024/2 SDK: 6.82.01 API: 05.39
Z-Way version v4.1.0
Post Reply