Open asgaralim opened 5 years ago
Hi @asgaralim, One reason that above does not work is that the proxy in iotedge is not able to resolve the host address "vmwin2019" since it sits on the bridge network. Even if you made it part of the host network, LCOW networking is special as the containers are hosted in the Moby VM which sits on the dockernat.
There are a couple potential ways to address this:
"HostConfig": {
"ExtraHosts": [
"vmwin2019:<ip-address-of-vm-host"
]
}
More information you can find in https://github.com/Azure/iot-edge-opc-publisher repo readme.
If this does not help, please provide the "createoptions" you used to create the proxy deployment, and also please post the edge logs of the proxy (i.e. using iotedge logs
Both 1 & 2 option did not fix the issue. I sent all files to Enes Uysal through email.
Thank you for the additional information. The name is now resolved, but the socket handshake is er_refused which typically happens when a firewall blocks access to the port. Can you check and open up port 48400 inbound to your vm and try again? I would first look into the windows server firewall on the host then the azure network interface firewall (in the resource group).
I will open the inbound port and update you soon.
I have a query . The main purpose to use opc proxy module in our design is to avoid opening any inbound ports on onprem systems. How can we avoid opening inbound ports ?
Thanks
Hi @asgaralim - in a secure network you typically close ports on the "network firewall", so that from the outside you cannot enter the network through "any" port. And yes, here the IoT Edge as well as Proxy only needs an outgoing rule for port 443 (if websocket is used).
However, in above case the firewall seems to be active on the vm OS. The VM in your simulation takes the role of "device" (i.e. PLC, etc.) and to be able to communicate with said device, the device itself must not reject connection requests to any ports it provides services on, e.g. in this case the com-wrapper listener port.
After opening all inbound ports, the proxy failed to establish the connection between OPC UA COM server wrapper and client ( proxy api csharp code). I sent all files to Enes Uysal through email. Please let me know your suggestions. The client code throws exception at : var endpointCollection = DiscoverEndpoints(config, endpointURI, 10);
I disabled the Firewall setting on the VM. Now proxy is able establish connection with OPC UA server. But the client application (iot-edge-opc-proxy-api-csharp) throws an exception at the time of endpoint discovery, session creation and session close. Exception/Error : “Remote side closed” . Could you please let us know your comments on this error.
Thank you.
Hi, the exception is thrown to indicate to clients that use the async await API calls that the remote side closed the socket e.g. using closesocket() It is expected behavior in most cases. Since the browse response does not show any data, is this a permission issue? Can you use the standard opc UA reference client to connect and browse?
Setup :
Reference link : Test Client: https://github.com/Azure/iot-edge-opc-proxy-api-csharp OPC Proxy : https://github.com/Azure/iot-edge-opc-proxy COM UA wrapper (see COMIOP project) : https://github.com/OPCFoundation/UA-.NETStandard