Open mlang-de opened 7 years ago
Is the server returning endpoints that contain localhost in the endpoint URL rather than the IP address?
If so, this is a common question I've covered here: http://stackoverflow.com/questions/40554198/java-opc-ua-client-eclipse-milo-endpoint-url-changes-to-localhost/40555243#40555243
In this case though, you don't actually want to fix anything. The stack-bench tool should only be run on localhost.
You are right! I use the OPC Foundation Sample Server and check the GetEndpointsResponse with wireshark. The received EndpointUrl is 'opc.tcp://localhost:51210/UA/SampleServer'.
One other (dirty?) way to connect with the remote server could be to modify the config.xml from the OPCF sample server. / original /
If you don't run on localhost I suspect most servers will show the same performance numbers as you're limited by the latency of the network connection.
Regardlessly which address is entered into the config file (e.g. "opc.tcp://10.11.5.8:51210/UA/Server"), the client will connect to "opc.tcp://localhost:51210/UA/Server". This is caused by function "getOpcUaClient(endpointUrl: String)". Variable 'endpointUrl' contains the correct string from the config file, after UaTcpStackClient.getEndpoints(endpointUrl).get() the IP address in variable 'endpoints' will be replaced and the client tries to connect to the localhost.
If the server certificate is modified with the current fix IP address the stack-bench tool will work.