HttpUtils: SSL wants a read first

Begonnen von Loredo, 09 November 2015, 13:35:33

Vorheriges Thema - Nächstes Thema

Loredo

Hi,

da in letzter Zeit so viel an den HttpUtils geschraubt wurde bin ich nicht sicher, ob dieser Fehler damit zusammenhängen könnte:

http://forum.fhem.de/index.php/topic,16215.msg356795.html#msg356795

Beim Verbindungsaufbau kommt "manchmal" die Meldung "SSL wants a read first" zurück.
Ich selbst hatte das Problem noch nicht, nutze aber auch keinen RPi.

Die Vermutung liegt nahe, dass es an IO::Socket::SSL liegt. Ich weiß aber nicht, ob sich das aus HttpUtils heraus beeinflussen lässt...


Gruß
Julian




EDIT:

Vielleicht hilft das hier weiter?


Zitat
For read and write errors on non-blocking sockets, this method may include the string SSL wants a read first! or SSL wants a write first! meaning that the other side is expecting to read from or write to the socket and wants to be satisfied before you get to do anything. But with version 0.98 you are better comparing the global exported variable $SSL_ERROR against the exported symbols SSL_WANT_READ and SSL_WANT_WRITE.
Hat meine Arbeit dir geholfen? ⟹ https://paypal.me/pools/c/8gDLrIWrG9

Maintainer:
FHEM-Docker Image, https://github.com/fhem, Astro(Co-Maintainer), ENIGMA2, GEOFANCY, GUEST, HP1000, Installer, LaMetric2, MSG, msgConfig, npmjs, PET, PHTV, Pushover, RESIDENTS, ROOMMATE, search, THINKINGCLEANER

rudolfkoenig

Ist definitiv ein Problem in HttpUtils.pm, allerdings werde ich es ohne was Nachstellbares nicht fixen, dazu ist es fuer mich zu komplex.

Dr. Boris Neubert

Hallo,

das Problem tritt mit dem Calendar-Modul auf. Betateilchen und ich erhalten mit der neuen Version aus

http://forum.fhem.de/index.php/topic,46608.0.html

diese Meldung manchmal beim Abruf eines Google-Kalenders. Es tritt vermutlich bei allen Aufrufen von https:// auf, aber das neue Calendar-Modul meldet das Problem in den Readings explizit als Fehler.

Um es nachzustellen, brauchst Du einen privaten Google-Kalender, den Du mit dem Calendar-Modul ansprichst. Wenn Du den Kalender auf regelmäßigen Abruf stellst, müsstest Du irgendwann die Fehlersituation automatisch generieren.

Wenn Du Dich darauf einlassen willst, würde ich noch noch mehr Informationen zum Setup einer Teststellung nachliefern.

Viele Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

JoWiemann

Hallo,

anbei mal das List und ein Log-Auszug aus HTTPMOD


Internals:
   BUSY       0
   CFGFN      /opt/fhem/include/verkehrslage.cfg
   DEF        https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ

   GetSeq     0
   HTTPHEADER
   Interval   300
   LASTSEND   1454097048.6015
   MainURL    https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ

   NAME       Muehlheim
   NR         233
   STATE      Normal:00:56 Aktuell:00:53
   TRIGGERTIME 1454097348.59972
   TRIGGERTIME_FMT 2016-01-29 20:55:48
   TYPE       HTTPMOD
   addr       https://maps.googleapis.com:443
   buf        HTTP/1.0 200 OK

Content-Type: application/json; charset=UTF-8

Date: Fri, 29 Jan 2016 19:50:49 GMT

Expires: Fri, 29 Jan 2016 19:51:19 GMT

Cache-Control: public, max-age=30

Server: mafe

X-XSS-Protection: 1; mode=block

X-Frame-Options: SAMEORIGIN

Alternate-Protocol: 443:quic,p=1

Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"

Accept-Ranges: none

Vary: Accept-Encoding



