Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Connecting with a remote OPC UA Server (KepServer) - No connection could be mad

More
06 Jul 2021 14:37 #9901 by support
It is clearly written in the error message.

No connection could be made because the target machine actively refused it 192.168.1.46:49320

Best regards

Please Log in or Create an account to join the conversation.

More
06 Jul 2021 13:01 #9897 by micham
Hi,

I am trying to connect with a remote OPC UA Server (KepServer). The endpoint URL is: "opc.tcp://DEV2017:49320".
When my OPC Client tries to connect, I get the following error. Any idea why?

Thank you.

"No connection could be made because the target machine actively refused it 192.168.1.46:49320
+ This is a deducted base exception."

Exceptions

Type: OpcLabs.BaseLib.Browsing.BrowseException
Data:
HelpLink:
HResult: -2146233088 (0x80131500)
InnerException:
OpcLabs.EasyOpc.UA.Engine.UAEngineException: UA SDK error (Opc.UA.ServiceResult=0x80820000) in 'DiscoveryClient.GetEndpoints'. OPC UA service result - {BadTcpInternalError}. Error establishing a connection.
+ The error occurred when preselecting an endpoint for discovery URL "opc.tcp://DEV2017:49320".
+ Some possible causes of this error are that the OPC-UA server is not running, or is not configured to listen on the specified port. Also, the network connection may be broken (cable unplugged?).
+ The endpoint URL string used was "opc.tcp://DEV2017:49320".
+ The client method called (or event/callback invoked) was 'BrowseMultiple'. ---> OpcLabs.EasyOpc.UA.UAServiceException: OPC UA service result - {BadTcpInternalError}. Error establishing a connection.
--> {BadTcpInternalError}. An unexpected error occurred while connecting to the server.
--> {Bad}. No connection could be made because the target machine actively refused it 192.168.1.46:49320. ---> OpcLabs.BaseLib.Portable.CustomException: No connection could be made because the target machine actively refused it 192.168.1.46:49320
+ This is a deducted base exception.
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
Activity Trace:
Following (7) events were gathered during the action on activity ID [23], in the order of first occurrence:
SDK trace: GetEndpoints Called. RequestHandle=1, PendingRequestCount=1
3*[8] Exception: {System.Net.Sockets.SocketException} No connection could be made because the target machine actively refused it
[17] Exception: {Opc.Ua.ServiceResultException} An unexpected error occurred while connecting to the server.
Exception: {Opc.Ua.ServiceResultException} Error establishing a connection.
SDK trace: GetEndpoints Completed. RequestHandle=1, PendingRequestCount=0, StatusCode=Bad
Events starting with activity ID in [] may not necessarily be related to the current action.

