Another gassistant-fhem process is running!

Begonnen von KlaGho, 04 Juni 2020, 12:35:10

Vorheriges Thema - Nächstes Thema

KlaGho

Hallo, nach shutdown+restart bekomme ich folgende Fehlermeldung im gassistant-log (s.u.)
gassistant startet erst wieder, wenn ich den Process manuell via ssh-terminal stoppe ( kill pid#).

Wenn ich vor dem shutdown+restart gassistant über FHEM services stoppe ist alles ok, d.h. gassistant startet automatisch nach dem FHEM wieder aktiv ist.

Vielen Dank für jede Hilfe
gho

Hier das Listing gassistant:

Internals:
   FD         40
   FUUID      5c7d4ecb-f33f-2206-847c-0ae65257914ac28b
   LAST_START 2020-06-04 11:35:30
   LAST_STOP  2020-06-04 11:35:10
   NAME       gassistant
   NOTIFYDEV  global,global:npmjs.*gassistant-fhem.*
   NR         344
   NTFY_ORDER 50-gassistant
   PID        1981
   STARTS     10
   STATE      running /usr/bin/gassistant-fhem
   TYPE       gassistant
   currentlogfile ./log/gassistant-2020-06-04.log
   logfile    ./log/gassistant-%Y-%m-%d.log
   CoProcess:
     cmdFn      gassistant_getCMD
     name       gassistant-fhem
     state      running /usr/bin/gassistant-fhem
   READINGS:
     2020-06-04 11:35:30   gassistant-fhem running /usr/bin/gassistant-fhem
     2020-06-04 11:35:44   gassistant-fhem-connection connected
     2020-06-04 11:28:36   gassistant-fhem-googleSync Google SYNC finished
     2020-06-04 11:35:36   gassistant-fhem-lastServerError none
     2020-06-04 11:35:42   gassistant-fhem-lasterror none
     2020-06-04 11:35:40   gassistant-fhem-localHome inactive
     2020-06-04 11:28:36   gassistant-fhem-usedFeatureLevel 3
     2020-06-04 11:35:36   gassistant-fhem-version 3.0.2
     2020-06-04 11:35:37   gassistant-fhem-versionAvailable 3.0.2
     2020-06-04 11:35:36   gassistantFHEM.loginURL <html><a href="https://fhemconnector.eu.auth0.com/authorize?audience=https://europe-west1-fhem-ga-connector.cloudfunctions.net/&scope=offline_access%20openid%20profile&response_type=code&client_id=EI0TI2Y0W1743Ico53Nvsg1FsmoZniCC&code_challenge=2XY6kGWmf8GwEbWsukayVVlnUQQqv59c_PX2ok6KtP4&code_challenge_method=S256&redirect_uri=https://europe-west1-fhem-ga-connector.cloudfunctions.net/codelanding/start" target="_blank">Click here to login (new window/tab)</a><br></html>
     2020-04-21 22:25:18   gassistantFHEM.refreshToken crypt:7f745e73616d7b19690c055b19016a78564365267b617d572f315d720356010c06034162037d4502042616425b
Attributes:
   DbLogExclude .*
   alias      4 gassistant
   devStateIcon stopped:control_home@red:start stopping:control_on_off@orange running.*:control_on_off@green:stop
   gassistantFHEM-config ./gassistant-fhem.cfg
   gassistantFHEM-log ./log/gassistant-%Y-%m-%d.log
   group      Services
   icon       hue_room_garage
   nrarchive  3
   room       System
   stateFormat gassistant-fhem



Hier der Log-Auszug:
Another gassistant-fhem process is running!
PID: 1097, COMMAND: /usr/bin/node, ARGUMENTS: /usr/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/worker.js,41807
###############################################################
Loading cli.js...
Loading version.js...
Loading server.js...
Loading user.js...
Loading logger.js...
Loading fhem.js...
Loading database.js...
Loading localhandleQUERY.js...
Loading utils.js...
Loading localserver.js...
Loading localhandleEXECUTE.js...
[6/4/2020, 11:35:35 AM] using ./gassistant-fhem.cfg
[6/4/2020, 11:35:35 AM] ---
[6/4/2020, 11:35:35 AM] config:
{"connections":[{"webname":"fhem","server":"127.0.0.1","name":"FHEM","filter":"room=GoogleAssistant","port":"8083"}],"gassistant":{"description":"FHEM Connect"}}
[6/4/2020, 11:35:35 AM] ---
[6/4/2020, 11:35:35 AM] Google Assistant FHEM Connect 3.0.2 started
[6/4/2020, 11:35:35 AM] Fetching FHEM connections...
[6/4/2020, 11:35:35 AM] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1591263335481
[6/4/2020, 11:35:36 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE%3Dgassistant&XHR=1
[6/4/2020, 11:35:36 AM] [FHEM] FHEM Google Assistant device detected: gassistant
[6/4/2020, 11:35:36 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-version%203.0.2&XHR=1
[6/4/2020, 11:35:36 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-lastServerError%20none&XHR=1
[6/4/2020, 11:35:36 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=set%20gassistant%20loginURL%20https%3A%2F%2Ffhemconnector.eu.auth0.com%2Fauthorize%3Faudience%3Dhttps%3A%2F%2Feurope-west1-fhem-ga-connector.cloudfunctions.net%2F%26scope%3Doffline_access%2520openid%2520profile%26response_type%3Dcode%26client_id%3DEI0TI2Y0W1743Ico53Nvsg1FsmoZniCC%26code_challenge%3D2XY6kGWmf8GwEbWsukayVVlnUQQqv59c_PX2ok6KtP4%26code_challenge_method%3DS256%26redirect_uri%3Dhttps%3A%2F%2Feurope-west1-fhem-ga-connector.cloudfunctions.net%2Fcodelanding%2Fstart&XHR=1
[6/4/2020, 11:35:36 AM] [FHEM] Get refresh token...
[6/4/2020, 11:35:36 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=get%20gassistant%20refreshToken&XHR=1
[6/4/2020, 11:35:36 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connecting...&XHR=1
[6/4/2020, 11:35:36 AM] [FHEM] Found refresh token in reading
[6/4/2020, 11:35:37 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-versionAvailable%203.0.2&XHR=1
[6/4/2020, 11:35:38 AM] Refresh tokens finished. Next refresh in 86400 seconds.
[6/4/2020, 11:35:38 AM] [FHEM] refreshAllTokens executed
[6/4/2020, 11:35:40 AM] Start Connection and listen for Firebase
[6/4/2020, 11:35:40 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-localHome%20inactive&XHR=1
[6/4/2020, 11:35:40 AM] [LOCAL] FHEM Connect Google local home server running on port 37000
[6/4/2020, 11:35:41 AM] [FHEM] Fetching FHEM devices...
[6/4/2020, 11:35:41 AM] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=GoogleAssistant&XHR=1
[6/4/2020, 11:35:41 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-lasterror%20none&XHR=1
[6/4/2020, 11:35:41 AM] [FHEM] Checking devices and attributes...
[6/4/2020, 11:35:41 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&XHR=1
[6/4/2020, 11:35:41 AM] [FHEM] Connection: OK
[6/4/2020, 11:35:42 AM] SERVER FeatureLevel:{"featurelevel":3,"changelog":"performance optimizations"}
[6/4/2020, 11:35:42 AM] SYNC   FeatureLevel:{"featurelevel":3}
[6/4/2020, 11:35:42 AM] [FHEM] got: 28 results
[6/4/2020, 11:35:42 AM] [LOCAL] Bonjour successfully published
[6/4/2020, 11:35:42 AM] [LOCAL] Local Home ready
[6/4/2020, 11:35:42 AM] [FHEM] Supported Google Device Types: ac_unit,aircondition,airfreshener,airpurifier,awning,bathtub,bed,blender,blinds,boiler,camera,carbon_monoxide_detector,charger,closet,coffee_maker,coffeemaker,cooktop,curtain,dehumidifier,dehydrator,dishwasher,door,drawer,dryer,fan,faucet,fireplace,fryer,garage,gate,grill,heater,hood,humidifier,kettle,light,lock,remotecontrol,mop,mower,microwave,multicooker,network,outlet,oven,pergola,petfeeder,pressurecooker,radiator,refrigerator,router,scene,securitysystem,settop,sensor,shutter,shower,smoke_detector,sousvide,sprinkler,standmixer,switch,tv,thermostat,vacuum,valve,washer,waterheater,waterpurifier,watersoftener,window,yogurtmaker
[6/4/2020, 11:35:44 AM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connected&XHR=1
[6/4/2020, 11:35:44 AM] [FHEM] update reading: AZ_R_Clima:desired-temp = 20.0
[6/4/2020, 11:35:44 AM] [FHEM] update reading: AZ_R_Clima:measured-temp = 22.2

dominik

Hi,
passiert das jedes Mal? Eigentlich sollte beim shutdown+restart immer der Prozess automatisch beendet werden. Kannst du mal nur ein shutdown machen und prüfen was dann passiert?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

KlaGho

#2
Hallo Dominik,
ich steh jetzt etwas auf dem Schlauch: bei mir erfolgt nach einem Shutdown in der Kommandozeile IMMER auch ein Restart.
Keine Ahnung (bisher) warum das so ist, ich suche noch.

Edit:Und da ist auch schon der Forumsbeitrag mit Klärung:
https://forum.fhem.de/index.php/topic,81660.15.html

Aber ich habe bei diesen "Experimenten" zumindest etwas zum eigentlichen Problem gefunden:
Ich haben ein notify für den FHEM-restart. Hierin verursacht der "push notifier" das Problem mit dem nicht korrekten Gassistant-Start. Ohne "push notifier" startet gassistant fehlerlos. Ich kann damit erstmal leben und versuche mich mal an dem Problem mit dem "automatischen, ungewollten" Restart.

Vielen Dank für deine Hilfe und das tolle Modul
Günter

Hier noch das Notify-Listing (mit auskommentiertem push notifier)

Internals:
   DEF        global:INITIALIZED set telebot message @#KlaghoGruppe {(qx(hostname))} FHEM started;
{ DebianMailnbl('ghofun10@gmail.com',"FHEM restarted",qx(hostname).'FHEM restarted') };
#set pushmsg1 message test
   FUUID      5c505e99-f33f-2206-b5d8-907b8ab6582769f3
   NAME       n_fhem_reload
   NOTIFYDEV  global
   NR         338
   NTFY_ORDER 50-n_fhem_reload
   REGEXP     global:INITIALIZED
   STATE      2020-06-09 13:09:58
   TRIGGERTIME 1591701002.7862
   TYPE       notify
   READINGS:
     2020-06-09 13:09:53   state           active
Attributes:
   DbLogExclude .*
   group      Backup
   room       ,System,Telegram

dominik

Hmm...das mit dem push notify verstehe ich nicht, wie das mit gassistant zusammen haengt. Hast du da eine Erklaerung dafuer?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

KlaGho

#4
Ich habe schon viel versucht aber leider noch nichts Konkretes gefunden.
Werde noch mal mit höherem log-Levell nach Hinweisen suchen und berichten.

lg gho

EDIT: sehr peinlich, aber ich kann das Problem nicht mehr reproduzieren. Ich habe sogar ein Restore von gestern geladen: auch hier alles ok. Ich schließe diesen Fall.

Sorry für deinen Aufwand
lg gho