Telegram instant messaging TelegramBot - Empfangen und Senden per FHEM

Begonnen von viegener, 20 Juni 2015, 18:59:41

Vorheriges Thema - Nächstes Thema

neumann

Klar, gerne. Ich habe beide Dateien ersetzt, fhem neu gestartet und alles so gemacht wie du gesagt hast. Doch ich hatte einen Hänger (siehe die zeitliche Lücke).

Lg
Modulentwickler
- Spotify #72490
- Nello #75127

cawe

Hallo,

ich habe das gleiche Problem, FHEM blockiert seit kurzem regelmäßig für 2*pollingTimeout+ca. 5s. Am System wurde nichts (wissentlich) verändert, FHEM ist zuletzt im April aktualisiert worden.

Anbei der Log mit den instrumentierten HttpUtils und 50_TelegramBot, Hang zwischen 18:03:39 und 18:07:44

2017.08.18 18:03:39 1: HttpUtils - connect2 - in direct readfn
2017.08.18 18:03:39 1: <hidden>: HTTP response code 200
2017.08.18 18:03:39 1: HttpUtils <hidden>: Got data, length: 23
2017.08.18 18:03:39 2: HttpUtils response header:
HTTP/1.1 200 OK
Server: nginx/1.10.0
Date: Fri, 18 Aug 2017 16:03:39 GMT
Content-Type: application/json
Content-Length: 23
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Expose-Headers: Content-Length,Content-Type,Date,Server,Connection
Strict-Transport-Security: max-age=31536000; includeSubdomains
2017.08.18 18:03:39 5: TelegramBot_Callback Vh22Bot: called from Polling
2017.08.18 18:03:39 5: TelegramBot_Callback Vh22Bot: data returned :{"ok":true,"result":[]}:
2017.08.18 18:03:39 5: TelegramBot_Deepencode Vh22Bot: found an ARRAY
2017.08.18 18:03:39 5: TelegramBot_Deepencode Vh22Bot: encoded a String from :true: to :true:
2017.08.18 18:03:39 5: TelegramBot_Deepencode Vh22Bot: found a HASH
2017.08.18 18:03:39 5: TelegramBot_Callback Vh22Bot: after encoding
2017.08.18 18:03:39 5: TelegramBot_Callback Vh22Bot: polling returned result? 0
2017.08.18 18:03:39 5: UpdatePoll Vh22Bot: number of results 0
2017.08.18 18:03:39 5: TelegramBot_UpdatePoll Vh22Bot: called
2017.08.18 18:03:39 4: TelegramBot_UpdatePoll Vh22Bot: - Initiate non blocking polling - With callback set
2017.08.18 18:03:39 5: TelegramBot_readToken: Read Telegram API token from file
2017.08.18 18:03:39 4: TelegramBot_UpdatePoll Vh22Bot: initiate polling with nonblockingGet with 120s
2017.08.18 18:03:39 1: HttpUtils url=<hidden>
Use of uninitialized value in concatenation (.) or string at FHEM/HttpUtils.pm line 257.
2017.08.18 18:03:39 1: HttpUtils keepalive:   conn: No
2017.08.18 18:03:39 1: HttpUtils after connect 2
2017.08.18 18:03:39 1: HttpUtils nonblocking
2017.08.18 18:03:39 1: HttpUtils has non blocking conn
2017.08.18 18:03:39 1: HttpUtils x - in sub got iaddr: ????
2017.08.18 18:03:39 1: HttpUtils x - connect:
2017.08.18 18:03:39 1: HttpUtils x - got a connection set write fn
2017.08.18 18:03:39 1: HttpUtils x - start timer
2017.08.18 18:03:39 1: HttpUtils x - sub done
2017.08.18 18:03:39 4: TelegramBot_UpdatePoll Vh22Bot: - Ende > next polling started
2017.08.18 18:03:39 4: TelegramBot_Callback Vh22Bot: resulted in SUCCESS from Polling
2017.08.18 18:03:39 4: TelegramBot_Callback Vh22Bot: - polling so no retry
2017.08.18 18:03:39 4: TelegramBot_Callback Vh22Bot: - Ende > Control back to FHEM
2017.08.18 18:03:39 1: HttpUtils x - in write fn
2017.08.18 18:03:39 1: HttpUtils x - do connect2 in writeFn
2017.08.18 18:03:39 1: HttpUtils - in connect 2
2017.08.18 18:07:44 5: TelegramBot_Callback Vh22Bot: called from Polling
2017.08.18 18:07:44 5: TelegramBot_Callback Vh22Bot: polling returned result? <undef>
2017.08.18 18:07:44 5: Starting notify loop for Vh22Bot, 1 event(s), first is PollingLastError: NonBlockingGet: returned <hidden>: Can't connect(2) to https://api.telegram.org:443:  SSL wants a read first
2017.08.18 18:07:44 4: TelegramBot_Set Vh22Bot: called
2017.08.18 18:07:44 4: TelegramBot_Set Vh22Bot: Processing TelegramBot_Set( ? )
2017.08.18 18:07:44 4: TelegramBot_Set Vh22Bot: called
2017.08.18 18:07:44 4: TelegramBot_Set Vh22Bot: Processing TelegramBot_Set( ? )
2017.08.18 18:07:44 5: End notify loop for Vh22Bot
2017.08.18 18:07:44 5: Starting notify loop for Vh22Bot, 1 event(s), first is PollingErrCount: 1
2017.08.18 18:07:44 4: TelegramBot_Set Vh22Bot: called
2017.08.18 18:07:44 4: TelegramBot_Set Vh22Bot: Processing TelegramBot_Set( ? )
2017.08.18 18:07:44 4: TelegramBot_Set Vh22Bot: called
2017.08.18 18:07:44 4: TelegramBot_Set Vh22Bot: Processing TelegramBot_Set( ? )
2017.08.18 18:07:44 5: End notify loop for Vh22Bot
2017.08.18 18:07:44 5: TelegramBot_UpdatePoll Vh22Bot: called
2017.08.18 18:07:44 4: TelegramBot_UpdatePoll Vh22Bot: - Initiate non blocking polling - With callback set
2017.08.18 18:07:44 5: TelegramBot_readToken: Read Telegram API token from file
2017.08.18 18:07:44 4: TelegramBot_UpdatePoll Vh22Bot: initiate polling with nonblockingGet with 120s
2017.08.18 18:07:44 1: HttpUtils url=<hidden>
Use of uninitialized value in concatenation (.) or string at FHEM/HttpUtils.pm line 257.
2017.08.18 18:07:44 1: HttpUtils keepalive:   conn: No
2017.08.18 18:07:44 1: HttpUtils after connect 2
2017.08.18 18:07:44 1: HttpUtils nonblocking
2017.08.18 18:07:44 1: HttpUtils has non blocking conn
2017.08.18 18:07:44 1: HttpUtils x - in sub got iaddr: ????
2017.08.18 18:07:44 1: HttpUtils x - connect:
2017.08.18 18:07:44 1: HttpUtils x - got a connection set write fn
2017.08.18 18:07:44 1: HttpUtils x - start timer
2017.08.18 18:07:44 1: HttpUtils x - sub done
2017.08.18 18:07:44 4: TelegramBot_UpdatePoll Vh22Bot: - Ende > next polling started
2017.08.18 18:07:44 4: TelegramBot_Callback Vh22Bot: resulted in NonBlockingGet: returned <hidden>: Can't connect(2) to https://api.telegram.org:443:  SSL wants a read first from Polling
2017.08.18 18:07:44 4: TelegramBot_Callback Vh22Bot: - polling so no retry
2017.08.18 18:07:44 4: TelegramBot_Callback Vh22Bot: - Ende > Control back to FHEM
2017.08.18 18:07:44 1: Perfmon: possible freeze starting at 18:03:40, delay is 244.345





