FHEM auf Synology DS209 funzt bis auf SSL

Begonnen von joachimS, 17 Februar 2024, 10:03:47

Vorheriges Thema - Nächstes Thema

joachimS

Ich bekomme denselben Fehler wie hier:
https://forum.fhem.de/index.php?topic=121361.0
Allerdings bin ich mit Package openssl (1.0.2n-1) schon auf dem neuest möglichen STand für armv5tel-linux:
https://pkg.entware.net/binaries/armv5/Packages.html
oder hat jemand einen Tip wie ich die SSL connection zu Telegram hinbekomme?
Ich bekomme folgenden Fehler:

2024.02.17 08:38:59 2: TelegramBot_DoUrlCommand teleBot: FAILED http access returned error :https://api.telegram.org/bot313733200:AAHih1Euyw6mNwqndJHPx2P4z4BLdnGPgxM/getMe: Can't connect(2) to https://api.telegram.org:443:  SSL connect attempt failed error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:
2024.02.17 08:38:57 3: TelegramBot_Define teleBot: called

Immerhin habe ich es geschafft ein aktuelleres perl 5.26.1 mit ipkg installiert zu bekommen und mit CPAN die benötigten perl module zu installieren.
Nur mit mysql gibt es noch Probleme:
2024.02.09 23:58:29 1: DbLog logdb - Error while reading ./contrib/dblog/db.conf: 'Can't open ./contrib/dblog/db.conf: No such file or directory'
2024.02.09 23:58:29 1: define logdb DbLog ./contrib/dblog/db.conf .*:.*: Can't open ./contrib/dblog/db.conf: No such file or directory
2024.02.09 23:59:14 3: DbLog logdb - Creating Push-Handle to database mysql:database=fhem;host=db;port=3306 with user fhemuser
2024.02.09 23:59:14 2: DbLog logdb - Error: install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (you may need to install the DBD::mysql module) (@INC contains: /usr/local/FHEM/share/fhem /usr/local/FHEM/share/fhem/lib /usr/local/FHEM/share/fhem/FHEM . /opt/lib/perl5/site_perl/5.26.1/arm-linux /opt/lib/perl5/site_perl/5.26.1 /opt/lib/perl5/5.26.1/arm-linux /opt/lib/perl5/5.26.1 /usr/local/FHEM/share/fhem/FHEM/lib) at (eval 1556) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
 at /usr/local/FHEM/share/fhem/FHEM/93_DbLog.pm line 3254.

2024.02.09 23:59:19 3: DbLog logdb - Creating Push-Handle to database mysql:database=fhem;host=db;port=3306 with user fhemuser
2024.02.09 23:59:19 2: DbLog logdb - Error: install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (you may need to install the DBD::mysql module) (@INC contains: /usr/local/FHEM/share/fhem /usr/local/FHEM/share/fhem/lib /usr/local/FHEM/share/fhem/FHEM . /opt/lib/perl5/site_perl/5.26.1/arm-linux /opt/lib/perl5/site_perl/5.26.1 /opt/lib/perl5/5.26.1/arm-linux /opt/lib/perl5/5.26.1 /usr/local/FHEM/share/fhem/FHEM/lib) at (eval 1605) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
 at /usr/local/FHEM/share/fhem/FHEM/93_DbLog.pm line 3254.
Dachte eigentlich dass db.conf da ist, woran könnte es liegen?

Alterativen sind auf einen Odroid oder, besser, das fhem Docker image auf meiner QNAP zu gehen. Allerdings muss ich den CUL an USB dranbringen, obwohl der evtl. auch auf der Synology bleiben könnte, also 2 fhem Instanzen.
Gruss
Joachim

(fhem auf Synology DS209, CUL, FS20, FHT, EM, HM, Keymatic, Hue, OpenDTU)

joachimS

#1
Benötige bitte Hilfe mit CPAN und LWP::UserAgent für das fritzbox Device.
Ständig fehlen prerequisites oder einige Tests sind erfolglos:
cpan[1]> install LWP::UserAgent
Reading '/root/.cpan/Metadata'
  Database was generated on Sun, 18 Feb 2024 07:54:16 GMT
Running install for module 'LWP::UserAgent'
Checksum for /root/.cpan/sources/authors/id/O/OA/OALDERS/libwww-perl-6.76.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring O/OA/OALDERS/libwww-perl-6.76.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Encode::Locale 0 not found.
Warning: prerequisite File::Listing 6 not found.
Warning: prerequisite HTML::Entities 0 not found.
Warning: prerequisite HTML::HeadParser 3.71 not found.
Warning: prerequisite HTTP::CookieJar::LWP 0 not found.
Warning: prerequisite HTTP::Cookies 6 not found.
Warning: prerequisite HTTP::Daemon 6.12 not found.
Warning: prerequisite HTTP::Date 6 not found.
Warning: prerequisite HTTP::Negotiate 6 not found.
Warning: prerequisite HTTP::Request 6.18 not found.
Warning: prerequisite HTTP::Request::Common 6.18 not found.
Warning: prerequisite HTTP::Response 6.18 not found.
Warning: prerequisite HTTP::Status 6.18 not found.
Warning: prerequisite LWP::MediaTypes 6 not found.
Warning: prerequisite Net::HTTP 6.18 not found.
Warning: prerequisite Test::RequiresInternet 0 not found.
Warning: prerequisite WWW::RobotRules 6 not found.
...
Mein Versuch prerequisites  (HTML::Entities,HTML::HeadParser,Net::HTTP manuell zu installieren war auch erfolglos:

 install HTML::Entities
cpan[2]> install HTML::HeadParser
install Net::HTTP
cpan[2]> Encode::Locale is up to date (1.05).

cpan[3]> install inc::latest
install Software::License
install Module::Build

install LWP::UserAgent
 
 Failed 1/50 test programs. 0/454 subtests failed.

...

# Looks like your test exited with 25 just after 46.
HTTP Server terminated
t/local/http.t ................. Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 123/136 subtests
t/local/httpsub.t .............. Can't locate Net/HTTP.pm in @INC (you may need to install the Net::HTTP module) (@INC contains: /root/.cpan/build/libwww-perl-6.76-1/blib/lib /root/.cpan/build/libwww-perl-6.76-1/blib/arch /opt/lib/perl5/site_perl/5.26.1/arm-linux /opt/lib/perl5/site_perl/5.26.1 /opt/lib/perl5/5.26.1/arm-linux /opt/lib/perl5/5.26.1 .) at /root/.cpan/build/libwww-perl-6.76-1/blib/lib/LWP/Protocol/http.pm line 9.
Compilation failed in require at /opt/lib/perl5/5.26.1/parent.pm line 16.
BEGIN failed--compilation aborted at t/local/httpsub.t line 25.
t/local/httpsub.t .............. Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/local/protosub.t ............. ok
t/redirect.t ................... 1/?
#   Failed test '... and has tells us about the problem'
#   at t/redirect.t line 39.
#                   '501 Protocol scheme 'http' is not supported
# '
#     doesn't match '(?^i:Can't connect)'

#   Failed test '... and has tells us about the problem'
#   at t/redirect.t line 56.
#                   '501 Protocol scheme 'http' is not supported
# '
#     doesn't match '(?^i:Can't connect)'
# Looks like you failed 2 tests of 4.
t/redirect.t ................... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/4 subtests
t/robot/ua-get.t ............... 1/18
#   Failed test 'someplace: is_success'
#   at t/robot/ua-get.t line 54.
t/robot/ua-get.t ............... 3/18
#   Failed test 'robots: code: 403'
#   at t/robot/ua-get.t line 59.
#          got: '501'
#     expected: '403'

#   Failed test 'robots: msg contains robots.txt'
#   at t/robot/ua-get.t line 60.
#                   'Protocol scheme 'http' is not supported'
#     doesn't match '(?^:robots\.txt)'
t/robot/ua-get.t ............... 6/18
#   Failed test 'foo: code: 404'
#   at t/robot/ua-get.t line 65.
#          got: '501'
#     expected: '404'

#   Failed test 'quit: code: 503'
#   at t/robot/ua-get.t line 78.
#          got: '501'
#     expected: '503'

#   Failed test 'quit: Content: bye bye'
#   at t/robot/ua-get.t line 79.
#                   '501 Protocol scheme 'http' is not supported
# '
#     doesn't match '(?^:Bye, bye)'

#   Failed test 'quit: no_visits 4'
#   at t/robot/ua-get.t line 87.
#          got: '5'
#     expected: '4'
# Looks like you failed 7 tests of 18.
HTTP Server terminated
t/robot/ua-get.t ............... Dubious, test returned 7 (wstat 1792, 0x700)
Failed 7/18 subtests
t/robot/ua.t ................... 1/14
#   Failed test 'someplace: is_success'
#   at t/robot/ua.t line 56.
t/robot/ua.t ................... 3/14
#   Failed test 'robots: code 403'
#   at t/robot/ua.t line 62.
#          got: '501'
#     expected: '403'

#   Failed test 'robots: message robots.txt'
#   at t/robot/ua.t line 63.
#                   'Protocol scheme 'http' is not supported'
#     doesn't match '(?^:robots\.txt)'
t/robot/ua.t ................... 6/14
#   Failed test 'robots: code 404'
#   at t/robot/ua.t line 69.
#          got: '501'
#     expected: '404'

#   Failed test 'quit: code 503'
#   at t/robot/ua.t line 83.
#          got: '501'
#     expected: '503'

#   Failed test 'quit: content bye bye'
#   at t/robot/ua.t line 84.
#                   '501 Protocol scheme 'http' is not supported
# '
#     doesn't match '(?^:Bye, bye)'

#   Failed test 'no_visits good'
#   at t/robot/ua.t line 92.
#          got: '5'
#     expected: '4'
# Looks like you failed 7 tests of 14.
HTTP Server terminated
t/robot/ua.t ................... Dubious, test returned 7 (wstat 1792, 0x700)
Failed 7/14 subtests

Test Summary Report
-------------------
t/base/proxy.t               (Wstat: 256 Tests: 8 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
t/base/ua.t                  (Wstat: 1536 Tests: 51 Failed: 6)
  Failed tests:  20-21, 40, 43, 45-46
  Non-zero exit status: 6
t/local/autoload-get.t       (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
t/local/autoload.t           (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
t/local/http.t               (Wstat: 6400 Tests: 46 Failed: 33)
  Failed tests:  3-6, 8-21, 23, 25-26, 28-29, 31-32, 34-38
                41, 45-46
  Non-zero exit status: 25
  Parse errors: Bad plan.  You planned 136 tests but ran 46.
t/local/httpsub.t            (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/redirect.t                 (Wstat: 512 Tests: 4 Failed: 2)
  Failed tests:  2, 4
  Non-zero exit status: 2
t/robot/ua-get.t             (Wstat: 1792 Tests: 18 Failed: 7)
  Failed tests:  2, 4-5, 7, 12-13, 15
  Non-zero exit status: 7
t/robot/ua.t                 (Wstat: 1792 Tests: 14 Failed: 7)
  Failed tests:  2, 4-5, 7, 11-12, 14
  Non-zero exit status: 7
Files=22, Tests=224, 99 wallclock secs ( 1.18 usr  0.16 sys + 51.33 cusr  6.72 csys = 59.39 CPU)
Result: FAIL
Failed 9/22 test programs. 58/224 subtests failed.
Makefile:1033: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 7
  OALDERS/libwww-perl-6.76.tar.gz
3 dependencies missing (HTML::Entities,HTML::HeadParser,Net::HTTP); additionally test harness failed
  /opt/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports OALDERS/libwww-perl-6.76.tar.gz
Running install for module 'Test::LeakTrace'
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/id/L/LE/LEEJO/Test-LeakTrace-0.17.tar.gz
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/id/L/LE/LEEJO/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/L/LE/LEEJO/Test-LeakTrace-0.17.tar.gz ok
Configuring L/LE/LEEJO/Test-LeakTrace-0.17.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Test::LeakTrace
Writing MYMETA.yml and MYMETA.json
  LEEJO/Test-LeakTrace-0.17.tar.gz
  /volume1/@optware/bin/perl5.26.1 Makefile.PL -- OK
Running make for L/LE/LEEJO/Test-LeakTrace-0.17.tar.gz
cp lib/Test/LeakTrace/Script.pm blib/lib/Test/LeakTrace/Script.pm
cp lib/Test/LeakTrace.pm blib/lib/Test/LeakTrace.pm
cp lib/Test/LeakTrace/JA.pod blib/lib/Test/LeakTrace/JA.pod
Running Mkbootstrap for LeakTrace ()
chmod 644 "LeakTrace.bs"
"/volume1/@optware/bin/perl5.26.1" -MExtUtils::Command::MM -e 'cp_nonempty' -- LeakTrace.bs blib/arch/auto/Test/LeakTrace/LeakTrace.bs 644
"/volume1/@optware/bin/perl5.26.1" "/opt/lib/perl5/5.26.1/ExtUtils/xsubpp"  -typemap '/opt/lib/perl5/5.26.1/ExtUtils/typemap'  LeakTrace.xs > LeakTrace.xsc
mv LeakTrace.xsc LeakTrace.c
/opt/bin/gcc -c   -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -I/home/jenkins/Optware-ng/buildroot-armv5eabi-ng/staging/opt/include -pthread    -DVERSION=\"0.17\" -DXS_VERSION=\"0.17\" -fPIC -Wno-unused-function "-I/opt/lib/perl5/5.26.1/arm-linux/CORE"   LeakTrace.c
rm -f blib/arch/auto/Test/LeakTrace/LeakTrace.so
/opt/bin/gcc  -shared LeakTrace.o  -o blib/arch/auto/Test/LeakTrace/LeakTrace.so  \
      \

chmod 755 blib/arch/auto/Test/LeakTrace/LeakTrace.so
Manifying 3 pod documents
  LEEJO/Test-LeakTrace-0.17.tar.gz
  /opt/bin/make -- OK
Running make test for LEEJO/Test-LeakTrace-0.17.tar.gz
"/volume1/@optware/bin/perl5.26.1" -MExtUtils::Command::MM -e 'cp_nonempty' -- LeakTrace.bs blib/arch/auto/Test/LeakTrace/LeakTrace.bs 644
PERL_DL_NONLAZY=1 "/volume1/@optware/bin/perl5.26.1" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_compile.t ..... 1/1 # Testing Test::LeakTrace/0.17
t/00_compile.t ..... ok
t/01_info.t ........ ok
t/02_refs.t ........ ok
t/03_count.t ....... ok
t/04_test_funcs.t .. ok
t/05_script.t ...... ok
t/06_threads.t ..... Failed 6/6 subtests
t/07_eval.t ........ ok
t/08_leaktrace.t ... ok
t/09_info_more.t ... ok
t/10_bad_use.t ..... ok
t/11_logfp.t ....... ok
t/12_padstale.t .... ok
t/13_do.t .......... ok

Test Summary Report
-------------------
t/06_threads.t   (Wstat: 139 Tests: 0 Failed: 0)
  Non-zero wait status: 139
  Parse errors: Bad plan.  You planned 6 tests but ran 0.
Files=14, Tests=126, 17 wallclock secs ( 0.68 usr  0.15 sys + 13.06 cusr  1.71 csys = 15.60 CPU)
Result: FAIL
Failed 1/14 test programs. 0/126 subtests failed.
Makefile:1058: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255

install  Net::HTTP
  LEEJO/Test-LeakTrace-0.17.tar.gz
  /opt/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports LEEJO/Test-LeakTrace-0.17.tar.gz
Running install for module 'Test::LeakTrace'
  LEEJO/Test-LeakTrace-0.17.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/Test-LeakTrace-0.17-0
  LEEJO/Test-LeakTrace-0.17.tar.gz
  Has already been prepared
  LEEJO/Test-LeakTrace-0.17.tar.gz
  Has already been made
  LEEJO/Test-LeakTrace-0.17.tar.gz
  Won't repeat unsuccessful test during this command
Failed during this command:
 (optional) EXODIST/Test-Simple-1.302198.tar.gz: make_test NO
 (optional) EXODIST/Term-Table-0.018.tar.gz   : make_test NO
 (optional) EXODIST/Test2-Suite-0.000159.tar.gz: make_test NO one dependency not OK (Term::Table); additionally test harness failed
 (optional) PLICEASE/FFI-CheckLib-0.31.tar.gz : make_test NO 3 dependencies missing (Test2::Require::EnvVar,Test2::Require::Module,Test2::V0); additionally test harness failed
 (optional) PLICEASE/Alien-Build-2.80.tar.gz  : make_test NO 2 dependencies missing (FFI::CheckLib,Test2::V0); additionally test harness failed
 (optional) PLICEASE/Alien-cmake3-0.08.tar.gz : writemakefile NO '/volume1/@optware/bin/perl5.26.1 Makefile.PL' returned status 512
 (optional) TIMLEGGE/IO-Compress-Brotli-0.017.tar.gz: writemakefile NO '/volume1/@optware/bin/perl5.26.1 Makefile.PL' returned status 512
 OALDERS/HTML-Parser-3.81.tar.gz              : make_test NO
 OALDERS/Net-HTTP-6.23.tar.gz                 : make_test NO
 OALDERS/libwww-perl-6.76.tar.gz              : make_test NO 3 dependencies missing (HTML::Entities,HTML::HeadParser,Net::HTTP); additionally test harness failed
 (optional) LEEJO/Test-LeakTrace-0.17.tar.gz  : make_test NO

Bekomme leider nicht den ganzen Code rein, kann bei Fragen mehr raussuchen
Gruss
Joachim

(fhem auf Synology DS209, CUL, FS20, FHT, EM, HM, Keymatic, Hue, OpenDTU)

joachimS

#2
Update:
Die CPAN install Probleme waren mir zu mühsam und das SSL ist auch veraltet, so dass zB Telegram nicht geht.
Ansonsten ist die DS209 noch ein prima fhem host, etwas langsam halt. Evtl. nehme ich sie in Zukunft für eine 2. fhem Instanz zum Überwachen des fhem Docker Containers auf meiner QNAP DS253A mit 16GB
Habe den Umzug auf den fhem Docker Container weitgehend geschafft  :)  :)
Mit der QNAP Container station und mit Portainer habe ich es nicht ganz hinbekommen, erst die Docker command line hat die Probleme beim Port forwarding und mit dem USB CUL behoben:
docker run -d --name fhem3 -p 1883:1883 -p 8083:8083 -v fhem:/opt/fhem --device=/dev/ttyACM0 fhem/fhemPort 1883 ist für MQTT. Wollte kein Port Mapping haben.
Der Cul (Atmel Corp. LUFA USB to Serial Adapter Project) tauchte zwar mit lsusb auf, aber nicht in /dev im Container:

root@9696058f85a0:/dev# ls
core  fd  full  mqueue  null  ptmx  pts  random  shm  stderr  stdin  stdout  tty  urandom  zero
root@9696058f85a0:/dev# lsusb
Bus 002 Device 002: ID 0bda:9201 Realtek Semiconductor Corp. RTL9201
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 125f:601a A-DATA Technology Co., Ltd. IUM01-512MFHS
Bus 001 Device 003: ID 03eb:204b Atmel Corp. LUFA USB to Serial Adapter Project
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Überlege mir nun wie ich den fhem Docker Container nun in die Container bringe und automatisch starte.
Tatsächlich ist er schon sichtbar und hat meine Settings sichtbar, vermutlich ist das persistent:
Du darfst diesen Dateianhang nicht ansehen.
Das folgende Problem:
CUL8: Can't open /dev/ttyACM0: Device or resource busy
lag wohl am screen cmd am Host.
Ein unplug und replug hat geholfen
Gruss
Joachim

(fhem auf Synology DS209, CUL, FS20, FHT, EM, HM, Keymatic, Hue, OpenDTU)