Hallo Rudi,
bei mir habe ich im 71_YAMAHA_AVR Modul festgestellt, dass die Namensauflösung nicht mehr funktioniert ...
Nach löschen des dnsserver Attributs klappt es wieder einwandfrei ;-)
Folgendes habe ich im fhemlog gefunden:
2018.05.16 12:26:33 4: YAMAHA_AVR (Yamaha) - could not execute command "statusRequest unitDescription": DNS: No A record found
folgendes liefert mir dig und nslookup zurück
fhem@fhemi3:~/log$ nslookup yamaha 172.17.1.1
Server: 172.17.1.1
Address: 172.17.1.1#53
Name: Yamaha.heibox.intern
Address: 172.17.3.50
fhem@fhemi3:~/log$ dig yamaha.heibox.intern @172.17.1.1
; <<>> DiG 9.9.5-9+deb8u15-Debian <<>> yamaha.heibox.intern @172.17.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27486
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;yamaha.heibox.intern. IN A
;; ANSWER SECTION:
Yamaha.heibox.intern. 3600 IN A 172.17.3.50
;; AUTHORITY SECTION:
heibox.intern. 38400 IN NS core.
;; Query time: 1 msec
;; SERVER: 172.17.1.1#53(172.17.1.1)
;; WHEN: Wed May 16 12:44:35 CEST 2018
;; MSG SIZE rcvd: 90
fhem@fhemi3:~/log$
noch eine Zusatzinfo: Ich habe eine 24er Netzmaske und keine 16er wie es auf den ersten Blick aussehen könnte
Ich kann den Fehler jederzeit problemlos nachstellen :-) Wenn Du noch Infos braucht - bitte melden
Liebe Grüße
Ralf
Kannst du bitte Folgendes ausfuehren:
attr global verbose 5
attr global dnsServer 172.17.1.1
{ HttpUtils_gethostbyname({timeout=>2},"yamaha",0,sub(){Log 1, sprintf("DNS TEST ERR:%s IP:%s", $_[1]?$_[1]:"",$_[2]?ip2str($_[2]):"") })}
attr global dnsServer 8.8.8.8
{ HttpUtils_gethostbyname({timeout=>2},"fhem.de",0,sub(){Log 1, sprintf("DNS TEST ERR:%s IP:%s", $_[1]?$_[1]:"",$_[2]?ip2str($_[2]):"") })}
Danach alle Zeilen mit DNS aus FHEM.log hier posten.
Zitat von: rudolfkoenig am 18 Mai 2018, 16:53:16
Kannst du bitte Folgendes ausfuehren:
attr global verbose 5
attr global dnsServer 172.17.1.1
{ HttpUtils_gethostbyname({timeout=>2},"yamaha",0,sub(){Log 1, sprintf("DNS TEST ERR:%s IP:%s", $_[1]?$_[1]:"",$_[2]?ip2str($_[2]):"") })}
attr global dnsServer 8.8.8.8
{ HttpUtils_gethostbyname({timeout=>2},"fhem.de",0,sub(){Log 1, sprintf("DNS TEST ERR:%s IP:%s", $_[1]?$_[1]:"",$_[2]?ip2str($_[2]):"") })}
Danach alle Zeilen mit DNS aus FHEM.log hier posten.
Hallo Rudi,
hier ist das Schnipsel aus dem LogFile:
2018.05.18 20:40:19 5: Cmd: >attr global dnsServer 172.17.1.1<
2018.05.18 20:40:19 5: Starting notify loop for global, 1 event(s), first is ATTR global dnsServer 172.17.1.1
2018.05.18 20:40:35 5: Cmd: >{ HttpUtils_gethostbyname({timeout=>2},"yamaha",0,sub(){Log 1, sprintf("DNS TEST ERR:%s IP:%s", $_[1]?$_[1]:"",$_[2]?ip2str($_[2]):"") })}<
2018.05.18 20:40:35 5: DNS QUERY 7072010000010000000000000679616d6168610000010001
2018.05.18 20:40:35 5: DNS ANSWER 99:7072818300010000000100000679616d6168610000010001000006000100002a30004001610c726f6f742d73657276657273036e657400056e73746c640c766572697369676e2d67727303636f6d00784906d8000007080000038400093a8000015180
2018.05.18 20:40:35 1: DNS TEST ERR:DNS: No A record found IP:
... unneeded lines deleted
2018.05.18 20:40:48 5: Cmd: >attr global dnsServer 8.8.8.8<
2018.05.18 20:40:48 5: Starting notify loop for global, 1 event(s), first is ATTR global dnsServer 8.8.8.8
2018.05.18 20:41:01 5: Cmd: >{ HttpUtils_gethostbyname({timeout=>2},"fhem.de",0,sub(){Log 1, sprintf("DNS TEST ERR:%s IP:%s", $_[1]?$_[1]:"",$_[2]?ip2str($_[2]):"") })}<
2018.05.18 20:41:01 5: DNS QUERY 707201000001000000000000046668656d0264650000010001
2018.05.18 20:41:01 5: DNS ANSWER 41:707281800001000100000000046668656d0264650000010001c00c0001000100002f42000458631fca
2018.05.18 20:41:01 4: DNS result for fhem.de: 88.99.31.202, ttl:12098
2018.05.18 20:41:01 1: DNS TEST ERR: IP:88.99.31.202
und das hat er bei deiner Abfrage mit fqdn gebracht:
2018.05.18 21:08:11 5: Cmd: >{ HttpUtils_gethostbyname({timeout=>2},"yamaha.heibox.intern",0,sub(){Log 1, sprintf("DNS TEST ERR:%s IP:%s", $_[1]?$_[1]:"",$_[2]?ip2str($_[2]):"") })}<
2018.05.18 21:08:11 5: DNS QUERY 7072010000010000000000000679616d61686106686569626f7806696e7465726e0000010001
2018.05.18 21:08:11 5: DNS ANSWER 79:7072858000010001000100000679616d61686106686569626f7806696e7465726e00000100010659616d616861c0130001000100000e100004ac110332c0130002000100009600000604636f726500
2018.05.18 21:08:11 1: PERL WARNING: substr outside of string at FHEM/HttpUtils.pm line 154.
2018.05.18 21:08:11 1: stacktrace:
2018.05.18 21:08:11 1: main::__ANON__ called by FHEM/HttpUtils.pm (154)
2018.05.18 21:08:11 1: main::HttpUtils_dnsParse called by FHEM/HttpUtils.pm (262)
2018.05.18 21:08:11 1: main::__ANON__[FHEM/HttpUtils.pm:270] called by fhem.pl (705)
2018.05.18 21:08:11 1: PERL WARNING: Use of uninitialized value in unpack at FHEM/HttpUtils.pm line 154.
2018.05.18 21:08:11 1: stacktrace:
2018.05.18 21:08:11 1: main::__ANON__ called by FHEM/HttpUtils.pm (154)
2018.05.18 21:08:11 1: main::HttpUtils_dnsParse called by FHEM/HttpUtils.pm (262)
2018.05.18 21:08:11 1: main::__ANON__[FHEM/HttpUtils.pm:270] called by fhem.pl (705)
2018.05.18 21:08:11 1: PERL WARNING: Use of uninitialized value $l in numeric ne (!=) at FHEM/HttpUtils.pm line 154.
2018.05.18 21:08:11 1: stacktrace:
2018.05.18 21:08:11 1: main::__ANON__ called by FHEM/HttpUtils.pm (154)
2018.05.18 21:08:11 1: main::HttpUtils_dnsParse called by FHEM/HttpUtils.pm (262)
2018.05.18 21:08:11 1: main::__ANON__[FHEM/HttpUtils.pm:270] called by fhem.pl (705)
2018.05.18 21:08:11 1: PERL WARNING: substr outside of string at FHEM/HttpUtils.pm line 158.
2018.05.18 21:08:11 1: stacktrace:
2018.05.18 21:08:11 1: main::__ANON__ called by FHEM/HttpUtils.pm (158)
2018.05.18 21:08:11 1: main::HttpUtils_dnsParse called by FHEM/HttpUtils.pm (262)
2018.05.18 21:08:11 1: main::__ANON__[FHEM/HttpUtils.pm:270] called by fhem.pl (705)
2018.05.18 21:08:11 1: PERL WARNING: Use of uninitialized value in unpack at FHEM/HttpUtils.pm line 158.
2018.05.18 21:08:11 1: stacktrace:
2018.05.18 21:08:11 1: main::__ANON__ called by FHEM/HttpUtils.pm (158)
2018.05.18 21:08:11 1: main::HttpUtils_dnsParse called by FHEM/HttpUtils.pm (262)
2018.05.18 21:08:11 1: main::__ANON__[FHEM/HttpUtils.pm:270] called by fhem.pl (705)
2018.05.18 21:08:11 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at FHEM/HttpUtils.pm line 158.
2018.05.18 21:08:11 1: stacktrace:
2018.05.18 21:08:11 1: main::__ANON__ called by FHEM/HttpUtils.pm (158)
2018.05.18 21:08:11 1: main::HttpUtils_dnsParse called by FHEM/HttpUtils.pm (262)
2018.05.18 21:08:11 1: main::__ANON__[FHEM/HttpUtils.pm:270] called by fhem.pl (705)
2018.05.18 21:08:11 1: PERL WARNING: substr outside of string at FHEM/HttpUtils.pm line 160.
2018.05.18 21:08:11 1: stacktrace:
2018.05.18 21:08:11 1: main::__ANON__ called by FHEM/HttpUtils.pm (160)
2018.05.18 21:08:11 1: main::HttpUtils_dnsParse called by FHEM/HttpUtils.pm (262)
2018.05.18 21:08:11 1: main::__ANON__[FHEM/HttpUtils.pm:270] called by fhem.pl (705)
2018.05.18 21:08:11 1: PERL WARNING: Use of uninitialized value in unpack at FHEM/HttpUtils.pm line 160.
2018.05.18 21:08:11 1: stacktrace:
2018.05.18 21:08:11 1: main::__ANON__ called by FHEM/HttpUtils.pm (160)
2018.05.18 21:08:11 1: main::HttpUtils_dnsParse called by FHEM/HttpUtils.pm (262)
2018.05.18 21:08:11 1: main::__ANON__[FHEM/HttpUtils.pm:270] called by fhem.pl (705)
2018.05.18 21:08:11 1: PERL WARNING: Use of uninitialized value in numeric eq (==) at FHEM/HttpUtils.pm line 160.
2018.05.18 21:08:11 1: stacktrace:
2018.05.18 21:08:11 1: main::__ANON__ called by FHEM/HttpUtils.pm (160)
2018.05.18 21:08:11 1: main::HttpUtils_dnsParse called by FHEM/HttpUtils.pm (262)
2018.05.18 21:08:11 1: main::__ANON__[FHEM/HttpUtils.pm:270] called by fhem.pl (705)
2018.05.18 21:08:11 1: DNS TEST ERR:DNS: No A record found IP:
Interessanterweise klappt es mit
nslookup aber nicht mit
dig
fhem@fhemi3:~/log$ dig yamaha @172.17.1.1
; <<>> DiG 9.9.5-9+deb8u15-Debian <<>> yamaha @172.17.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 55776
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;yamaha. IN A
;; AUTHORITY SECTION:
. 9575 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2018051800 1800 900 604800 86400
;; Query time: 1 msec
;; SERVER: 172.17.1.1#53(172.17.1.1)
;; WHEN: Fri May 18 21:01:00 CEST 2018
;; MSG SIZE rcvd: 110
fhem@fhemi3:~/log$ dig yamaha.heibox.intern @172.17.1.1
; <<>> DiG 9.9.5-9+deb8u15-Debian <<>> yamaha.heibox.intern @172.17.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31410
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;yamaha.heibox.intern. IN A
;; ANSWER SECTION:
Yamaha.heibox.intern. 3600 IN A 172.17.3.50
;; AUTHORITY SECTION:
heibox.intern. 38400 IN NS core.
;; Query time: 1 msec
;; SERVER: 172.17.1.1#53(172.17.1.1)
;; WHEN: Fri May 18 21:01:04 CEST 2018
;; MSG SIZE rcvd: 90
fhem@fhemi3:~/log$ nslookup yamaha 172.17.1.1
Server: 172.17.1.1
Address: 172.17.1.1#53
Name: Yamaha.heibox.intern
Address: 172.17.3.50
fhem@fhemi3:~/log$ nslookup yamaha.heibox.intern 172.17.1.1
Server: 172.17.1.1
Address: 172.17.1.1#53
Name: Yamaha.heibox.intern
Address: 172.17.3.50
fhem@fhemi3:~/log$ cat /etc/resolv.conf
domain heibox.intern
search heibox.intern
nameserver 172.17.1.1
nameserver 8.8.8.8
fhem@fhemi3:~/log$
Vorneweg: der DNS-Parser in FHEM ist primitiv gehalten, da ich keine Wissenschaft daraus machen wollte.
Dein DNS Server kennt yamaha nicht, nur yamaha.heimbox.intern. Manche DNS clients haengen automatisch den aktuellen domain Namen dran, der nonblocking DNS-Client in FHEM macht das nicht.
Weiterhin ist der Name als Yamaha (Y gross) hinterlegt, deswegen liefert der Server den korrigierten Namen zurueck, und da er superschlau ist, laesst heimbox.intern weg. Mein Parser kannte das komplette Weglassen des Namens im Antwort, aber nicht das teilweise Weglassen (nennt sich DNS Packet compression), das habe ich jetzt eingebaut, damit sollte die Aufloesung bei Dir klappen.
Danke :-)
Ändere gleich noch das Gerät auf Kleinbuchstaben und wenn der DHCP Lease abgelaufen ist, wird er auch automatisch korrigiert