Data:
ErrorId: OpcLabs.UAEngine=1
7b4d9f28-22a8-41d6-93ea-e4d8c2a75da8:
((23, 1), Opc.Ua.TraceEventArgs)
((8, 0), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 0), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 0), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((17, 0), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((23, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((23, 1), Opc.Ua.TraceEventArgs)
c3c0e69e-bf8f-4bfa-8e93-816783737e55: 23
OpcLabs.EasyOpc.UA.Implementation.ErrorEnhancingEasyUAClient.Processed: True
Error Code: 1
HelpLink:
HResult: -2146232832 (0x80131600)
InnerException:
OpcLabs.EasyOpc.UA.UAServiceException: OPC UA service result - {BadTcpInternalError}. Error establishing a connection.
--> {BadTcpInternalError}. An unexpected error occurred while connecting to the server.
--> {Bad}. No connection could be made because the target machine actively refused it 192.168.1.46:49320. ---> OpcLabs.BaseLib.Portable.CustomException: No connection could be made because the target machine actively refused it 192.168.1.46:49320
+ This is a deducted base exception.
--- End of inner exception stack trace ---
Data: ErrorId: Opc.UA.ServiceResult=0x80820000
Help Link:
HResult: -2146232832 (0x80131600)
InnerException:
OpcLabs.BaseLib.Portable.CustomException: No connection could be made because the target machine actively refused it 192.168.1.46:49320
+ This is a deducted base exception.
Data: ErrorId: {027F782F1C}
HelpLink:
HResult: -2146232832 (0x80131600)
InnerException:
Message:
No connection could be made because the target machine actively refused it 192.168.1.46:49320
+ This is a deducted base exception.
Source:
StackTrace:
TargetSite:
Internal Code: 2156003328
Message:
OPC UA service result - {BadTcpInternalError}. Error establishing a connection.
--> {BadTcpInternalError}. An unexpected error occurred while connecting to the server.
--> {Bad}. No connection could be made because the target machine actively refused it 192.168.1.46:49320.
Service Result: BadTcpInternalError
Additional Info:
Description: Error establishing a connection.
Inner Result: BadTcpInternalError
Additional Info:
>>> An unexpected error occurred while connecting to the server.
--- at Opc.Ua.Bindings.TcpAsyncOperation`1.End(Int32 timeout)
--- at Opc.Ua.Bindings.TcpClientChannel.OnConnectOnDemandComplete(Object state)
Description: An unexpected error occurred while connecting to the server.
Inner Result: Bad
Additional Info:
>>> No connection could be made because the target machine actively refused it 192.168.1.46:49320
--- at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
--- at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
--- at Opc.Ua.Bindings.TcpMessageSocket.EndConnect(IAsyncResult result)
--- at Opc.Ua.Bindings.TcpClientChannel.OnConnectComplete(IAsyncResult result)
Description: No connection could be made because the target machine actively refused it 192.168.1.46:49320
Inner Result:
Qualified Symbolic ID:
Expanded Text:
Is Null: True
Name:
Namespace Index: 0
Namespace URI:
Namespace URI String:
Standard Name:
Status Code: Bad
Code Bits: 32768
Code Bits Symbol: Bad
Condition: 0
Flag Bits: 0
Has Data Value Info: False
Info Type: NotUsed
Internal Value: 2147483648
Is Bad: True
Is Good: False
Is Uncertain: False
Limit Info: None
Overflow: False
Semantics Changed: False
Severity: BadOrFailure
Status Info: Error
Structure Changed: False
Text: {Bad}. No connection could be made because the target machine actively refused it 192.168.1.46:49320.
Qualified Symbolic ID:
Expanded Text:
Is Null: True
Name:
Namespace Index: 0
Namespace URI:
Namespace URI String:
Standard Name:
Status Code: BadTcpInternalError
Code Bits: 32898
Code Bits Symbol: BadTcpInternalError
Condition: 130
Flag Bits: 0
Has Data Value Info: False
Info Type: NotUsed
Internal Value: 2156003328
Is Bad: True
Is Good: False
Is Uncertain: False
Limit Info: None
Overflow: False
Semantics Changed: False
Severity: BadOrFailure
Status Info: Error
Structure Changed: False
Text:
{BadTcpInternalError}. An unexpected error occurred while connecting to the server.
--> {Bad}. No connection could be made because the target machine actively refused it 192.168.1.46:49320.
Qualified Symbolic ID:
Expanded Text:
Is Null: True
Name:
Namespace Index: 0
Namespace URI:
Namespace URI String:
Standard Name:
Status Code: BadTcpInternalError
Code Bits: 32898
Code Bits Symbol: BadTcpInternalError
Condition: 130
Flag Bits: 0
Has Data Value Info: False
Info Type: NotUsed
Internal Value: 2156003328
Is Bad: True
Is Good: False
Is Uncertain: False
Limit Info: None
Overflow: False
Semantics Changed: False
Severity: BadOrFailure
Status Info: Error
Structure Changed: False
Text:
{BadTcpInternalError}. Error establishing a connection.
--> {BadTcpInternalError}. An unexpected error occurred while connecting to the server.
--> {Bad}. No connection could be made because the target machine actively refused it 192.168.1.46:49320.
Service Target Site: T End(Int32)
DeclaringType: Opc.Ua.Bindings.TcpAsyncOperation`1[T]
Module: Opc.Ua.Core.dll
Assembly: Opc.Ua.Core, Version=1.3.342.0, Culture=neutral, PublicKeyToken=6faddca41dacb409
CustomAttributes:
FullyQualifiedName: C:\Program Files (x86)\Control-See\EBO-OPC Client\BIN\Opc.Ua.Core.dll
MDStreamVersion: 131072
MetadataToken: 1
ModuleHandle: System.ModuleHandle
MDStreamVersion: 131072
ModuleVersionId: cc819e15-c1f0-4cd1-a4cc-c7b59fd7b4d5
Name: Opc.Ua.Core.dll
ScopeName: Opc.Ua.Core.dll
Source: Opc.Ua.Core
Stack Trace:
at Opc.Ua.Bindings.TcpAsyncOperation`1.End(Int32 timeout)
at Opc.Ua.Bindings.TcpClientChannel.EndSendRequest(IAsyncResult result)
at Opc.Ua.Bindings.TcpTransportChannel.EndSendRequest(IAsyncResult result)
at Opc.Ua.Bindings.TcpTransportChannel.SendRequest(IServiceRequest request)
at Opc.Ua.DiscoveryClient.GetEndpoints(RequestHeader requestHeader, String endpointUrl, StringCollection localeIds, StringCollection profileUris, EndpointDescriptionCollection& endpoints)
at OpcLabs.EasyOpc.UA.Toolkit.Sdk.ToolkitDiscoveryClient.OpcLabs.EasyOpc.UA.Toolkit.ClientServer.ISdkDiscoveryClient.GetEndpoints(String endpointUrl, StringCollection sdkProfileUris)
at OpcLabs.EasyOpc.UA.Toolkit.Sdk.ClientUtils.<>c__DisplayClass55_0.<SelectEndpointInternal>b__2()
at OpcLabs.EasyOpc.UA.Toolkit.UAEngineBase.PerformSdkAction(UASdkCallType callType, Func`1 usingFunction, String name, Action sdkAction)
TargetSite:
Message:
UA SDK error (Opc.UA.ServiceResult=0x80820000) in 'DiscoveryClient.GetEndpoints'. OPC UA service result - {BadTcpInternalError}. Error establishing a connection.
+ The error occurred when preselecting an endpoint for discovery URL "opc.tcp://DEV2017:49320".
+ Some possible causes of this error are that the OPC-UA server is not running, or is not configured to listen on the specified port. Also, the network connection may be broken (cable unplugged?).
+ The endpoint URL string used was "opc.tcp://DEV2017:49320".
+ The client method called (or event/callback invoked) was 'BrowseMultiple'.
Source:
Stack Trace:
== Activity Trace ==
Following (7) events were gathered during the action on activity ID [23], in the order of first occurrence:
SDK trace: GetEndpoints Called. RequestHandle=1, PendingRequestCount=1
3*[8] Exception: {System.Net.Sockets.SocketException} No connection could be made because the target machine actively refused it
[17] Exception: {Opc.Ua.ServiceResultException} An unexpected error occurred while connecting to the server.
Exception: {Opc.Ua.ServiceResultException} Error establishing a connection.
SDK trace: GetEndpoints Completed. RequestHandle=1, PendingRequestCount=0, StatusCode=Bad
Events starting with activity ID in [] may not necessarily be related to the current action.

TargetSite:
Message: Problem browsing OPC Unified Architecture nodes.
Source:
StackTrace:
TargetSite:


Michael
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.140 seconds