viegener

Zitat von: neumann am 18 August 2017, 18:24:50
Klar, gerne. Ich habe beide Dateien ersetzt, fhem neu gestartet und alles so gemacht wie du gesagt hast. Doch ich hatte einen Hänger (siehe die zeitliche Lücke).

Lg

Ja, die Lücke hatte ich übersehen.
Mir ist nur ein Rätsel, warum keine weiteren logeinträge aus httputils kommen, es kommt nur der originale EIntrag und nicht die von mir hinzugefügten. Kannst Du mal überprüfen, ob da noch eine andere Version von httputils (vielleicht mit anderen Gross/Kleinbuchstaben) rumliegt? --> siehe log von cawe

Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

viegener

Zitat von: cawe am 18 August 2017, 18:32:08
ich habe das gleiche Problem, FHEM blockiert seit kurzem regelmäßig für 2*pollingTimeout+ca. 5s. Am System wurde nichts (wissentlich) verändert, FHEM ist zuletzt im April aktualisiert worden.

Anbei der Log mit den instrumentierten HttpUtils und 50_TelegramBot, Hang zwischen 18:03:39 und 18:07:44

@cawe: Danke, das hilft weiter. Der Hänger tritt wohl in httputils auf - DNS-Anfrage läuft durch, dann kommt in connect2 der eigentlich Verbindungsaufbau und der hängt.