{
   "destination_addresses" : [ "Am Schloß Broich, 45479 Mülheim an der Ruhr, Deutschland" ],
   "origin_addresses" : [ "Von-Werth-Straße 266, 50259 Pulheim, Deutschland" ],
   "rows" : [
      {
         "elements" : [
            {
               "distance" : {
                  "text" : "67,3 km",
                  "value" : 67254
               },
               "duration" : {
                  "text" : "56 Minuten",
                  "value" : 3337
               },
               "duration_in_traffic" : {
                  "text" : "53 Minuten",
                  "value" : 3159
               },
               "status" : "OK"
            }
         ]
      }
   ],
   "status" : "OK"
}

   code       200
   conn
   data
   displayurl https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ

   header
   host       maps.googleapis.com
   httpheader HTTP/1.0 200 OK

Content-Type: application/json; charset=UTF-8

Date: Fri, 29 Jan 2016 19:50:49 GMT

Expires: Fri, 29 Jan 2016 19:51:19 GMT

Cache-Control: public, max-age=30

Server: mafe

X-XSS-Protection: 1; mode=block

X-Frame-Options: SAMEORIGIN

Alternate-Protocol: 443:quic,p=1

Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"

Accept-Ranges: none

Vary: Accept-Encoding
   hu_blocking 0
   hu_filecount 361
   ignoreredirects 0
   loglevel   4
   path       /maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ
   protocol   https
   redirects  0
   timeout    2
   url        https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ

   QUEUE:
   Readings:
     2016-01-29 20:50:49   Standard        00:56
     2016-01-29 20:50:49   Verkehrslage    00:53
   Request:
     data
     header
     ignoreredirects 0
     retryCount 0
     type       Update
     url        https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ

   Sslargs:
Attributes:
   reading01Expr GoogleExpr($val)
   reading01Name Standard
   reading01Regex (?s)duration.* "(.* Minuten).*duration_in
   reading02Expr GoogleExpr($val)
   reading02Name Verkehrslage
   reading02Regex (?s)duration_in.*"(.* Minuten)
   room       Verkehr
   sslVersion TLSv12:!SSLv3
   stateFormat Normal:Standard Aktuell:Verkehrslage
   userattr   disable queueMax reading01Expr reading01Name reading01Regex reading02Expr reading02Name reading02Regex sslVersion stateFormat verbose




: Can't connect(2) to https://maps.googleapis.com:443:  SSL wants a read first
Error https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 13:46:20 GMT
Date: Thu, 28 Jan 2016 13:45:50 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 14:50:50 3: Muehlheim: Read callback: request type was Update,
Error https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Dortmund,Florianstr+15&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ: Can't connect(2) to https://maps.googleapis.com:443:  SSL wants a read first
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 13:41:19 GMT
Date: Thu, 28 Jan 2016 13:40:49 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 14:46:48 3: Dortmund: Read callback: request type was Update,
Error connect to to https://maps.googleapis.com:443 timed out
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 13:31:20 GMT
Date: Thu, 28 Jan 2016 13:30:50 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 14:40:49 3: Muehlheim: Read callback: request type was Update,
: Can't connect(2) to https://maps.googleapis.com:443:  SSL wants a read first
Error https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 13:31:20 GMT
Date: Thu, 28 Jan 2016 13:30:50 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 14:35:49 3: Muehlheim: Read callback: request type was Update,
: Can't connect(2) to https://maps.googleapis.com:443:  SSL wants a read first
Error https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 13:06:19 GMT
Date: Thu, 28 Jan 2016 13:05:49 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 14:25:49 3: Muehlheim: Read callback: request type was Update,
: Can't connect(2) to https://maps.googleapis.com:443:  SSL wants a read first
Error https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 13:06:19 GMT
Date: Thu, 28 Jan 2016 13:05:49 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 14:20:50 3: Muehlheim: Read callback: request type was Update,
Error https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Dortmund,Florianstr+15&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ: Can't connect(2) to https://maps.googleapis.com:443:  SSL wants a read first
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 13:11:18 GMT
Date: Thu, 28 Jan 2016 13:10:48 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 14:16:48 3: Dortmund: Read callback: request type was Update,
: Can't connect(2) to https://maps.googleapis.com:443:  SSL wants a read first
Error https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 13:06:19 GMT
Date: Thu, 28 Jan 2016 13:05:49 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 14:15:50 3: Muehlheim: Read callback: request type was Update,
Error connect to to https://maps.googleapis.com:443 timed out
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 13:06:19 GMT
Date: Thu, 28 Jan 2016 13:05:49 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 14:10:48 3: Muehlheim: Read callback: request type was Update,
Error https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Dortmund,Florianstr+15&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ: Can't connect(2) to https://maps.googleapis.com:443:  SSL wants a read first
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 12:59:17 GMT
Date: Thu, 28 Jan 2016 12:58:47 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 14:04:48 3: Dortmund: Read callback: request type was Update,
: Can't connect(2) to https://maps.googleapis.com:443:  SSL wants a read first
Error https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 12:36:17 GMT
Date: Thu, 28 Jan 2016 12:35:47 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 13:45:50 3: Muehlheim: Read callback: request type was Update,
Error connect to to https://maps.googleapis.com:443 timed out
Vary: Accept-Encoding, buffer empty,
Accept-Ranges: none
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Alternate-Protocol: 443:quic,p=1
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: mafe
Cache-Control: public, max-age=30
Expires: Thu, 28 Jan 2016 12:36:17 GMT
Date: Thu, 28 Jan 2016 12:35:47 GMT
Content-Type: application/json; charset=UTF-8
header: HTTP/1.0 200 OK
2016.01.28 13:40:48 3: Muehlheim: Read callback: request type was Update,


Vielleicht hilft es weiter.

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

rudolfkoenig

@Boris: Ich habe keine Ahnung von Google-Calender. Wenn ich eine Anleitung bekomme, versuche es zu debuggen.

@Jörg: Ich habe GoogleExpr($val) mit Log(1, "R1: $val") ersetzt (wusste nicht besser), damit kriege ich beim Start folgendes:
2016.01.30 15:05:29 1: Including cfg/fhem.cfg.test
2016.01.30 15:05:29 3: tPort: port 7072 opened
2016.01.30 15:05:29 3: web: port 8083 opened
2016.01.30 15:05:29 3: Muehlheim: Defined with URL https://maps.googleapis.com/maps/api/distancematrix/json?origins=Pulheim,Von-Werth-Str+266&destinations=Muelheim+an+der+ruhr,Am+Schloss+Broich&mode=driving&language=de-DE&departure_time=now&key=AIzaSyARC8Cei-T8HA8h662Aln2HSU7xEYf3orQ and interval 300
2016.01.30 15:05:29 1: R1: 1
2016.01.30 15:05:29 1: R2: 1
2016.01.30 15:05:29 3: Muehlheim: unknown attribute sslVersion. Type 'attr Muehlheim ?' for a detailed list.
2016.01.30 15:05:29 1: Including log/fhem.state.test
2016.01.30 15:05:29 1: configfile: Muehlheim: unknown attribute sslVersion. Type 'attr Muehlheim ?' for a detailed list.
2016.01.30 15:05:29 2: Messages collected while initializing FHEM: configfile: Muehlheim: unknown attribute sslVersion. Type 'attr Muehlheim ?' for a detailed list.
2016.01.30 15:05:29 0: Featurelevel: 5.7
2016.01.30 15:05:29 0: Server started with 5 defined entities (fhem.pl:10639/2016-01-26 perl:5.016002 os:darwin user:rudi pid:85998)
2016.01.30 15:05:31 1: R1: 56 Minuten
2016.01.30 15:05:31 1: PERL WARNING: Use of uninitialized value $val in concatenation (.) or string at ./FHEM/98_HTTPMOD.pm line 800.
2016.01.30 15:05:31 1: PERL WARNING: Use of uninitialized value $val in concatenation (.) or string at ./FHEM/98_HTTPMOD.pm line 821.
2016.01.30 15:05:31 1: R2: 58 Minuten


-> Kein "SSL wants a read first". Muss ich was besonderes beachten?


JoWiemann

Hallo Rudi,

anbei GoogleExp(), dass nur die Fahrzeiten extrahiert.


