Giter Club home page Giter Club logo

Comments (11)

Maxhy avatar Maxhy commented on June 12, 2024 1

The latest error you have with Undefined Symbol @vanderpunk is related to a missing getter implementation on the AuthTarget codebase. I guess that means the current HEAD is unstable :
I've fixed this specific error with commit 977556f and triggered a snapshot build on https://github.com/leosac/leosac/actions/runs/3060069639 for .deb generation and docker image update. But as I said, consider it unstable for now. I really need to go over a proper release (and related tests). I'm currently focused on another aspect of the access control solution which is credential provisioning (eg. RFID card encoding on a secure way with custom keys). Once that advanced enough to be used as a PoC, I will focus on Leosac proper release.

from access-control.

Maxhy avatar Maxhy commented on June 12, 2024

Lets start with stupid questions first.

Are you sure the user pi has proper permissions on *.so files located at /usr/lib/leosac ?
Can you run ldd on libpifacedigital.so then on libwebsock-api.so?

from access-control.

vanderpunk avatar vanderpunk commented on June 12, 2024

Permissions on the *.so files
pi@raspberrypi:~ $ ls -al /usr/lib/leosac/
total 7900
drwxr-xr-x 3 root root 4096 Sep 13 11:05 .
drwxr-xr-x 85 root root 4096 Sep 13 11:05 ..
drwxr-xr-x 2 root root 4096 Sep 13 11:05 auth
-rw-r--r-- 1 root root 476920 Jun 24 09:44 libalarms.so
-rw-r--r-- 1 root root 159392 Jun 24 09:44 libbench-toggle.so
-rw-r--r-- 1 root root 258496 Jun 24 09:44 libdoorman.so
-rw-r--r-- 1 root root 188296 Jun 24 09:44 libevent-publish.so
-rw-r--r-- 1 root root 175824 Jun 24 09:44 libinstrumentation.so
-rw-r--r-- 1 root root 485176 Jun 24 09:44 libled-buzzer.so
-rw-r--r-- 1 root root 217248 Jun 24 09:44 liblibgpiod.so
-rw-r--r-- 1 root root 16114 Jun 24 09:44 libmodule_piface_deps.a
-rw-r--r-- 1 root root 237960 Jun 24 09:44 libmonitor.so
-rw-r--r-- 1 root root 188096 Jun 24 09:44 libnotifd.so
-rw-r--r-- 1 root root 605552 Jun 24 09:44 libpifacedigital.so
-rw-r--r-- 1 root root 192336 Jun 24 09:44 libreplication.so
-rw-r--r-- 1 root root 324424 Jun 24 09:44 librpleth.so
-rw-r--r-- 1 root root 757656 Jun 24 09:44 libsmtp.so
-rw-r--r-- 1 root root 171808 Jun 24 09:44 libstdin-controller.so
-rw-r--r-- 1 root root 233808 Jun 24 09:44 libsysfsgpio.so
-rw-r--r-- 1 root root 204768 Jun 24 09:44 libtcp-notifier.so
-rw-r--r-- 1 root root 188328 Jun 24 09:44 libtest-and-reset.so
-rw-r--r-- 1 root root 1908392 Jun 24 09:44 libwebsock-api.so
-rw-r--r-- 1 root root 867856 Jun 24 09:44 libwiegand.so
-rw-r--r-- 1 root root 192496 Jun 24 09:44 libws-notifier.so

pi@raspberrypi:~ $ ldd /usr/lib/leosac/libpifacedigital.so
linux-vdso.so.1 (0x0000007f9e0a0000)
libwebsock-api.so => not found
libleosac_lib.so => /lib/libleosac_lib.so (0x0000007f9dc7d000)
libleosac_db.so => /lib/libleosac_db.so (0x0000007f9d814000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f9d7e3000)
libodb-2.4.so => /lib/aarch64-linux-gnu/libodb-2.4.so (0x0000007f9d7b2000)
libodb-pgsql-2.4.so => /lib/aarch64-linux-gnu/libodb-pgsql-2.4.so (0x0000007f9d776000)
libodb-sqlite-2.4.so => /lib/aarch64-linux-gnu/libodb-sqlite-2.4.so (0x0000007f9d73d000)
libzmqpp.so => /lib/libzmqpp.so (0x0000007f9d708000)
libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007f9d530000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007f9d50c000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f9d397000)
/lib/ld-linux-aarch64.so.1 (0x0000007f9e070000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f9d383000)
libscrypt.so.0 => /lib/libscrypt.so.0 (0x0000007f9d36d000)
libzmq.so.5 => /lib/aarch64-linux-gnu/libzmq.so.5 (0x0000007f9d2a6000)
libboost_serialization.so.1.74.0 => /lib/aarch64-linux-gnu/libboost_serialization.so.1.74.0 (0x0000007f9d251000)
libboost_regex.so.1.74.0 => /lib/aarch64-linux-gnu/libboost_regex.so.1.74.0 (0x0000007f9d154000)
libodb-boost-2.4.so => /lib/aarch64-linux-gnu/libodb-boost-2.4.so (0x0000007f9d141000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f9d096000)
libpq.so.5 => /lib/aarch64-linux-gnu/libpq.so.5 (0x0000007f9d036000)
libsqlite3.so.0 => /lib/aarch64-linux-gnu/libsqlite3.so.0 (0x0000007f9ceea000)
libbsd.so.0 => /lib/aarch64-linux-gnu/libbsd.so.0 (0x0000007f9cec5000)
libsodium.so.23 => /lib/aarch64-linux-gnu/libsodium.so.23 (0x0000007f9ce7b000)
libpgm-5.3.so.0 => /lib/aarch64-linux-gnu/libpgm-5.3.so.0 (0x0000007f9ce19000)
libnorm.so.1 => /lib/aarch64-linux-gnu/libnorm.so.1 (0x0000007f9cce4000)
libgssapi_krb5.so.2 => /lib/aarch64-linux-gnu/libgssapi_krb5.so.2 (0x0000007f9cc86000)
libicui18n.so.67 => /lib/aarch64-linux-gnu/libicui18n.so.67 (0x0000007f9c97c000)
libicuuc.so.67 => /lib/aarch64-linux-gnu/libicuuc.so.67 (0x0000007f9c784000)
libssl.so.1.1 => /lib/aarch64-linux-gnu/libssl.so.1.1 (0x0000007f9c6e7000)
libcrypto.so.1.1 => /lib/aarch64-linux-gnu/libcrypto.so.1.1 (0x0000007f9c436000)
libldap_r-2.4.so.2 => /lib/aarch64-linux-gnu/libldap_r-2.4.so.2 (0x0000007f9c3d1000)
libmd.so.0 => /lib/aarch64-linux-gnu/libmd.so.0 (0x0000007f9c3b5000)
libkrb5.so.3 => /lib/aarch64-linux-gnu/libkrb5.so.3 (0x0000007f9c2c9000)
libk5crypto.so.3 => /lib/aarch64-linux-gnu/libk5crypto.so.3 (0x0000007f9c28b000)
libcom_err.so.2 => /lib/aarch64-linux-gnu/libcom_err.so.2 (0x0000007f9c277000)
libkrb5support.so.0 => /lib/aarch64-linux-gnu/libkrb5support.so.0 (0x0000007f9c25a000)
libicudata.so.67 => /lib/aarch64-linux-gnu/libicudata.so.67 (0x0000007f9a733000)
liblber-2.4.so.2 => /lib/aarch64-linux-gnu/liblber-2.4.so.2 (0x0000007f9a712000)
libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000007f9a6eb000)
libsasl2.so.2 => /lib/aarch64-linux-gnu/libsasl2.so.2 (0x0000007f9a6bf000)
libgnutls.so.30 => /lib/aarch64-linux-gnu/libgnutls.so.30 (0x0000007f9a4a1000)
libkeyutils.so.1 => /lib/aarch64-linux-gnu/libkeyutils.so.1 (0x0000007f9a48c000)
libp11-kit.so.0 => /lib/aarch64-linux-gnu/libp11-kit.so.0 (0x0000007f9a33b000)
libidn2.so.0 => /lib/aarch64-linux-gnu/libidn2.so.0 (0x0000007f9a30b000)
libunistring.so.2 => /lib/aarch64-linux-gnu/libunistring.so.2 (0x0000007f9a17f000)
libtasn1.so.6 => /lib/aarch64-linux-gnu/libtasn1.so.6 (0x0000007f9a15b000)
libnettle.so.8 => /lib/aarch64-linux-gnu/libnettle.so.8 (0x0000007f9a108000)
libhogweed.so.6 => /lib/aarch64-linux-gnu/libhogweed.so.6 (0x0000007f9a0b0000)
libgmp.so.10 => /lib/aarch64-linux-gnu/libgmp.so.10 (0x0000007f9a026000)
libffi.so.7 => /lib/aarch64-linux-gnu/libffi.so.7 (0x0000007f9a00d000)

pi@raspberrypi:~ $ ldd /usr/lib/leosac/libwebsock-api.so
linux-vdso.so.1 (0x0000007fa3581000)
libleosac_lib.so => /lib/libleosac_lib.so (0x0000007fa3016000)
libleosac_db.so => /lib/libleosac_db.so (0x0000007fa2bad000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007fa2b7c000)
libodb-2.4.so => /lib/aarch64-linux-gnu/libodb-2.4.so (0x0000007fa2b4b000)
libzmqpp.so => /lib/libzmqpp.so (0x0000007fa2b16000)
libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007fa293e000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007fa291a000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fa27a5000)
/lib/ld-linux-aarch64.so.1 (0x0000007fa3551000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007fa2791000)
libodb-pgsql-2.4.so => /lib/aarch64-linux-gnu/libodb-pgsql-2.4.so (0x0000007fa2755000)
libodb-sqlite-2.4.so => /lib/aarch64-linux-gnu/libodb-sqlite-2.4.so (0x0000007fa271c000)
libscrypt.so.0 => /lib/libscrypt.so.0 (0x0000007fa2706000)
libzmq.so.5 => /lib/aarch64-linux-gnu/libzmq.so.5 (0x0000007fa263f000)
libboost_serialization.so.1.74.0 => /lib/aarch64-linux-gnu/libboost_serialization.so.1.74.0 (0x0000007fa25ea000)
libboost_regex.so.1.74.0 => /lib/aarch64-linux-gnu/libboost_regex.so.1.74.0 (0x0000007fa24ed000)
libodb-boost-2.4.so => /lib/aarch64-linux-gnu/libodb-boost-2.4.so (0x0000007fa24da000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007fa242f000)
libpq.so.5 => /lib/aarch64-linux-gnu/libpq.so.5 (0x0000007fa23cf000)
libsqlite3.so.0 => /lib/aarch64-linux-gnu/libsqlite3.so.0 (0x0000007fa2283000)
libbsd.so.0 => /lib/aarch64-linux-gnu/libbsd.so.0 (0x0000007fa225e000)
libsodium.so.23 => /lib/aarch64-linux-gnu/libsodium.so.23 (0x0000007fa2214000)
libpgm-5.3.so.0 => /lib/aarch64-linux-gnu/libpgm-5.3.so.0 (0x0000007fa21b2000)
libnorm.so.1 => /lib/aarch64-linux-gnu/libnorm.so.1 (0x0000007fa207d000)
libgssapi_krb5.so.2 => /lib/aarch64-linux-gnu/libgssapi_krb5.so.2 (0x0000007fa201f000)
libicui18n.so.67 => /lib/aarch64-linux-gnu/libicui18n.so.67 (0x0000007fa1d15000)
libicuuc.so.67 => /lib/aarch64-linux-gnu/libicuuc.so.67 (0x0000007fa1b1d000)
libssl.so.1.1 => /lib/aarch64-linux-gnu/libssl.so.1.1 (0x0000007fa1a80000)
libcrypto.so.1.1 => /lib/aarch64-linux-gnu/libcrypto.so.1.1 (0x0000007fa17cf000)
libldap_r-2.4.so.2 => /lib/aarch64-linux-gnu/libldap_r-2.4.so.2 (0x0000007fa176a000)
libmd.so.0 => /lib/aarch64-linux-gnu/libmd.so.0 (0x0000007fa174e000)
libkrb5.so.3 => /lib/aarch64-linux-gnu/libkrb5.so.3 (0x0000007fa1664000)
libk5crypto.so.3 => /lib/aarch64-linux-gnu/libk5crypto.so.3 (0x0000007fa1624000)
libcom_err.so.2 => /lib/aarch64-linux-gnu/libcom_err.so.2 (0x0000007fa1610000)
libkrb5support.so.0 => /lib/aarch64-linux-gnu/libkrb5support.so.0 (0x0000007fa15f3000)
libicudata.so.67 => /lib/aarch64-linux-gnu/libicudata.so.67 (0x0000007f9facc000)
liblber-2.4.so.2 => /lib/aarch64-linux-gnu/liblber-2.4.so.2 (0x0000007f9faad000)
libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000007f9fa84000)
libsasl2.so.2 => /lib/aarch64-linux-gnu/libsasl2.so.2 (0x0000007f9fa58000)
libgnutls.so.30 => /lib/aarch64-linux-gnu/libgnutls.so.30 (0x0000007f9f83a000)
libkeyutils.so.1 => /lib/aarch64-linux-gnu/libkeyutils.so.1 (0x0000007f9f825000)
libp11-kit.so.0 => /lib/aarch64-linux-gnu/libp11-kit.so.0 (0x0000007f9f6d6000)
libidn2.so.0 => /lib/aarch64-linux-gnu/libidn2.so.0 (0x0000007f9f6a4000)
libunistring.so.2 => /lib/aarch64-linux-gnu/libunistring.so.2 (0x0000007f9f518000)
libtasn1.so.6 => /lib/aarch64-linux-gnu/libtasn1.so.6 (0x0000007f9f4f4000)
libnettle.so.8 => /lib/aarch64-linux-gnu/libnettle.so.8 (0x0000007f9f4a1000)
libhogweed.so.6 => /lib/aarch64-linux-gnu/libhogweed.so.6 (0x0000007f9f449000)
libgmp.so.10 => /lib/aarch64-linux-gnu/libgmp.so.10 (0x0000007f9f3c1000)
libffi.so.7 => /lib/aarch64-linux-gnu/libffi.so.7 (0x0000007f9f3a6000)