Ich muss also noch eine erweiterte Debug-Version erstellen.

Es scheint sich zu verdichten, dass Telegram wohl irgendetwas geändert hat und das führt in httputils zu den Hängern mit Fehlermeldung "SSL wants a read first".

Dann brauche ich wohl Rudi's Hilfe...
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

mbrak

 Was mich dann nur wundert, warum der Fehler nicht bei allen Auftritt. Ich halte mein System eigentlich immer recht aktuell. Habe aber keinerlei Probleme mit telegram oder sonstwas.

Was ist denn dann noch anders ?

Gruß Michael

viegener

@cawe/neumann: ich habe oben nochmal einer erweiterte HttpUtils angehängt mit mehr debug ausgaben.

Ich vermute das Problem tritt in connect2 hier auf:


      $hash->{conn}->blocking(1);
      my $sslVersion = AttrVal("global", "sslVersion", "SSLv23:!SSLv3:!SSLv2");
      $sslVersion = AttrVal($hash->{NAME}, "sslVersion", $sslVersion)
        if($hash->{NAME});
      my %par = %{$hash->{sslargs}};
      $par{Timeout}      = $hash->{timeout};
      $par{SSL_version}  = $sslVersion if(!$par{SSL_version});
      $par{SSL_hostname} = $hash->{host}
        if(IO::Socket::SSL->can('can_client_sni') &&
           IO::Socket::SSL->can_client_sni() &&
           (!$hash->{sslargs} || !defined($hash->{sslargs}{SSL_hostname})));
      $par{SSL_verify_mode} = 0
        if(!$hash->{sslargs} || !defined($hash->{sslargs}{SSL_verify_mode}));

      eval {
        IO::Socket::SSL->start_SSL($hash->{conn}, \%par) || undef $hash->{conn};
      };


Die connection wird auf Blocking geschaltet und dann beginnt der SSL-Aufbau und dabei läuft er in einen Timeout.

Warum nicht überall - nun das gilt es noch herauszufinden
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

mbrak

Wenn ich den Schnipsel da so laienhaft interpretiere, dann geht es da doch um eine ssl Version.
wurde nicht vor gar nicht so langer zeit irgendwas an der mindestanforderung der ssl version geändert?
ich meine sowas im zusammenhang mit der umstellung des updates auf https:// gelesen zu haben.

wenn nun einige noch ihr linux system auf einem alten stand haben, was die neuen geforderten ssl versionen nicht kann.... was dann?

man liest es ja immer wieder, das nur fhem geupdatet wird und das linus darunter ist grottenalt.

gruß michael


neumann

ich habe das neue HTTP Utils definitiv drin aber deine Änderungen kommen irgendwie nicht...