# ------------------------------------------------------------------------------------
# Funktion fuer Google-Maps
# 1. Rückgabe aus HTTPMod
# 2. Was ausgewertet wird
# ------------------------------------------------------------------------------------
sub
sub GoogleExpr($)
{
   my ($traffic) = @_;

   #zunächst die Minuten ermitteln
   $traffic =~ /([\d]+) Minuten?/;
   my $Std_Min = $1;
   my $Std_Std = "0";

   #falls Stunden angegeben sind, diese nun ermitteln
   if($traffic =~ /([\d]+) Stunden?/) { $Std_Std = $1; }

   return sprintf("%02d:%02d",$Std_Std,$Std_Min);
}


Der Fehler tritt leider nur sporadisch auf, manchmal zwei mal am Tag, manchmal gar nicht.

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

rudolfkoenig

ZitatDer Fehler tritt leider nur sporadisch auf, manchmal zwei mal am Tag, manchmal gar nicht.
Da hier alle 5 Minuten gepollt wird, sind das < 1% der Faelle, und damit sind die Beispiele nutzlos, und wir muessen das Problem durch Code-Betrachten loesen. Seufz.

Dr. Boris Neubert

Zitat von: rudolfkoenig am 30 Januar 2016, 15:13:44
@Boris: Ich habe keine Ahnung von Google-Calender. Wenn ich eine Anleitung bekomme, versuche es zu debuggen.

Ich habe den Testkalender für Dich hier jetzt 3 Stunden lang mit zehnsekündlichen Updates laufen lassen und das Problem ist kein einziges Mal aufgetreten. Vermutlich steht der Mond gerade günstig  >:(
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

rudolfkoenig

Ich habe den Code angestarrt, und habe eine Theorie: Die Meldung kommt dann zustande, wenn start_SSL innerhalb von Timeout keine Daten vom Server bekommt, insofern ist die Fehlermeldung zwar etwas irrefuehrend, aber es handelt sich nicht um ein Bug.

Worauf sich die Theorie stuetzt:
Die Meldung kommt aus HttpUtils_Connect2, am Anfang geht start_SSL schief. Hier wird "$hash->{conn}->blocking(1);" temporaer gesetzt, etwas ueberfluessig, weil start_SSL das (jedenfalls in meiner Perl Version 5.16) das auch temporaer setzt. start_SSL ruft connect_SSL auf, was wiederum die NET::SSLeay Routinen bedient, und falls sie mit "SSL wants a read first" Bedarf an Daten anmelden, setztz connect_SSL ein select mit timeout ab. Falls waehrend des Timeouts keine Daten kommen, bleibt SSL_ERROR auf "wants a read first", und start_SSL liefert timeout zurueck. HttpUtils_Connect2 meldet danach aber nur SSL_ERROR, weil das in der meisten Faellen aussagekraeftiger ist als $!.

Vorschlag: wir pruefen in HttpUtils_Connect2 SSL_ERROR auf diese Strings (want read/write), und melden timeout.

Dr. Boris Neubert

Hallo Rudi,

das ist für mich plausibel. Als die Meldungen gestern kamen, lief gerade ein Offsite-Backup oder ein Update, das meine DSL-Leitung verstopft haben könnte.

Du willst das folgende prüfen?

But with version 0.98 you are better comparing the global exported variable $SSL_ERROR against the exported symbols SSL_WANT_READ and SSL_WANT_WRITE.

Die meiner Meinung nach aussagekräftigste Fehlermeldung, die wir generieren können, wäre m.E. sprinf("$SSL_ERROR, but we had a timeout after %d seconds.", $hash->{timeout}) if($SSL_ERROR eq SSL_WANT_READ);

Finde ich gut. Würde auch vorab mit einer modifizierten Version von HttpUtils.pm (in diesem Thema angehängt) und unter Netzwerklast bei mir testen.

Ich habe mit 30 Sekunden ein üppiges Timeout im Calendar-Modul. Muss mal sehen, was ich an meinen QoS-Einstellungen für HTTPS-Traffic stellen kann.

Viele Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

Markus Bloch

Developer für Module: YAMAHA_AVR, YAMAHA_BD, FB_CALLMONITOR, FB_CALLLIST, PRESENCE, Pushsafer, LGTV_IP12, version

aktives Mitglied des FHEM e.V. (Technik)

rudolfkoenig

Der verlinkte Fall sollte mit diesem Problem hier aber nichts zu tun haben.