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.

HowTo handle "faulted" connection attempt

See original GitHub issue

Actually I want to implement an auto reconnect on faulted connection attempts.

After the connection failed, the actual State = CommunicationState.Faulted. In OpenAsync() (https://github.com/convertersystems/opc-ua-client/blob/master/UaClient/ServiceModel/Ua/Channels/CommunicationObject.cs#L187) there is a check if the State == CommunicationState.Faulted (https://github.com/convertersystems/opc-ua-client/blob/master/UaClient/ServiceModel/Ua/Channels/CommunicationObject.cs#L473). This results into an InvalidOperationException("Channel not modifiable.") .

How should I resolve the problem?

CloseAsync() is not possible to be called -> Exception(Channel faulted)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
awcullencommented, Feb 20, 2021

Back when I started this project, I tried to follow Microsoft’s WCF guidelines. When you used a WCF client, and there was an exception, you would catch the exception and Abort (vs Close) the Client. Abort disposes the channel without communicating to the server ( which probably has closed it’s session anyway)

0reactions
dubegcommented, Feb 19, 2021

@awcullen Hi Andrew. Why would AbortAsync be needed if the channel faulted? Shouldn’t it already be closed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

"A connection attempt failed because the connected party ...
Resolving the “TCP error code 10060: A connection attempt failed…” while consuming a web service ... catch (Exception ex) { throw; } }....
Read more >
Failed Connection Attempt - Firewall Control
Failed Connection Attempt - Firewall Control. Can anyone explain why I am seeing this "Top Threat" from IP's in my own network?
Read more >
Can't handle a failed connection attempt
Hi, I'm trying to do stuff when a client tries to connect but the server is not running. ... Can't handle a failed...
Read more >
Failed Connection Attempt on DNS queries : r/fortinet
This morning there are thousands of these Failed Connection Requests for this host and IP despite only a few (<0%) of the pings...
Read more >
How to find source of TCP failed connection attempts?
1 Answer 1 ... Consider contacting your hosting company/Network Admins and asking them about these failed connections. To avoid finger-pointing ...
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