2017.08.18 19:44:57 5: TelegramBot_Callback teleBot: called from Polling
2017.08.18 19:44:57 5: TelegramBot_Callback teleBot: data returned :{"ok":true,"result":[]}:
2017.08.18 19:44:57 5: TelegramBot_Deepencode teleBot: encoded a String from :true: to :true:
2017.08.18 19:44:57 5: TelegramBot_Deepencode teleBot: found an ARRAY
2017.08.18 19:44:57 5: TelegramBot_Deepencode teleBot: found a HASH
2017.08.18 19:44:57 5: TelegramBot_Callback teleBot: after encoding
2017.08.18 19:44:57 5: TelegramBot_Callback teleBot: polling returned result? 0
2017.08.18 19:44:57 5: UpdatePoll teleBot: number of results 0
2017.08.18 19:44:57 5: TelegramBot_UpdatePoll teleBot: called
2017.08.18 19:44:57 4: TelegramBot_UpdatePoll teleBot: - Initiate non blocking polling - With callback set
2017.08.18 19:44:57 5: TelegramBot_readToken: Read Telegram API token from file
2017.08.18 19:44:57 4: TelegramBot_UpdatePoll teleBot: initiate polling with nonblockingGet with 120s
2017.08.18 19:44:57 1: HttpUtils url=<hidden>
2017.08.18 19:44:57 4: TelegramBot_UpdatePoll teleBot: - Ende > next polling started
2017.08.18 19:44:57 4: TelegramBot_Callback teleBot: resulted in SUCCESS from Polling
2017.08.18 19:44:57 4: TelegramBot_Callback teleBot: - polling so no retry
2017.08.18 19:44:57 4: TelegramBot_Callback teleBot: - Ende > Control back to FHEM
2017.08.18 19:44:57 2: HttpUtils request header:
GET /botXXXXXX/getUpdates?offset=806756611&limit=5&timeout=120 HTTP/1.0
Host: api.telegram.org
agent: TelegramBot/1.0
User-Agent: TelegramBot/1.0
Accept: application/json
Accept-Charset: utf-8

2017.08.18 19:45:47 1: <hidden>: HTTP response code 200
2017.08.18 19:45:47 1: HttpUtils <hidden>: Got data, length: 23
2017.08.18 19:45:47 2: HttpUtils response header:
HTTP/1.1 200 OK
Server: nginx/1.10.0
Date: Fri, 18 Aug 2017 17:45:47 GMT
Content-Type: application/json
Content-Length: 23
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Expose-Headers: Content-Length,Content-Type,Date,Server,Connection
Strict-Transport-Security: max-age=31536000; includeSubdomains
2017.08.18 19:45:47 5: TelegramBot_Callback teleBot: called from Polling
2017.08.18 19:45:47 5: TelegramBot_Callback teleBot: data returned :{"ok":true,"result":[]}:
2017.08.18 19:45:47 5: TelegramBot_Deepencode teleBot: encoded a String from :true: to :true:
2017.08.18 19:45:47 5: TelegramBot_Deepencode teleBot: found an ARRAY
2017.08.18 19:45:47 5: TelegramBot_Deepencode teleBot: found a HASH
2017.08.18 19:45:47 5: TelegramBot_Callback teleBot: after encoding
2017.08.18 19:45:47 5: TelegramBot_Callback teleBot: polling returned result? 0
2017.08.18 19:45:47 5: UpdatePoll teleBot: number of results 0
2017.08.18 19:45:47 5: TelegramBot_UpdatePoll teleBot: called
Modulentwickler
- Spotify #72490
- Nello #75127

rudolfkoenig

ZitatWarum nicht überall - nun das gilt es noch herauszufinden
Auch meine Hypothese: manche haben einen bestimmten sslVersion gesetzt, und das nimmt der Telegram-Server uebel, und antwortet nicht. Verklemmen duerfte es in der aktuellen Version mit der Meldung "Http Utils_Connect2 start_ssl".

Ich habe mal bei telegram nachgefragt:
% nmap --script ssl-enum-ciphers -p 443 api.telegram.org

