question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Authentication failed because the remote party has closed the transport stream

See original GitHub issue

I am using mqttnet to connect with aws mqtt broker with TLS using certificates. It runs quite good on my windows environment but when I try running it on a Linux environment it throws an exception “Authentication failed because the remote party has closed the transport stream”.

What I have tried I found that with adding the security protocol type, resolves this issue

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;

I have tried the above in every possible way enabling TLS versions 1.1, 1.2 and 1.3 but it does nothing.

I am using .netcore 3.1

Any help?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
akhtarusafzaicommented, Feb 19, 2021

An Update on the limitation side, As I said earlier that this piece of code will not run on windows was wrong. I said that in a hurry and without testing the code on Windows, But the same code runs on both Linux and Windows

0reactions
SeppPennercommented, Aug 30, 2021

I have added your example code now to the wiki under https://github.com/chkr1011/MQTTnet/wiki/Client#connecting-with-amazon-aws.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authentication failed because the remote party has closed ...
This error is related to the Security Protocol Type, it is most likely caused by your application's default security protocol type being set...
Read more >
Authentication failed because remote party has closed the ...
Ssl3 and X509CertificateCollection . I am getting the following error: Authentication failed because the remote party has closed the transport ...
Read more >
Authentication failed because the remote party has closed ...
I have application auto daily send email using smtpclient, it's still running OK before 1-Oct-2021. But from 1-Oct-2021, it send missing ...
Read more >
Office 365: Authentication failed because the remote party has ...
To fix the issue, simply stop using TLS 1.0 or TLS 1.1 to send mail. This is harder than it sounds if you're...
Read more >
How to fix the error "Authentication failed because ...
How to fix the error "Authentication failed because the remote party has closed the transport stream" ... You may get this error when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found