[vermutlich gelöst?] kein Webzugriff nach Neuinstallation

Begonnen von andies, 25 Juni 2017, 23:23:44

Vorheriges Thema - Nächstes Thema

andies

Guten Abend, ich habe mir heute beim Wechsel von Speedport zur Fritz-Box anscheinend mein FHEM zerschossen. Also habe ich es komplett neu aufgesetzt (raspberry) und nur das Backup von gestern, als alles noch lief, eingespielt. Log mit Verbose 5 sagt

2017.06.25 23:00:38 5: Cmd: >define WEB FHEMWEB 8083<
2017.06.25 23:00:38 5: Loading ./FHEM/01_FHEMWEB.pm
2017.06.25 23:00:38 3: WEB: port 8083 opened
2017.06.25 23:00:38 5: Cmd: >attr WEB JavaScripts codemirror/fhem_codemirror.js<
2017.06.25 23:00:38 5: Cmd: >attr WEB confirmDelete 0<
2017.06.25 23:00:38 5: Cmd: >attr WEB confirmJSError 0<
2017.06.25 23:00:38 5: Cmd: >attr WEB csrfToken none<
2017.06.25 23:00:38 5: Cmd: >attr WEB editConfig 1<
2017.06.25 23:00:38 5: Cmd: >attr WEB endPlotNow 1<
2017.06.25 23:00:38 5: Cmd: >attr WEB hiddenroom Unsorted<
2017.06.25 23:00:38 5: Cmd: >attr WEB longpoll 1<
2017.06.25 23:00:38 5: Cmd: >attr WEB roomIcons Haus: Everything:<
2017.06.25 23:00:38 5: Cmd: >define WEBphone FHEMWEB 8084<

