[42_AptToDate.pm] Übersicht über verfügbare Distributionsupdates

Begonnen von CoolTux, 16 Mai 2018, 09:54:41

Vorheriges Thema - Nächstes Thema

CoolTux

Hab dich ja gestern angerufen, wolltest ja nicht  ;D

Also wichtig ist erst Mal zu unterscheiden welcher User den ssh Befehl aufruft und mit welchen User du dich per SSH connecten willst.


Wenn also der User fhem den Aufruf macht, was ja der Fall ist aus FHEM heraus, dann muss im Homeverzeichnis des Users fhem ein Ordner .ssh liegen wo der privat Key liegt.

Auf der anderen Seite muss im Homeverzeichnis des Users den Du per ssh connecten willst Beispiel pi@ der Public Key unter .ssh liegen. Rechte der .ssh Ordner müssen stimmen, nur lesen für den owner.

Testen kannst du als User root mit

su -s /bin/bash -c "ssh pi@server 'ls /etc/'" fhem

Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

JoWiemann

Das ist mir schon klar. Nur es funktioniert mit dem User fhem nicht. Der Aufruf ssh fhem@ verlangt hartnäckig ein Passwort.


Gesendet von iPhone mit Tapatalk

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

CoolTux

Mach mal bitte als root

su -s /bin/bash -c "ssh fhem@server 'ls /etc/'" fhem
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

JoWiemann

Zitat von: CoolTux am 31 Mai 2018, 20:09:43
Mach mal bitte als root

su -s /bin/bash -c "ssh fhem@server 'ls /etc/'" fhem

Ergibt leider:

Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).

Den Befehl habe ich auf dem RPi ausgeführt, auf dem AptToDate läuft.

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

CoolTux

Geht also nicht.
Auf dem remote pi ist für den User fhem im Homeverzeichnis vom User fhem der Public Key hinterlegt?

Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

JoWiemann

Ja, ist im Home, /opt/fhem/.ssh, hinterlegt.


Gesendet von iPhone mit Tapatalk

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

CoolTux

Ich werde die Tage mal eine Anleitung machen. Dabei sehe ich dann auch ob es an was anderem liegen kann. Habe 2 Maschinen mit Debian 9.4 und werde das mal einrichten da.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

JoWiemann

Mein Problem ist im Moment Zeitmangel. Von daher beschäftigte ich mich immer mal zwischendurch mit dem Thema, aber eben nicht konzentriert und systematisch.


Gesendet von iPhone mit Tapatalk

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

MadMax-FHEM

#83
Zu spät hier (ssh-Problematik) drüber gestolpert vielleicht ist das ja ausreichend: http://heinz-otto.blogspot.com/2017/01/per-ssh-remote-befehle-direkt-ausfuhren.html

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

MadMax-FHEM

Ich gebe ja zu, dass ich noch nicht viel damit "rumgespielt" hab...

Allerdings ist mir aufgefallen, dass (zumindest bei mir) obwohl "system is up to date" steht immer noch (von früher) "updatesAvailable 104" steht...

Habe allerdings den update des Systems "manuell" durchgeführt...
...war gerade an einer anderen Problematik dran...

Als ich dann (zufällig) mal nach "AptToDate" geschaut hab ist es mir halt aufgefallen...

Hier das list:


Internals:
   DEF        localhost
   HOST       localhost
   NAME       LocalSystem
   NOTIFYDEV  global,LocalSystem
   NR         446
   NTFY_ORDER 50-LocalSystem
   STATE      system is up to date
   TYPE       AptToDate
   VERSION    0.2.2
   READINGS:
     2018-05-16 17:57:18   os-release_BUG_REPORT_URL http://www.raspbian.org/RaspbianBugs
     2018-05-16 17:57:18   os-release_HOME_URL http://www.raspbian.org/
     2018-05-16 17:57:18   os-release_ID   raspbian
     2018-05-16 17:57:18   os-release_ID_LIKE debian
     2018-05-16 17:57:18   os-release_NAME Raspbian GNU/Linux
     2018-05-16 17:57:18   os-release_PRETTY_NAME Raspbian GNU/Linux 9 (stretch)
     2018-05-16 17:57:18   os-release_SUPPORT_URL http://www.raspbian.org/RaspbianForums
     2018-05-16 17:57:18   os-release_VERSION 9 (stretch)
     2018-05-16 17:57:18   os-release_VERSION_ID 9
     2018-05-16 17:57:18   os-release_language de
     2018-06-01 12:09:31   repoSync        fetched
     2018-06-01 12:09:31   state           system is up to date
     2018-05-29 03:39:11   updatesAvailable 104