Starting Nmap 6.47 ( http://nmap.org ) at 2017-08-18 19:55 CEST
Nmap scan report for api.telegram.org (149.154.167.198)
Host is up (0.026s latency).
Other addresses for api.telegram.org (not scanned): 149.154.167.197 149.154.167.200 149.154.167.199
PORT    STATE SERVICE
443/tcp open  https
| ssl-enum-ciphers:
|   SSLv3: No supported ciphers found
|   TLSv1.0:
|     ciphers:
|       TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - strong
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - strong
|       TLS_RSA_WITH_3DES_EDE_CBC_SHA - strong
|       TLS_RSA_WITH_AES_128_CBC_SHA - strong
|       TLS_RSA_WITH_AES_256_CBC_SHA - strong
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong
|     compressors:
|       NULL
|   TLSv1.1:
|     ciphers:
|       TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - strong
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - strong
|       TLS_RSA_WITH_3DES_EDE_CBC_SHA - strong
|       TLS_RSA_WITH_AES_128_CBC_SHA - strong
|       TLS_RSA_WITH_AES_256_CBC_SHA - strong
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong
|     compressors:
|       NULL
|   TLSv1.2:
|     ciphers:
|       TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA - strong
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA - strong
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - strong
|       TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - strong
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA - strong
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 - strong
|       TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - strong
|       TLS_RSA_WITH_3DES_EDE_CBC_SHA - strong
|       TLS_RSA_WITH_AES_128_CBC_SHA - strong
|       TLS_RSA_WITH_AES_128_CBC_SHA256 - strong
|       TLS_RSA_WITH_AES_128_GCM_SHA256 - strong
|       TLS_RSA_WITH_AES_256_CBC_SHA - strong
|       TLS_RSA_WITH_AES_256_CBC_SHA256 - strong
|       TLS_RSA_WITH_AES_256_GCM_SHA384 - strong
|       TLS_RSA_WITH_CAMELLIA_128_CBC_SHA - strong
|       TLS_RSA_WITH_CAMELLIA_256_CBC_SHA - strong
|     compressors:
|       NULL
|_  least strength: strong

Nmap done: 1 IP address (1 host up) scanned in 1.56 seconds

D.h. sie unterstuetzen TLS1.0,1.1 und 1.2
Jetzt waere es gut zu wissen, was die Leute mit Problem fuer ein sslVersion gesetzt haben, und wie man rausfindet, was alles ein bestimmtes Client an Cipher unterstutzt.

Papaloewe

#1554
SSLVersion ist bei mir nicht explizit gesetzt!

Ich nehme an dann gilt die Voreinstellung TLSv12:!SSLv3?

martin_p

Ich hatte jetzt längere Zeit im global sslVersion  SSLv23:!SSLv3:!SSLv2  gesetzt und auch die Hänger mit TelegramBot.
Testeshalber auf  TLSv12:!SSLv3   umgestellt und "shutdown restart" gemacht, leider keine Veränderung.

-- Martin

cawe

@viegener: mit der neuen Version der HttpUtils, Hang zwischen 20:40:15 und 20:44:20:

2017.08.18 20:40:15 1: HttpUtils - connect2 - in direct readfn
2017.08.18 20:40:15 1: <hidden>: HTTP response code 200
2017.08.18 20:40:15 1: HttpUtils <hidden>: Got data, length: 23
2017.08.18 20:40:15 2: HttpUtils response header:
HTTP/1.1 200 OK
Server: nginx/1.10.0
Date: Fri, 18 Aug 2017 18:40:15 GMT
Content-Type: application/json
Content-Length: 23
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Expose-Headers: Content-Length,Content-Type,Date,Server,Connection
Strict-Transport-Security: max-age=31536000; includeSubdomains
2017.08.18 20:40:15 5: TelegramBot_Callback Vh22Bot: called from Polling
2017.08.18 20:40:15 5: TelegramBot_Callback Vh22Bot: data returned :{"ok":true,"result":[]}:
2017.08.18 20:40:15 5: TelegramBot_Deepencode Vh22Bot: found an ARRAY
2017.08.18 20:40:15 5: TelegramBot_Deepencode Vh22Bot: encoded a String from :true: to :true:
2017.08.18 20:40:15 5: TelegramBot_Deepencode Vh22Bot: found a HASH
2017.08.18 20:40:15 5: TelegramBot_Callback Vh22Bot: after encoding
2017.08.18 20:40:15 5: TelegramBot_Callback Vh22Bot: polling returned result? 0
2017.08.18 20:40:15 5: UpdatePoll Vh22Bot: number of results 0
2017.08.18 20:40:15 5: TelegramBot_UpdatePoll Vh22Bot: called
2017.08.18 20:40:15 4: TelegramBot_UpdatePoll Vh22Bot: - Initiate non blocking polling - With callback set
2017.08.18 20:40:15 5: TelegramBot_readToken: Read Telegram API token from file
2017.08.18 20:40:15 4: TelegramBot_UpdatePoll Vh22Bot: initiate polling with nonblockingGet with 120s
2017.08.18 20:40:15 1: HttpUtils url=<hidden>
2017.08.18 20:40:15 1: HttpUtils_Connect keepalive: No  conn: No
2017.08.18 20:40:15 1: HttpUtils_Connect after jump to connect 2
2017.08.18 20:40:15 1: HttpUtils_Connect nonblocking
2017.08.18 20:40:15 1: HttpUtils_Connect has non blocking conn
2017.08.18 20:40:15 1: HttpUtils x - in sub got iaddr: ????
2017.08.18 20:40:15 1: HttpUtils x - connect:
2017.08.18 20:40:15 1: HttpUtils x - got a connection set write fn
2017.08.18 20:40:15 1: HttpUtils x - start timer
2017.08.18 20:40:15 1: HttpUtils x - sub done
2017.08.18 20:40:15 4: TelegramBot_UpdatePoll Vh22Bot: - Ende > next polling started
2017.08.18 20:40:15 4: TelegramBot_Callback Vh22Bot: resulted in SUCCESS from Polling
2017.08.18 20:40:15 4: TelegramBot_Callback Vh22Bot: - polling so no retry
2017.08.18 20:40:15 4: TelegramBot_Callback Vh22Bot: - Ende > Control back to FHEM
2017.08.18 20:40:15 1: HttpUtils x - in write fn
2017.08.18 20:40:15 1: HttpUtils x - do connect2 in writeFn
2017.08.18 20:40:15 1: HttpUtils - in connect 2   conn: Yes
2017.08.18 20:40:15 1: HttpUtils_Connect2 is https und  has connection but no ssladded
2017.08.18 20:40:15 1: HttpUtils_Connect2 is https SSL there
2017.08.18 20:40:15 1: HttpUtils_Connect2 connection is now blocking
2017.08.18 20:40:15 1: HttpUtils_Connect2 start_ssl
2017.08.18 20:44:20 1: HttpUtils_Connect2 start_ssl done  conn: No
2017.08.18 20:44:20 5: TelegramBot_Callback Vh22Bot: called from Polling
2017.08.18 20:44:20 5: TelegramBot_Callback Vh22Bot: polling returned result? <undef>
2017.08.18 20:44:20 5: Starting notify loop for Vh22Bot, 1 event(s), first is PollingLastError: NonBlockingGet: returned <hidden>: Can't connect(2) to https://api.telegram.org:443:  SSL wants a read first
2017.08.18 20:44:20 4: TelegramBot_Set Vh22Bot: called
2017.08.18 20:44:20 4: TelegramBot_Set Vh22Bot: Processing TelegramBot_Set( ? )
2017.08.18 20:44:20 4: TelegramBot_Set Vh22Bot: called
2017.08.18 20:44:20 4: TelegramBot_Set Vh22Bot: Processing TelegramBot_Set( ? )
2017.08.18 20:44:20 5: End notify loop for Vh22Bot
2017.08.18 20:44:20 5: Starting notify loop for Vh22Bot, 1 event(s), first is PollingErrCount: 2
2017.08.18 20:44:20 4: TelegramBot_Set Vh22Bot: called
2017.08.18 20:44:20 4: TelegramBot_Set Vh22Bot: Processing TelegramBot_Set( ? )
2017.08.18 20:44:20 4: TelegramBot_Set Vh22Bot: called
2017.08.18 20:44:20 4: TelegramBot_Set Vh22Bot: Processing TelegramBot_Set( ? )
2017.08.18 20:44:20 5: End notify loop for Vh22Bot
2017.08.18 20:44:20 5: TelegramBot_UpdatePoll Vh22Bot: called
2017.08.18 20:44:20 4: TelegramBot_UpdatePoll Vh22Bot: - Initiate non blocking polling - With callback set
2017.08.18 20:44:20 5: TelegramBot_readToken: Read Telegram API token from file
2017.08.18 20:44:20 4: TelegramBot_UpdatePoll Vh22Bot: initiate polling with nonblockingGet with 120s
2017.08.18 20:44:20 1: HttpUtils url=<hidden>
2017.08.18 20:44:20 1: HttpUtils_Connect keepalive: No  conn: No
2017.08.18 20:44:20 1: HttpUtils_Connect after jump to connect 2
2017.08.18 20:44:20 1: HttpUtils_Connect nonblocking
2017.08.18 20:44:20 1: HttpUtils_Connect has non blocking conn
2017.08.18 20:44:20 1: HttpUtils x - in sub got iaddr: ????
2017.08.18 20:44:20 1: HttpUtils x - connect:
2017.08.18 20:44:20 1: HttpUtils x - got a connection set write fn
2017.08.18 20:44:20 1: HttpUtils x - start timer
2017.08.18 20:44:20 1: HttpUtils x - sub done
2017.08.18 20:44:20 4: TelegramBot_UpdatePoll Vh22Bot: - Ende > next polling started
2017.08.18 20:44:20 4: TelegramBot_Callback Vh22Bot: resulted in NonBlockingGet: returned <hidden>: Can't connect(2) to https://api.telegram.org:443:  SSL wants a read first from Polling
2017.08.18 20:44:20 4: TelegramBot_Callback Vh22Bot: - polling so no retry
2017.08.18 20:44:20 4: TelegramBot_Callback Vh22Bot: - Ende > Control back to FHEM
2017.08.18 20:44:20 1: Perfmon: possible freeze starting at 20:40:16, delay is 244.577

viegener

@cawe: Nochmals Danke, das bestätigt die Vermutung! Der Block zwischen diesen beiden Aufrufen:
2017.08.18 20:40:15 1: HttpUtils_Connect2 start_ssl
2017.08.18 20:44:20 1: HttpUtils_Connect2 start_ssl done  conn: No


Also im Code:

#DEBUG
  Log3 $hash, $hash->{loglevel}, "HttpUtils_Connect2 start_ssl";
#DEBUG
      eval {
        IO::Socket::SSL->start_SSL($hash->{conn}, \%par) || undef $hash->{conn};
      };
      if($@) {
        Log3 $hash, $hash->{loglevel}, $@;
        HttpUtils_Close($hash);
        return $@;
      }
     
      $hash->{hu_sslAdded} = 1 if($hash->{keepalive});
#DEBUG
  Log3 $hash, $hash->{loglevel}, "HttpUtils_Connect2 start_ssl done"."  conn: ".($hash->{conn}?"Yes":"No");
#DEBUG


Also tritt es wohl im start_ssl auf.
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

viegener

Zitat von: rudolfkoenig am 18 August 2017, 19:58:10
Auch meine Hypothese: manche haben einen bestimmten sslVersion gesetzt, und das nimmt der Telegram-Server uebel, und antwortet nicht. Verklemmen duerfte es in der aktuellen Version mit der Meldung "Http Utils_Connect2 start_ssl".

D.h. sie unterstuetzen TLS1.0,1.1 und 1.2
Jetzt waere es gut zu wissen, was die Leute mit Problem fuer ein sslVersion gesetzt haben, und wie man rausfindet, was alles ein bestimmtes Client an Cipher unterstutzt.

Ok, Deine Vermuting (start_ssl) ist wohl bestätigt.

Es könnte vieleicht auch sein, dass einer der 4 Server bei telegram vielleicht anders konfiguriert ist und dadurch manche das Problem haben?
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

Tueftler1983

Hallo ich habe bei mir in FHEMWEB das unter sslVersion TLSv12:!SSLv3

Hilft das vielleicht oder soll ich auch mal deine debug Version einspielen?