After finishing my lab and testing, I went to my client and they showed me error while setting up cloud witness. They showed me a different error then earlier. In this blog, we would learn about fixing error Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host while configuring cloud witness.
I have written an earlier blog with a different error:
Here is the exact error message which was seen:
The error message clearly tells that there is some issue with connectivity between node and cloud witness.
I always use Telnet or Test-NetConnection to test connectivity and here also it was helpful. I found that this server was not allowing internet outbound connections. As soon as I opened port 443 to storage, the issue was resolved.
For more details about an opening port in Azure VM, refer my earlier blog
Even though the behavior is different, but the solution remains the same as above mentioned.
Reference: Pinal Dave (https://blog.sqlauthority.com)