You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Dhiraj Krishnani <dh...@factorian.io> on 2022/05/12 07:19:51 UTC

Error Connecting with OPCUA server

Dear Team,

I am connecting my kafka-connect to the OPCUA server, it is giving below error :

Caused by: org.apache.plc4x.java.api.exceptions.PlcRuntimeException: Endpoint returned from the server doesn't match the format '{protocol-code}:({transport-code})?//{transport-host}(:{transport-port})(/{transport-endpoint})'
        at org.apache.plc4x.java.opcua.context.SecureChannel.isEndpoint(SecureChannel.java:1147)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
        at org.apache.plc4x.java.opcua.context.SecureChannel.selectEndpoint(SecureChannel.java:1121)
        at org.apache.plc4x.java.opcua.context.SecureChannel.onConnectActivateSessionRequest(SecureChannel.java:489)
        at org.apache.plc4x.java.opcua.context.SecureChannel.lambda$onConnectCreateSessionRequest$13(SecureChannel.java:437)
        at org.apache.plc4x.java.opcua.context.SecureChannel.lambda$submit$1(SecureChannel.java:230)
        at org.apache.plc4x.java.spi.Plc4xNettyWrapper.decode(Plc4xNettyWrapper.java:175)
        at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81)
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
        ... 28 more


I am able to handshake but unable to connect, can you please look into that issue and let me know what shall be the solution,
I am using Amazon AWS ubuntu server and the OPCUA host is installed in remote server

Thanks
[cid:image002.png@01D865FE.C44870D0]

Re: Error Connecting with OPCUA server

Posted by Ben Hutcheson <be...@gmail.com>.
Hi,Dhiraj,

It looks like your OPCUA server is returning an endpoint string that we
don't recognize for some reason.

Can you please send through more information?
- What is your PLC4X connection string you are using?
- Can you send through a pcap or screenshot showing the endpoints returned
in the Activate Session Response packet sent from the OPCUA server to the
PLC4X client?
- What OPCUA server are you using?

Hopefully with that we should be able to see what is causing it.

Kind Regards

Ben

On Thu, May 12, 2022 at 6:46 PM Dhiraj Krishnani <dh...@factorian.io>
wrote:

> Dear Team,
>
>
>
> I am connecting my kafka-connect to the OPCUA server, it is giving below
> error :
>
>
>
> Caused by: org.apache.plc4x.java.api.exceptions.PlcRuntimeException:
> Endpoint returned from the server doesn't match the format
> '{protocol-code}:({transport-code})?//{transport-host}(:{transport-port})(/{transport-endpoint})'
>
>         at
> org.apache.plc4x.java.opcua.context.SecureChannel.isEndpoint(SecureChannel.java:1147)
>
>         at
> java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
>
>         at
> java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
>
>         at
> java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
>
>         at
> java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
>
>         at
> java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
>
>         at
> java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
>
>         at
> java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
>
>         at
> java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
>
>         at
> java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
>
>         at
> org.apache.plc4x.java.opcua.context.SecureChannel.selectEndpoint(SecureChannel.java:1121)
>
>         at
> org.apache.plc4x.java.opcua.context.SecureChannel.onConnectActivateSessionRequest(SecureChannel.java:489)
>
>         at
> org.apache.plc4x.java.opcua.context.SecureChannel.lambda$onConnectCreateSessionRequest$13(SecureChannel.java:437)
>
>         at
> org.apache.plc4x.java.opcua.context.SecureChannel.lambda$submit$1(SecureChannel.java:230)
>
>         at
> org.apache.plc4x.java.spi.Plc4xNettyWrapper.decode(Plc4xNettyWrapper.java:175)
>
>         at
> io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81)
>
>         at
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
>
>         ... 28 more
>
>
>
>
>
> I am able to handshake but unable to connect, can you please look into
> that issue and let me know what shall be the solution,
>
> I am using Amazon AWS ubuntu server and the OPCUA host is installed in
> remote server
>
>
>
> Thanks
>
>