An interesting find:
pi@raspberrypi:~ $ ldd -u /usr/lib/leosac/libpifacedigital.so
Unused direct dependencies:
libwebsock-api.so

Also, chown all the *.so files in /usr/lib/leosac to be owned by pi and chmod +x said directory still results in the same exit/failure of the leosac.service

from access-control.

Maxhy avatar Maxhy commented on June 12, 2024

Are you using a .deb package or did you built it by yourself?
Can you temporary add /usr/lib/leosac to LD_LIBRARY_PATH then run sudo ldconfig and try again to run leosac?

from access-control.

vanderpunk avatar vanderpunk commented on June 12, 2024

I'm using the .deb package from https://github.com/leosac/leosac/actions Release # 53

I believe this temporarily adds /usr/lib/leosac to LD_LIBRARY_PATH
pi@raspberrypi:~ $ export LD_LIBRARY_PATH=/usr/lib/leosac

Then ran "sudo ldconfig"
pi@raspberrypi:~ $ sudo ldconfig

Then tried to run leosac
pi@raspberrypi:~ $ sudo systemctl start leosac pi@raspberrypi:~ $ systemctl status leosac.service ● leosac.service - Leosac daemon Loaded: loaded (/lib/systemd/system/leosac.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2022-09-14 11:29:55 EDT; 7s ago Docs: http://www.leosac.com/ Process: 4838 ExecStart=/usr/bin/leosac -k /etc/leosac.d/kernel.xml (code=exited, status=1/FAILURE) Main PID: 4838 (code=exited, status=1/FAILURE) CPU: 183ms
Sep 14 11:29:55 raspberrypi leosac[4838]: [2022-09-14 11:29:55.947] [console] [info] [4838] Attempting to load module nammed PIFACEDIGITAL_GPIO (shared lib file = libpifacedigital.so)
Sep 14 11:29:55 raspberrypi leosac[4838]: [2022-09-14 11:29:55.947] [console] [info] [4838] Loading library at: /usr/lib/leosac/libpifacedigital.so
Sep 14 11:29:55 raspberrypi leosac[4838]: [2022-09-14 11:29:55.950] [console] [error] [4838] FAILURE, full path was:{/usr/lib/leosac/libpifacedigital.so}: DynLib::dlopen(): libwebsock-api.so: cannot ope>Sep 14 11:29:55 raspberrypi leosac[4838]: [4838] FAILURE, full path was:{/usr/lib/leosac/libpifacedigital.so}: DynLib::dlopen(): libwebsock-api.so: cannot open shared object file: No such file or direct>Sep 14 11:29:55 raspberrypi leosac[4838]: Exception propagated to main(). Will now exit.
Sep 14 11:29:55 raspberrypi leosac[4838]: exception: Cannot load modules. Search path was:
Sep 14 11:29:55 raspberrypi leosac[4838]: -> /usr/lib/leosac
Sep 14 11:29:55 raspberrypi leosac[4838]: -> /usr/lib/leosac/auth
Sep 14 11:29:55 raspberrypi systemd[1]: leosac.service: Main process exited, code=exited, status=1/FAILURE
Sep 14 11:29:55 raspberrypi systemd[1]: leosac.service: Failed with result 'exit-code'.

from access-control.

knight-of-ni avatar knight-of-ni commented on June 12, 2024

hmmm.... I would have expected that to work.

Maybe try modifying your library path this way:
https://stackoverflow.com/a/13428971

from access-control.

vanderpunk avatar vanderpunk commented on June 12, 2024

that seems to have worked

image

Now the Doorman Module is throwing an Error:
Pic for easier reading:
image

Text for easier copying:
pi@raspberrypi:~ $ sudo systemctl restart leosac.service
pi@raspberrypi:~ $ systemctl status leosac.service
● leosac.service - Leosac daemon
Loaded: loaded (/lib/systemd/system/leosac.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-09-14 12:27:09 EDT; 1s ago
Docs: http://www.leosac.com/
Process: 1752 ExecStart=/usr/bin/leosac -k /etc/leosac.d/kernel.xml (code=exited, status=1/FAILURE)
Main PID: 1752 (code=exited, status=1/FAILURE)
CPU: 209ms

Sep 14 12:27:09 raspberrypi leosac[1752]: [2022-09-14 12:27:09.411] [console] [info] [1752] Not stopping module AUTH_FILE as it doesn't seem to run.
Sep 14 12:27:09 raspberrypi leosac[1752]: [1752] FAILURE, full path was:{/usr/lib/leosac/libdoorman.so}: DynLib::dlopen(): /usr/lib/leosac/libdoorman.so: undefined symbol: _ZN6Leosac4Auth10AuthTarget16exitreq_durationEv
Sep 14 12:27:09 raspberrypi leosac[1752]: [2022-09-14 12:27:09.411] [console] [info] [1752] Not stopping module WIEGAND_READER as it doesn't seem to run.
Sep 14 12:27:09 raspberrypi leosac[1752]: [2022-09-14 12:27:09.412] [console] [info] [1752] Not stopping module PIFACEDIGITAL_GPIO as it doesn't seem to run.
Sep 14 12:27:09 raspberrypi leosac[1752]: Exception propagated to main(). Will now exit.
Sep 14 12:27:09 raspberrypi leosac[1752]: exception: Cannot load modules. Search path was:
Sep 14 12:27:09 raspberrypi leosac[1752]: -> /usr/lib/leosac
Sep 14 12:27:09 raspberrypi leosac[1752]: -> /usr/lib/leosac/auth
Sep 14 12:27:09 raspberrypi systemd[1]: leosac.service: Main process exited, code=exited, status=1/FAILURE
Sep 14 12:27:09 raspberrypi systemd[1]: leosac.service: Failed with result 'exit-code'.

from access-control.

knight-of-ni avatar knight-of-ni commented on June 12, 2024

Undefined symbol errors can be caused by using a deb package that was built against a different kernel or distro than the one you are using. Can you verify you are using the Leosac package for Debian Bullseye, rather than the one for Buster?
You are using the arm64 package, right?

I wonder if building the package in Raspbian, rather than Debian, would resolve this issue.

from access-control.

vanderpunk avatar vanderpunk commented on June 12, 2024

Not sure how to verify the Leosac package other than showing what i downloaded and installed
image
green is the Debian package I downloaded, and red is the unzipped version of the green zip

I'll try building it on the pi

from access-control.

knight-of-ni avatar knight-of-ni commented on June 12, 2024

When you went here:
https://github.com/leosac/leosac/actions/runs/3026551796

which deb package did you select? There are choices for Bullseye and Buster. If you downloaded the package for Buster, you could get the symptoms you have described.

UPDATE: Oh, I see bullseye is in the zip filename. Got it.

from access-control.

vanderpunk avatar vanderpunk commented on June 12, 2024

Thanks @Maxhy
Understood it's unstable but it did successfully start with the Doorman Module

image

You all are doing an awesome job here. Looking forward to watching this project progress.

from access-control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.