Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection lost every 2-3 Minutes by some users #251

Closed
GermanBluefox opened this issue Jan 23, 2019 · 61 comments
Closed

Connection lost every 2-3 Minutes by some users #251

GermanBluefox opened this issue Jan 23, 2019 · 61 comments

Comments

@GermanBluefox
Copy link

Some of the users (not all) facing the problem, that connection being lost every 1-3 Minutes.
I checked the logs and monitored the activity of specific users and could not see any errors except that disconnection appears and then in 6-8 seconds comes reconnect.... and in i-3 Minutes again disconnect and so on.

What it can be?

It looks like (may be) the client does not answer heartbeat, but is not clear, because no debug info is visible.
How can I investigate why it's happen? I need help.

Regards, Bluefox

@gauthamkantharaju
Copy link

gauthamkantharaju commented Feb 6, 2019

Even we are facing the same issue but in our case client is getting disconnected every 10-15 minutes and reconnects within few seconds.

receiving, Error: read ECONNRESET

#253

Have created a issue in AWS support also but they responded back saying that the issue might be because of firewall or network issue.

@justinboswell
Copy link
Contributor

Have you tried wireshark (or ssldump) capturing the connection? See if you get a TLS alert as your last packet from the server, or if you time out. If you time out, then there's something going on on your network. If you're getting a TLS alert, then the server is hanging up on you because your last request was malformed or against your policy.

@GermanBluefox
Copy link
Author

Will check it. Thank you.

@gauthamkantharaju
Copy link

@GermanBluefox Any luck?

@20matan
Copy link

20matan commented Feb 24, 2019

Hey, i had the same error.
Not sure if it's the same case, but in my case it happened because some of the clients had the same clientId. i'm not sure what method you use to generate the clientId, but you should try (in case you don't already) uuid / something similiar that will not result in collisions.

@GermanBluefox
Copy link
Author

Hey, i had the same error.
Not sure if it's the same case, but in my case it happened because some of the clients had the same clientId. i'm not sure what method you use to generate the clientId, but you should try (in case you don't already) uuid / something similiar that will not result in collisions.

In case of the same clientID I see on the server the corresponding error.
In this issue I see only "disconnected" without explanation what is that.

@h3w8529
Copy link

h3w8529 commented Mar 5, 2019

just create another clientID, this clientID is not able to share on different devices.

@Apollon77
Copy link

I think Bluefox said that the clientIds are unique.

@ColdenCullen
Copy link

A couple other things you could check:

  1. Does your policy explicitly allow everything you're doing? If you violate it, the server will hang up on you with no indication as to why.
  2. Are you hitting any of the limits imposed by the service? This would also cause a hang up with no error reported.

@ViP3R76
Copy link

ViP3R76 commented Mar 29, 2019

I have the same issue, it reoccurs exactly every 4 minutes.

@Apollon77
Copy link

@ColdenCullen We are not aware of any of the questions, so I would state for now "no we don't/everything is correct" ;-)

Do you hve any idea how we could track that down? It is very anoying for some of our users!

@GermanBluefox
Copy link
Author

A couple other things you could check:

  1. Does your policy explicitly allow everything you're doing? If you violate it, the server will hang up on you with no indication as to why.
  2. Are you hitting any of the limits imposed by the service? This would also cause a hang up with no error reported.

Which kind of limits it could be be IoT Core?

@justnance justnance added help wanted We are asking the community to submit a PR to resolve this issue. and removed help wanted labels Apr 18, 2019
@graebm
Copy link
Contributor

graebm commented Apr 25, 2019

Limits for IoT are listed here

There are limits on all sorts of things. For example, publishing more than 100 messages per second will get you hung up on. Could this be your issue?

@graebm
Copy link
Contributor

graebm commented Apr 25, 2019

@GermanBluefox
Are you using a Node.js environment? Or browser environment?

@graebm
Copy link
Contributor

graebm commented Apr 25, 2019

Are you using websockets to connect? Or direct MQTT?

@Apollon77
Copy link

We are using nodejs environment and because we are using exactly this package here it should be MQTT ;-)

For the limits, ok this is interesting but documentation states e.g. for "more then 100 publishs per second": ... rest will be discarded ... so it should not be the case that the whole connection gets killed. ;-) Or do I missed something?

@GermanBluefox
Copy link
Author

GermanBluefox commented Apr 29, 2019

As Apollon77 said, we use node.js with mqtt and we deliver voice commands (JSON) with IoT.
If you know someone who can produce more than 100 commands per second, let me know ;)

To be serious, even if no commands sent, the disconnect happens every X minutes.

@Laudings
Copy link

I have the same issue. Are there already some new information?

@justinboswell
Copy link
Contributor

