locka99 / opcua

A client and server implementation of the OPC UA specification written in Rust
Mozilla Public License 2.0
496 stars 131 forks source link

Connection issue, missing path in endpoint URL #99

Closed ctron closed 3 years ago

ctron commented 3 years ago

Trying to connect to an endpoint like opc.tcp://localhost:1234/foo will try to connect to opc.tcp://localhost:1234 instead, which an OPC UA server might reject:

10:03:01.940 [milo-netty-event-loop-2] ERROR o.e.m.o.s.s.t.u.UascServerHelloHandler - [remote=/[0:0:0:0:0:0:0:1]:44208] Exception caught; sent ErrorMessage{error=StatusCode{name=Bad_TcpEndpointUrlInvalid, value=0x80830000, quality=bad}, reason=unrecognized endpoint url: opc.tcp://localhost:12686/}
io.netty.handler.codec.DecoderException: UaException: status=Bad_TcpEndpointUrlInvalid, message=unrecognized endpoint url: opc.tcp://localhost:12686/
locka99 commented 3 years ago

I took the diff so I'll close this