Attributes:
   room       AptToDate


Falls noch was gebraucht wird einfach Bescheid geben...
...bin allerdings die nächsten Tage dann mal "weg"...

EDIT: ssh werde ich die Tage evtl. auch mal ausprobieren... (OT: und meine FlowerSense wieder in Betrieb nehmen / wohl mit dem neuen Modul, mal sehen ;)  )

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

CoolTux

Da scheint etwas nicht geklappt zu haben

repoSync        fetched

Da muss eigentlich noch mehr stehen

repoSync        fetched done


Kannst du bitte mal auf verbose 4 stellen und noch mal ein sync machen.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

MadMax-FHEM

Klar (bevor ich dann aber leider weg muss, sorry...).

Hier log mit verbose 5:


2018.06.01 12:41:00 5: AptToDate (LocalSystem) - Notify: $VAR1 = [
          'state: repoSync in progress'
        ];

2018.06.01 12:41:00 4: AptToDate (LocalSystem) - execute command asynchronously (PID= 2645)
2018.06.01 12:41:00 4: AptToDate (LocalSystem) - control passed back to main loop.
Hit:1 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
2018.06.01 12:41:01 5: AptToDate (LocalSystem) - still waiting (read: no data).
Hit:3 https://deb.nodesource.com/node_8.x stretch InRelease
2018.06.01 12:41:02 5: AptToDate (LocalSystem) - still waiting (read: no data).
2018.06.01 12:41:03 5: AptToDate (LocalSystem) - still waiting (read: no data).
2018.06.01 12:41:04 5: AptToDate (LocalSystem) - still waiting (read: no data).
2018.06.01 12:41:05 5: AptToDate (LocalSystem) - still waiting (read: no data).
2018.06.01 12:41:07 1: [Freezemon] FreezeMon: possible freeze starting at 12:41:06, delay is 1.2 possibly caused by: tmr-AptToDate_PollChild(LocalSystem)
2018.06.01 12:41:08 5: AptToDate (LocalSystem) - still waiting (read: no data).
2018.06.01 12:41:09 5: AptToDate (LocalSystem) - still waiting (read: no data).
Reading package lists...
2018.06.01 12:41:10 5: AptToDate (LocalSystem) - still waiting (read: no data).
2018.06.01 12:41:11 4: AptToDate (LocalSystem) - got result from asynchronous parsing.
2018.06.01 12:41:11 4: AptToDate (LocalSystem) - asynchronous finished.
2018.06.01 12:41:11 4: AptToDate (LocalSystem) - clean Subprocess
2018.06.01 12:41:11 4: AptToDate (LocalSystem) - JSON: {}
2018.06.01 12:41:11 4: AptToDate (LocalSystem) - Write Readings
2018.06.01 12:41:11 5: AptToDate (LocalSystem) - $VAR1 = {};

2018.06.01 12:41:11 5: AptToDate (LocalSystem) - Packges Anzahl: 0
2018.06.01 12:41:11 5: AptToDate (LocalSystem) - Inhalt aptget cmd: 0
2018.06.01 12:41:11 5: AptToDate (LocalSystem) - Notify: $VAR1 = [
          'repoSync: fetched error',
          'state: system is up to date'
        ];



Aber ich war "böse" ;)

Also folgendes:

Ich hatte zuvor eine allererste alte Version (0.0.62)...
Damit habe ich das dann "entdeckt"...
Dann versucht mittels update die neueste Version zu kriegen (nichts gekommen)...
Dann direkt von git die Version 0.2.2 runtergeladen und eingespielt.
Bei reload einen Fehler bekommen und dann eben mittels "shutdown restart"...
Ging aber eben immer noch das Reading (ok, hatte vergessen neu abzurufen [glaube ich])...