@Apollon77 When you hit service limits, especially within the IoT Core services, the response is almost always to hang up. I know for sure (due to our unit tests) that IoT hangs up if you break the 100 publishes/sec limit.

@Apollon77
Copy link

Thank you ... this should really not be the case, but maybe @GermanBluefox maybe introduce some kind of counters for logging purposes?

@klotzma
Copy link

klotzma commented Jun 12, 2019

Hei, i have the same Problem, it comes all 4 Minutes.

@Laudings
Copy link

I and a lot more user still have the problem. Is it possible to check if it send more than 100 massages per second?

@Karsten69
Copy link

Good morning,

until yesterday everything works fine without any issue. Until yesterday i have a internet connection from Unitymedia (Office and Internet 150) with a Fritzbox 6490 cable as modem and a Fritzbox 7490 as router.
Yesterday i became a new internet connection also from Unitymedia (2play 400) with a Unitymedia ConnectBox as modem and the Fritzbox 7490 as router, the router is the same like before, every other stuff is the same like before. But now i have this issue. Is it possible that the connect box from unitymedia is the problem?

@justinboswell justinboswell added confusing-error and removed help wanted We are asking the community to submit a PR to resolve this issue. labels Jun 26, 2019
@justinboswell
Copy link
Contributor

If you are able to establish a connection, but the connection is dropping, I would suggest opening a ticket with IoT Core support, so they can help diagnose further, as it is unlikely to be an SDK-specific issue.

@Fab29-690
Copy link

I got the same error when I changed the internet provider to unitymedia. I use also the connectbox and i have also the same connection 2play400. I think the connect box could be the issue or maybe that you have switched to a new modem ? Or its just a coincidence?

@Apollon77
Copy link

@Karsten69 can you catch the traffic for both cases using wireshark ?

@Karsten69
Copy link

Yes but i need help. Tomorow teamviewer?
Or a few lines howto?

@Karsten69
Copy link

Karsten69 commented Jun 28, 2019 via email

@Fab29-690
Copy link

Hallo ihr,

gibt es schon Neuigkeiten bzw. neue Erkenntnisse?

@Apollon77
Copy link