und so weiter, ich sehe keine Fehlermeldung. Dennoch ist der Webauftritt nicht erreichbar ("Diese Website ist nicht erreichbar
fhem.local hat die Verbindung abgelehnt."). Hat jemand eine Idee, in welche Richtung ich suchen soll? Vor dem Einspielen des Backups war noch alles in Butter.

PS FHEM läuft, das zeigt die Statusmeldung:
sudo service fhem status
● fhem.service - LSB: FHEM server
   Loaded: loaded (/etc/init.d/fhem)
   Active: active (running) since So 2017-06-25 23:18:07 CEST; 2s ago
  Process: 4925 ExecStop=/etc/init.d/fhem stop (code=exited, status=0/SUCCESS)
  Process: 4958 ExecStart=/etc/init.d/fhem start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/fhem.service
           └─4965 perl fhem.pl fhem.cfg

Jun 25 23:18:07 FHEM fhem[4958]: Starting fhem...
Jun 25 23:18:07 FHEM systemd[1]: Started LSB: FHEM server.
FHEM 6.1 auf RaspPi4 (Raspbian:  6.6.28+; Perl: v5.36.0)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

amenomade

Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

LuckyDay

#2
a. wie rufst du fhem auf? link bitte posten

b. was ist mit deinem nginx proxy? oder hast du jetzt ein nacktes Jessy genommen
c: ip kommt vom dhcp oder feste?
hat sich dein ip bereich geändert? irgendwelche allowfrom Attribute gesetzt?
Zitatfhem.local hat die Verbindung abgelehnt

der Satz ist interessant, dann müsstest auch im fhemlog ein Eintrag sein.

andies

#3
Vielen Dank für Eure Hilfe. Einen ersten Fehler habe ich schon gefunden, ich hatte diesen Teil in fhem.cfg nicht auskommentiert.


#define allowed_WEBphone allowed
#attr allowed_WEBphone basicAuth XXXXXXXXXXXXXXXXXXXXXX==
#attr allowed_WEBphone validFor WEBphone
#define allowed_WEB allowed
#attr allowed_WEB basicAuth XXXXXXXXXXXXXXXXXXXXXX==
#attr allowed_WEB validFor WEB
#define allowed_WEBtablet allowed
#attr allowed_WEBtablet basicAuth XXXXXXXXXXXXXXXXXXXXXX==
#attr allowed_WEBtablet validFor WEBtablet

(Ist das so richtig? Ich habe auch mal bei define allowed_ usw das # weggelassen, ohne Ergebnis.)

FHEM rufe ich so auf:
http://fhem.local:8083/fhem

avahi-daemon ist installiert, ich komme per ssh auf pi@fhem.local und auch ein Aufruf mit IP bringt nichts. IP ist fest, nginx auf dem neuen RPi gar nicht mehr installiert. Ich habe ein nacktes Jessie genommen (die minimale Version, ohne GUI). Der IP-Bereich hat sich geändert, von 192.168.2.100-200 auf 192.168.2.2-200. Und das komische ist, dass ich weder im Log noch im messages Einträge habe, die mir weiterhelfen:

2017.06.26 05:37:04 3: sduino IT: Code F1 not supported by IT_0FF000FFFF.
2017.06.26 05:37:04 3: sduino IT: Code F1 not supported by Steckdose_A.
2017.06.26 05:37:04 3: sduino IT: Code F1 not supported by IT_0FF000FFFF.
2017.06.26 05:37:04 3: sduino IT: Code F1 not supported by Steckdose_A.
2017.06.26 05:37:05 3: sduino IT: IT_0FF000FFFF off->on
2017.06.26 05:37:05 3: sduino IT: Steckdose_A off->on
2017.06.26 05:44:46 0: Server shutdown
2017.06.26 05:47:22 1: Including fhem.cfg
2017.06.26 05:47:22 3: telnetPort: port 7072 opened
2017.06.26 05:47:22 3: DbLog DbLog: Creating Push-Handle to database mysql:database=fhem;host=127.0.0.1;port=3306 with user root
2017.06.26 05:47:22 3: DbLog DbLog: Push-Handle to db mysql:database=fhem;host=127.0.0.1;port=3306 created
2017.06.26 05:47:22 3: WEB: port 8083 opened
2017.06.26 05:47:22 3: WEBphone: port 8084 opened
2017.06.26 05:47:22 3: WEBtablet: port 8085 opened
2017.06.26 05:47:23 2: eventTypes: loaded 814 events from ./log/eventTypes.txt
2017.06.26 05:47:23 3: sduino: IDlist MS 0 1 13 14 15 17 2 22 23 25 3 32 33 35 38 4 41 51 55 6 7
2017.06.26 05:47:23 3: sduino: IDlist MU 13.1 16 20 21 24 26 27 28 29 30 31 34 36 37 39 40 44 44.1 45 46 48 49 5 50 56 59 60 61 62 63 64 65 66 8 9
2017.06.26 05:47:23 3: sduino: IDlist MC 10 11 12 18 43 47 52 57 58
2017.06.26 05:47:23 3: Opening sduino device /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A104WS3F-if00-port0
2017.06.26 05:47:23 3: Setting sduino serial parameters to 57600,8,N,1
2017.06.26 05:47:23 1: sduino/define: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A104WS3F-if00-port0
2017.06.26 05:47:23 1: sduino/init: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A104WS3F-if00-port0
2017.06.26 05:47:23 3: sduino device opened
2017.06.26 05:47:23 3: sduino: setting Verbose to: 2
2017.06.26 05:47:23 3: wetter: Defined with URL http://api.wunderground.com/weatherstation/WXCurrentObXML.asp?ID=IBERLIN1692 and interval 6000
2017.06.26 05:47:23 1: PERL WARNING: Use of my $_ is experimental at ./FHEM/50_TelegramBot.pm line 3243.
2017.06.26 05:47:23 3: TelegramBot_Define TelegramBot: called
2017.06.26 05:47:24 2: Registering GEOFANCY geofancy for URL /geo...
2017.06.26 05:47:24 3: TabletUI: new ext defined infix:ftui/: dir:./www/tablet:
2017.06.26 05:47:24 3: Registering HTTPSRV TabletUI for URL /ftui   and assigned link ftui/ ...
2017.06.26 05:47:24 3: BVG: interval is 0, no periodic updates will done.
2017.06.26 05:47:24 3: BVG: Defined with URL http://transportrest-sbiermann.rhcloud.com/departureFHEM?from=9051371&provider=Bvg
2017.06.26 05:47:24 3: BVG: added hint :text,reading,internal,expression,delete to attr reading01MaxAgeReplacementMode in userattr list
2017.06.26 05:47:25 3: Flic: connecting to black (80:e4:da:XX:XX:XX)
2017.06.26 05:47:25 3: Opening miniCUL device 192.168.2.3:23
2017.06.26 05:47:34 1: Cannot init 192.168.2.3:23, ignoring it (miniCUL) # verstehe ich auch nicht, kann ich ueber Browser ansprechen
2017.06.26 05:47:34 1: Including ./log/fhem.save
2017.06.26 05:47:34 1: ./log/fhem.save: Please define allowed_WEB first   # ok, das stand noch im fhem.save...
Please define allowed_WEB first
Please define allowed_WEBphone first
Please define allowed_WEBphone first
Please define allowed_WEBtablet first
Please define allowed_WEBtablet first

2017.06.26 05:47:34 1: usb create starting
2017.06.26 05:47:34 3: Probing CUL device /dev/ttyAMA0
2017.06.26 05:47:35 3: Probing TCM_ESP3 device /dev/ttyAMA0
2017.06.26 05:47:35 3: Probing ZWDongle device /dev/ttyAMA0
2017.06.26 05:47:35 3: Probing FRM device /dev/ttyAMA0
2017.06.26 05:47:40 3: Probing TCM_ESP3 device /dev/ttyUSB1
2017.06.26 05:47:40 3: Probing TCM_ESP2 device /dev/ttyUSB1
2017.06.26 05:47:41 3: Probing FHZ device /dev/ttyUSB1
2017.06.26 05:47:41 3: Probing TRX device /dev/ttyUSB1
2017.06.26 05:47:42 3: Probing ZWDongle device /dev/ttyUSB1
2017.06.26 05:47:42 3: Probing FRM device /dev/ttyUSB1
2017.06.26 05:47:47 1: usb create end
2017.06.26 05:47:47 2: Messages collected while initializing FHEM: ./log/fhem.save: Please define allowed_WEB first Please define allowed_WEB first Please define allowed_WEBphone first Please define allowed_WEBphone first Please define allowed_WEBtablet first Please define allowed_WEBtablet first
2017.06.26 05:47:47 0: Featurelevel: 5.8
2017.06.26 05:47:47 0: Server started with 80 defined entities (fhem.pl:14348/2017-05-22 perl:5.020002 os:linux user:fhem pid:10511)
2017.06.26 05:47:48 2: sduino: initialized. v3.3.1-dev #mehr habe ich nicht?!


Messages hat nur
Jun 26 05:52:55 FHEM rsyslogd-2007: action 'action 17' suspended, next retry is Mon Jun 26 05:54:25 2017 [try http://www.rsyslog.com/e/2007 ]

und davon hunderte Einträge.
FHEM 6.1 auf RaspPi4 (Raspbian:  6.6.28+; Perl: v5.36.0)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

andies

Und das ist doch richtig so, oder?

define WEB FHEMWEB 8083
attr WEB JavaScripts codemirror/fhem_codemirror.js
attr WEB confirmDelete 0
attr WEB confirmJSError 0
attr WEB csrfToken none
attr WEB editConfig 1
attr WEB endPlotNow 1
attr WEB hiddenroom Unsorted
attr WEB longpoll 1
FHEM 6.1 auf RaspPi4 (Raspbian:  6.6.28+; Perl: v5.36.0)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

andies

#5
Also, ich bin jetzt wie folgt vorgegangen. Ich habe FHEM neu aufgesetzt und bin Zeile für Zeile meiner alten Installation durchgegangen. Das Problem trat in dem Moment auf, als ich eingegeben habe:
defmode WEB FHEMWEB 8083 global
attr WEB JavaScripts codemirror/fhem_codemirror.js
attr WEB confirmDelete 0
attr WEB confirmJSError 0
attr WEB csrfToken none
attr WEB editConfig 1
attr WEB endPlotNow 1
attr WEB hiddenroom Unsorted
attr WEB longpoll 1
attr WEB roomIcons Haus: Everything:
attr WEB sortRooms Schalter Wetter System Kameras _LogFiles

Danach ist Schluss.

[EDIT] Also, es scheint komplizierter. Inzwischen glaube ich zu wissen, was das Problem war. Ich hatte ursprünglich einen reverse proxy installiert und daher das device WEB nicht auf global gesetzt. Das klappte wegen des proxy. Dann habe ich den ausgeschaltet (Fritz!Box mit VPN) und vergessen, global wieder einzuschalten. Vermutlich war deshalb das Frontend nicht von außen erreichbar.

Warum dann aber die oben genannte Definition Probleme aufwirft, war mir nicht klar (Fehlermeldung ist "8083 ist schon belegt"). Allerdings lässt sich das Problem durch einen einfachen Neustart von FHEM beheben.
FHEM 6.1 auf RaspPi4 (Raspbian:  6.6.28+; Perl: v5.36.0)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann

Jorge3711

FHEMWEB über die IP-Adresse statt fhem.local erreichbar?

Ich denke für URI sollte eher mit fhem.fritz.box beginnen, sofern du in der FritzBox den Netzwerknamen nicht geändert hast.


Gesendet von iPhone mit Tapatalk

andies

Inzwischen alles gelöst und ich vermute, dass fehlende Wort global hat damals die Probleme verursacht (kann ich jetzt nicht mehr nachprüfen, weil ich das System platt gemacht hatte). Und die Irritation mit "8083 schon belegt" ist nicht reproduzierbar.


Gesendet von iPhone mit Tapatalk Pro
FHEM 6.1 auf RaspPi4 (Raspbian:  6.6.28+; Perl: v5.36.0)
SIGNALduino (433 MHz) und HM-UART (868 MHz), Sonoff, Blitzwolf, Somfy RTS, CAME-Gartentor, Volkszähler, Keyence-Sensor, Homematic-Sensoren und -thermostat, Ferraris-Zähler für Wasseruhr, Openlink-Nachbau Viessmann