Jetzt bekomme ich einen repoSync Fehler...

Hier ein aktuelles list:


Internals:
   DEF        localhost
   HOST       localhost
   NAME       LocalSystem
   NOTIFYDEV  global,LocalSystem
   NR         446
   NTFY_ORDER 50-LocalSystem
   STATE      system is up to date
   TYPE       AptToDate
   VERSION    0.2.2
   READINGS:
     2018-05-16 17:57:18   os-release_BUG_REPORT_URL http://www.raspbian.org/RaspbianBugs
     2018-05-16 17:57:18   os-release_HOME_URL http://www.raspbian.org/
     2018-05-16 17:57:18   os-release_ID   raspbian
     2018-05-16 17:57:18   os-release_ID_LIKE debian
     2018-05-16 17:57:18   os-release_NAME Raspbian GNU/Linux
     2018-05-16 17:57:18   os-release_PRETTY_NAME Raspbian GNU/Linux 9 (stretch)
     2018-05-16 17:57:18   os-release_SUPPORT_URL http://www.raspbian.org/RaspbianForums
     2018-05-16 17:57:18   os-release_VERSION 9 (stretch)
     2018-05-16 17:57:18   os-release_VERSION_ID 9
     2018-05-16 17:57:18   os-release_language de
     2018-06-01 12:41:11   repoSync        fetched error
     2018-06-01 12:41:11   state           system is up to date
     2018-05-29 03:39:11   updatesAvailable 104
   helper:
     lastSync   2018-06-01
Attributes:
   room       AptToDate
   verbose    5


Sorry, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

CoolTux

Ich schlage vor Du legst am besten das Device noch einmal neu an mit der aktuellen 0.2.2er version.


Grüße
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Shojo

Erstmal Danke für das Modul, das gefällt mir sehr! ;)

Lauft auch ohne Probleme auf mein System!



Internals:
   CFGFN     
   DEF        localhost
   HOST       localhost
   NAME       meinFHEMserver
   NOTIFYDEV  global,meinFHEMserver
   NR         278
   NTFY_ORDER 50-meinFHEMserver
   STATE      system is up to date
   TYPE       AptToDate
   VERSION    0.2.2
   READINGS:
     2018-06-01 13:04:16   os-release_BUG_REPORT_URL https://bugs.debian.org/
     2018-06-01 13:04:16   os-release_HOME_URL http://www.debian.org/
     2018-06-01 13:04:16   os-release_ID   debian
     2018-06-01 13:04:16   os-release_NAME Debian GNU/Linux
     2018-06-01 13:04:16   os-release_PRETTY_NAME Debian GNU/Linux 8 (jessie)
     2018-06-01 13:04:16   os-release_SUPPORT_URL http://www.debian.org/support
     2018-06-01 13:04:16   os-release_VERSION 8 (jessie)
     2018-06-01 13:04:16   os-release_VERSION_ID 8
     2018-06-01 13:04:16   os-release_language en
     2018-06-01 13:05:04   repoSync        fetched done
     2018-06-01 13:06:01   state           system is up to date
     2018-06-01 13:05:58   toUpgrade       successful
     2018-06-01 13:06:01   updatesAvailable 0
   helper:
     lastSync   2018-06-01
Attributes:
   devStateIcon system.updates.available:security@red system.is.up.to.date:security@green
   room       9.6_System



Gruß
Dennis
FHEM auf: Shuttle PC (x64) (Docker)
Bridge: SignalESP 433mHz, ConBee (deCONZ in Docker)
Rest: ESP8266, SONOFF, Sonos, Echo Dot, Xiaomi Vacuum (root), ESP RGBWW Wifi Led Controller, Node-RED, LEDMatrix, Pixel It

MadMax-FHEM

Zitat von: CoolTux am 01 Juni 2018, 12:56:00
Ich schlage vor Du legst am besten das Device noch einmal neu an mit der aktuellen 0.2.2er version.


Grüße

Ok, ist ja kein Akt...

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)