@Karsten69 Attachments werden bei email antworten von GitHub nicht übernommen. Musst Du hier hochladen ... :-(

@Karsten69
Copy link

Ah, ok. Habe mittlerweile herausgefunden wie ich den kompletten verkehr mitschneiden kann, werde es heute aber nicht mehr schaffen. Morgen werde ich dann auf beiden Leitungen mitschneiden und dann hier hochladen. Gruß Karsten

@Karsten69
Copy link

@Apollon77 Hallo Ingo, habe die Dateien fertig, kann ich dir irgendwo eine PN oder Mail schicken, würde ungern meinen ungefilterten Datenverkehr hier für alle sichtbar einstellen. Im IOBroker Forum habe ich schon gesucht aber keine Möglichkeit gefunden dir eine PN zu schicken.
Gruß Karsten

@Apollon77
Copy link

iobroker@fischer-ka.de

@Karsten69
Copy link

@Apollon77 Ist raus.

@GermanBluefox
Copy link
Author

So. I analysed the wireshark and could see, that the disconnect comes from AWS IoT side after 2:23 seconds of silence.
Here is the communication:
ioBroker IoT mqtt communication.zip
@justinboswell And reset is from IOT:
image

@Karsten69
Copy link

Hallo Leute,

ich kann leider die ConnectBox von Unitymedia ausschließen, habe Heute auf Fritzbox 6490 umgestellt und der Fehler kommt weiterhin.

Schönen Sonntag noch.
Gruß Karsten

@klotzma
Copy link

klotzma commented Jul 28, 2019

Das kann ich übrigens auch bestätigen, ich habe schon seit längeren meine eigene Fritzbox 6490 über den Anbieter Unitymedia.
Trotzdem diese Probleme

LG Marcus

@Fab29-690
Copy link

Was ich mir nochvorstellen kann ist, dass das Problem mit dem DS und DS-lite was zu tun hat. Ich habe leider nur DS-Lite und wäre interessant, ob einer von euch DS hat.
Lg

@Karsten69
Copy link

Ja kann gut sein, hatte vorher Unitymedia Business Office und Internet 150, das war kein DS-lite, aber was genau kann ich nicht mehr sagen. Jetzt habe ich definitiv DS-lite. Vieleicht können die die keine Probleme haben mal nachschauen was bei ihrem Unitymedia Anschluss anliegt. Habe allerdings keine Ahnung ob das zur Problemlösung beiträgt.

Gruß
Karsten

@ViP3R76
Copy link

ViP3R76 commented Jul 28, 2019

Liegt weder an DS-Lite noch an DS bei Unitymedia. Ich hatte das Problem (siehe weiter oben) ebenfalls. Interessanterweise hat es sich bei mir beim Update vom Alexa Adapter von alleine gelöst bzw. hatte ich parallel das ioBroker Fixer Script zum korrigieren von etwaigen Berechtigungsfehlern zwischendurch ausgeführt.

@klotzma
Copy link

klotzma commented Jul 28, 2019

Ich nutze aber nicht mal Alexa, sondern nur IFTTT und seit neusten Google Home.
Trotzdem diese Verbindungsabbrüche.
Fixer habe ich auch schon laufen lassen.

@Apollon77
Copy link

Alexa adapter update or permission fixes should have no effect here. Also this is used independently from Alexa or google home because it is the basic cloud service

@Fab29-690
Copy link

Hallo ich glaube ich hab des Rätsels Lösung.
Ich habe mich aus einem anderen Grund von DS-Lite auf Dual Stack umstellen lassen und seit dem habe ich keine Verbindungsabbrüche mehr. Ist zwar erst eine halbe Stunde her und werde es noch weiter beobachten.

@klotzma
Copy link

klotzma commented Jul 29, 2019

Ich kann mir net vorstellen das es am DS Lite liegt, jeder andere Cloud service geht doch auch unter den DS Lite Anschluss.
Da ist doch irgentwas anderes Faul.

@Fab29-690
Copy link

Ich hab definitv nichts anderes geändert. Vor der Umstellung war definitiv noch das Problem vorhanden und nach der Umstellung sofort weg. Also bei mir hat die Umstellung das Problem verschwinden lassen.

@klotzma
Copy link

klotzma commented Jul 29, 2019

Ja gut, aber ich zum Beispiel habe nicht die Möglichkeit ein Dualstack Anschluss zu bekommen, außer ich wechsel mein Vertrag und ich denk mal da bin ich nicht der einzigste.
Da muss es doch eine andere Lösung geben.

@klotzma
Copy link

klotzma commented Jul 29, 2019

Ich kann den Iot Service, seit dieser permanenten Abbrüche kaum noch verwenden. Weder über die direkte Google Home Anbindung noch über den Umweg über IFTTT.

@Karsten69
Copy link

Guten Morgen,

ich kann jetzt bestätigen das es an DS-Lite liegt, habe meinen Anschluss gerade auf Dual Stack umstellen lassen und der Fehler ist weg. Ich habe bei UM angerufen und hatte direkt eine sehr freundliche und kompetente Mitarbeiterin am Telefon, die genau wusste wovon ich spreche, die Umstellung erfolgte noch während des Telefonates und seitdem habe ich keine Fehlermeldungen mehr.
UM stellt die Anschlüsse wohl nur auf Nachfrage Kostenlos um wenn man schon ein Zusatzpaket, in meinem Fall die FB6490, hat.
Gruß Karsten

@Karsten69
Copy link

Noch kurz zur Info, reines IPV4 gibt es dann aber nur in den Business Verträgen.

@Laudings
Copy link

Hallo,

Das hört sich sehr interessant an. Kann wir aber jemand erklären was ds-lite ist und was Dual Stack ist? Habe ich noch nie gehört. Was ist der Unterschied dieser beiden?

Vielen Dank!

Grüße Swen

@ViP3R76
Copy link

ViP3R76 commented Jul 30, 2019

DS-Lite = ipv6 Anschluss mit getunnelten IPv4 (öffentliche IPV4 Adresse für mehrere Teilnehmer)
DS = Dual Stack -> echte IPV4 und echte IPV6 Adresse für den eigenen Anschluss

Reines IPV4 bekommt man bei Unitymedia mit Tariferweiterung auf "Power-Upload" und gleichzeitig den Wunsch äußern das man einen nativen Dual Stack bekommen möchte. Kostet glaube ich, je nach Region, 2.99 Euro zum normal gebuchten Tarif monatlich extra.

Aber wiegesagt, das sich das Problem "aufgelöst" hat durch Umstellung auf DualStack (also echte IPV4/IPV6) ist unrealistisch, sondern ist vermutlich einfach nur dem geschuldet das sich das System mit einer "neuen" IP meldet in der Cloud. Bei den DSLite Anschlüssen hat man ja mitunter mehrere Wochen diesselbe IP trotz Neustart.

Ich kann nur betonen, ich habe den IoT an beiden Anschlüssen laufen, sowohl Lite als auch echtes DS.

@klotzma
Copy link

klotzma commented Aug 31, 2019

Kann mir hier jemand weiterhelfen einen Mitschnitt, mit Wireshark zu machen ?
Ich komme nicht so zurecht damit.

Bezogen auf diesem Issue # 230

@Apollon77
Copy link

For affected users check solution #280 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests