Neues Modul: Signalbot (Integration für den Signal Messenger) via signal-cli

Begonnen von Adimarantis, 31 Januar 2021, 19:16:19

Vorheriges Thema - Nächstes Thema

Adimarantis

Feb 22 14:10:29 inuc signal-cli[175600]: #011java.lang.UnsupportedClassVersionError: org/asamk/signal/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0Das lese ich eher anders rum: Du versuchst eine Java 21 Klasse mit Java 17 auszuführen.
Schau mal das JAVA_HOME in deinem signal.service File an, ob das auf eine Java 21 Installation zeigt.

Jörg
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

Jamo

Hallo Jörg,
danke das war es, in /etc/systemd/system/signal.service wat der Pfad falsch gesetzt. Jetzt stolpere ich wieder über den `GLIBC_2.33' not found Fehler den ich auch früher schon mal hatte, hast DU noch eine Idee? https://forum.fhem.de/index.php?topic=118370.msg1284304#msg1284304

signal.service - Send secure messages to Signal clients
     Loaded: loaded (/etc/systemd/system/signal.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2024-02-23 13:22:52 CET; 13s ago
    Process: 273185 ExecStart=/opt/fhem/signal-cli/bin/signal-cli --config /opt/fhem/.local/share/signal-cli daemon --system (code=exited, status=1/FAILURE)
   Main PID: 273185 (code=exited, status=1/FAILURE)
        CPU: 2.269s

Feb 23 13:22:51 inuc systemd[1]: Starting Send secure messages to Signal clients...
Feb 23 13:22:52 inuc signal-cli[273185]: WARN  Manager - Failed to call libsignal-client: /tmp/11068233081262817106libsignal_jni.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/11068233081262817106libsignal_jni.so)
Feb 23 13:22:52 inuc signal-cli[273185]: Missing required native library dependency: libsignal-client
Feb 23 13:22:52 inuc systemd[1]: signal.service: Main process exited, code=exited, status=1/FAILURE
Feb 23 13:22:52 inuc systemd[1]: signal.service: Failed with result 'exit-code'.
Feb 23 13:22:52 inuc systemd[1]: Failed to start Send secure messages to Signal clients.
Feb 23 13:22:52 inuc systemd[1]: signal.service: Consumed 2.269s CPU time.

fhem@inuc:~$ ldd --version
ldd (Debian GLIBC 2.31-13+deb11u8) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
fhem@inuc:~$
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/ConbeeII, FB, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack

Adimarantis

Hi Jamo,

also da weiss ich jetzt echt nicht was du da verpfriemelt hast.
Habe gerade testweise auf meiner x86_64 Debian 10 (glibc 2.28) VM den Installer durchlaufen lassen und signal-cli kam ordentlich hoch.
Der Installer musste dabei fast alles Nachinstallieren, da auf der VM noch gar nix drauf war.

Vielleicht doch besser nicht von Hand? Im Installer steckt das ganze Know How, was man braucht und wie es zusammenpasst.

Jörg
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

Jamo

Hallo Jörg,
danke, sorry und mea Culpa. Ich habe jetzt alles nochmal gemacht, und jetzt gehts.
Ich kann Dir keine privaten e-mail schreiben, aber falls Du irgendwo eine Spendenbox hast, dann lass es mich wissen, ich würde mcih gerne für deinen Suport erkenntlich zeigen.
Beste Grüsse, Jamo
Signalbot:3.16 signal-cli:0.13.0 Protocol::DBus:0.22
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/ConbeeII, FB, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack

HarryT

Hi

My installation kept disconnected. So I tried a new installation. In a not so smart moment I decided to change the default answer for upgrading from n to Y.
After restoring the settings the signal bot connected correctly, however after a reboot of my raspberry signalbot kept disconnected.

My systemctl gives now:
feb 23 16:58:23 Debi12-12 signal-cli[24384]: Error: LinkageError occurred while loading main class org.asamk.signal.Main
feb 23 16:58:23 Debi12-12 signal-cli[24384]:         java.lang.UnsupportedClassVersionError: org/asamk/signal/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
feb 23 16:58:23 Debi12-12 systemd[1]: signal.service: Main process exited, code=exited, status=1/FAILURE

The install script gives me:
Please verify that these settings are correct:
Signal-cli User:              signal-cli
Signal-cli Install directory: /opt
Signal config storage:        /var/lib/signal-cli
Signal version:               0.13.0 (libsignal-client v0.39.2)
System library path:          /usr/lib
System architecture:          aarch64
System GLIBC version:         2.36
Using Java version:           /opt/java/bin/java
Native Java 21.0              no (current version:21.0)
This will update system packages, install or uninstall signal-cli

I already tried removing the installation and reinstall. And I removed /opt/signal and tried a new install.

Any idea how I can get it solved?

Thanks

FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Jamo

Hi Harry,
yes, I just had the same issue, pls see https://forum.fhem.de/index.php?msg=1304410

Jörg helped out and explained that it is needed to set $JAVA_HOME in /etc/systemd/system/signal.service to your Java21 install directory, e.g. in your case it should be Environment="JAVA_HOME= /opt/java"
Hope that helps

Best regards, Jamo
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/ConbeeII, FB, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack

HarryT

Thanks  Jamo

However I already "fixed" it by reinstallig with
SIGNALVERSION="0.12.8"
LIBRARYVERSION="0.36.1"

However if I send a message now, I don´t receive it on my smartphone and it stays "pending"

The deamon is running correct and the logging doesn´t give an error.
What can be wrong and how to solve that?


FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Jamo

Hi Harry,
I had the same 'pending' two weeks time ago, but I do not recall how I fixed it. Did you try a "set signal reinit"?
Bullseye auf iNUC, Homematic + HMIP(UART/HMUSB), Debmatic, HUEBridge, Zigbee/ConbeeII, FB, Alexa (fhem-lazy), Livetracking, LaCrosse JeeLink, LoRaWan / TTN / Chirpstack

HarryT

Hi Jamo

Thanks for your suggestion.

Yes indeed, I tried "reinit" but that didn´t change anything as far I can see. 

More suggestions??

{HT}
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Adimarantis

Did you check syslog? It might be that 0.12.8 also is too old now, but you would only see that message in syslog. Unfortunately Signalbot has not way of knowing. In that case message staying on "pending" is expected.
signal-cli 0.12.8 seems to still have tolerated running Java 17, that's why it seems to work.
However you should update to 0.13.0 and Java 21. I recommend to run the current Installer (3.24) and let it also replace all system configuration files, which should make sure the JAVA_HOME is set correctly.
Your error message clearly indicates that your signal-cli is still trying to use Java 17
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

Adimarantis

Ich habe jetzt ein kleines Update eingecheckt:
1. Es wird jetzt mittels Timer geprüft ob Nachrichten tatsächlich versendet werden. Default ist 60s (plus 5s Karenz) - kann über das Attribute "sendTimeout" verändert werden. Auswirkungen sind lediglich ein Logfile Eintrag mit loglevel 1 ("Timeout in sendMessage - check your syslog for signal-cli issues") und ein Eintrag in lastErr. Lasst mich wissen ob es hier "false positives" gibt.
2. Es gibt jetzt ein verstecktes "set" Kommando "rateLimit" mit dem eine rateLimitChallenge gesendet werden kann. Diese benötigt 2 Parameter - eine "Challenge" und ein Captcha. Leider weiss ich nicht wie diese "Challenge" aussieht und wie man sie findet (ich hatte den "rate limit exceeded" Fall selbst noch nicht). Deswegen nur versteckt - also über Befehlszeile "set ... rateLimit <challenge> <captcha>" - im Dropdown erscheint er nicht. Falls jemand rausfindet wie und ob das funktioniert, kann ichs gerne dokumentieren.

Für alle die an oben genannten Punkten nicht interessiert sind, bringt das Update keinen Mehrwert.

Jörg
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

HarryT

Hi

I removed the alt installation and reinstalled the newest version with version 0.13. And finally changed in /etc/systemd/system/signal.service the line "Environment="JAVA_HOME=" to "Environment="JAVA_HOME=/opt/java".

Unfortunately that was not enough.

Then I used
  "set SignalBot trust +316xxxxxx"
this did the trick.
Strange as after this I can send a message to my wifes phone without trusting it first.
Maybe may phone was blocked because I tried so often to range my phone without luck?

So it seems to work again now.

Btw If you install the newest version it works until you reboot. You have to change signal.service to point to the correct java version, but the error I get in fhem is:
signal-cli v0.11.2+ required.
Please use installer to install or update
Note: The installer only supports Debian based Linux distributions like Ubuntu and Raspberry OS
and X86 or armv7l CPUs

You can download the installer here or your www/signal directory and run it with
sudo ./signal_install.sh
Maybe it is better to change this in a message that you have to change signal.service to point to the correct java version.

Anyway, thanks all for  the help and advice.

{HT} 


FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Medel

Ich habe folgendes Problem:
Wenn ich das Installationsscript laufen lasse wird der signal service gestartet und scheint normal zu laufen.
Wenn ich versuche meinen Account neu zu registrieren schlägt dies fehl mit "Account in use"
Wenn ich versuche den Signal Service neu zu starten zeigt mir ein "service signal status" folgende Fehlermeldung:
signal-cli[6250]: Caused by: org.sqlite.NativeLibraryNotFoundException: No native library found for os.name=Linux, os.arch=aarch64, paths=[/org/sqlite/native/Linux/aarch64:/usr/java/packages/lib:/lib:/usr/lib]
Denke das hängt vielleicht zusammen. Warum kommt diese Fehlermeldung?

Adimarantis

Ich vermute mal du hast einen Raspberry mit 64-Bit Kernel aber alle anderen Pakete noch unter 32-Bit.
Das passiert leider z.B. bei Buster ganz von selber wenn man seine normalen updates macht.

Da kommt Java leider durcheinander.
Abhilfe schafft den Kernel auf 32 Bit umzustellen:

In /boot/config.txt die Zeile
arm_64bit=0
anhängen und neu starten.

Sollte ich wohl ins Wiki aufnehmen.
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

Medel

Danke,
denke das ist mein Problem. Werde es mal testen ggf auch kpl. auf 64 Bit updaten