Skip to content

Getting 'Waiting for the reverse connection timed out' exception on trying to do OPC Reverse connect from OPC UA Client program. #2078

Description

@vrushalikatkade

1.reverse connection with opcua server
2.used the following code:

Uri endpointURI = new Uri("opc.tcp://127.0.0.1:4862/ - [None:None:Binary]");
if (endpointURI != null)
                    {
                        // start the reverse connection manager
                        m_reverseConnectManager = new ReverseConnectManager();
                        m_reverseConnectManager.AddEndpoint(endpointURI);
                      
                        m_reverseConnectManager.StartService(config);
                    }           
              
                    Console.WriteLine("2 - Discover endpoints of {0}.", server.EndPointUrl);

                    EndpointDescription selectedEndpoint;
                    if (m_reverseConnectManager == null)
                    {
                        selectedEndpoint = CoreClientUtils.SelectEndpoint(server.EndPointUrl, true, 15000);
                    }
                    else
                    {
                        Console.WriteLine("   Waiting for reverse connection."+DateTime.Today);
                        ITransportWaitingConnection connection = await m_reverseConnectManager.WaitForConnection(
                            new Uri(server.EndPointUrl), null, new CancellationTokenSource(60000).Token);
                        if (connection == null)
                        {
                            throw new ServiceResultException(Opc.Ua.StatusCodes.BadTimeout, "Waiting for a reverse connection timed out.");
                        }
                        selectedEndpoint = CoreClientUtils.SelectEndpoint(config, connection, true, 15000);
                    }
m_reverseConnectManager.WaitForConnection throws the following exception  :
Opc.Ua.ServiceResultException
  HResult=0x80131500
  Message=Waiting for the reverse connection timed out.
  Source=Opc.Ua.Client
  StackTrace:
   at Opc.Ua.Client.ReverseConnectManager.<WaitForConnection>d__19.MoveNext()
   at OPCUAConnector.Server_connection.<ConsoleSampleClient>d__2.MoveNext() in 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions