Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Connecting to Eclipse Milo OPC Server Example failed
May 4, 2017
23:42, EET
Avatar
michooo
New Member
Members
Forum Posts: 2
Member Since:
May 4, 2017
sp_UserOfflineSmall Offline

Hi,

For understanding better the OPC Specification, I’m trying to connect with your Prosys OPC UA Client (Version: 2.2.2) to the Server-Example of the Eclipse Milo Project (https://github.com/eclipse/milo/blob/master/milo-examples/server-examples/src/main/java/org/eclipse/milo/examples/server/ExampleServer.java).

So I’m starting the Server from the main class of the ExampleServer.java in my Eclipse (Neon.3 Release (4.6.3)). Default server successfully created at:

opc.tcp://127.0.0.1:12686/example

Now I use the client to connect to Server, with Security Mode: none. In the Eclipse Console an exception is visible:

[ua-netty-event-loop-3] ERROR org.eclipse.milo.opcua.stack.server.handlers.UaTcpServerHelloHandler – [remote=/127.0.0.1:63382] Exception caught; sent ErrorMessage{error=StatusCode{name=Bad_TcpEndpointUrlInvalid, value=0x80830000, quality=bad}, reason=unrecognized endpoint url: }
io.netty.handler.codec.DecoderException: UaException: status=Bad_TcpEndpointUrlInvalid, message=unrecognized endpoint url:
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:418)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:245)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:278)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:962)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:485)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:399)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:371)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:748)
Caused by: UaException: status=Bad_TcpEndpointUrlInvalid, message=unrecognized endpoint url:
at org.eclipse.milo.opcua.stack.server.handlers.UaTcpServerHelloHandler.lambda$onHello$0(UaTcpServerHelloHandler.java:86)
at java.util.Optional.orElseThrow(Optional.java:290)
at org.eclipse.milo.opcua.stack.server.handlers.UaTcpServerHelloHandler.onHello(UaTcpServerHelloHandler.java:83)
at org.eclipse.milo.opcua.stack.server.handlers.UaTcpServerHelloHandler.decode(UaTcpServerHelloHandler.java:68)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:387)
… 11 more

The client come up with a message:

Could not connect to server:
Error=Failed to retrieve endpoints. The server is not available: opc.tcp://127.0.0.1:12686/example

At the startup of the server an endpoint of the given url is successfully created.

Any idea?

Vice versa: with the Client Example of the Milo-Project I can succesfully connect to the ProSys Simulation Server.

May 5, 2017
14:41, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 422
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

It looks like a server error, could you also test with UaExpert (https://www.unified-automation.com/products/development-tools/uaexpert.html) to check if it works with other clients?

– Bjarne

May 5, 2017
16:59, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 833
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

This interoperability issue should be fixed in the latest Prosys OPC UA Java SDK (although this kind of error can be defined as a server bug, as well).

The Prosys OPC UA Client application has not been updated for that yet, though. If you wish to try a new beta version, please contact our support by email.

May 10, 2017
19:34, EET
Avatar
Kevin Herron
Member
Members
Forum Posts: 7
Member Since:
March 7, 2014
sp_UserOfflineSmall Offline

Just to add more information:

This happens because the previous versions of the Prosys client (or OPC foundation UA stack is really responsible, yeah?) send an empty endpoint URL in the Hello message and the Milo server requires that clients send a URL that matches one of the bound servers/endpoints. Since the Milo SDK allows you to bind and run more than one server at once the endpoint URL is crucial in determining which endpoint on which server you’re trying to connect to as a client, so rather than guessing it simply rejects the connection attempt.

May 11, 2017
20:48, EET
Avatar
michooo
New Member
Members
Forum Posts: 2
Member Since:
May 4, 2017
sp_UserOfflineSmall Offline

Bjarne Boström said
Hi,

It looks like a server error, could you also test with UaExpert (https://www.unified-automation.com/products/development-tools/uaexpert.html) to check if it works with other clients?

– Bjarne  

Yes, the UAExpert-Client and even the “CommServer OPC UA Viewer” (http://www.commsvr.com/Product…..iewer.aspx) can successfully connect to the Milo Example Server without any issue.

As Kevin Herron said, the ProSys Client should implement the response on the Hello-Message with an Endpoint URL to create a connection to Milo-Based OPC Servers.

I hope that this feature will be implemented soon, also on the Android OPC Client. There is exatly the same behavior…

By the way: The Android OPC Client is really dope!

Thank you guys.

May 12, 2017
11:05, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 833
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

michooo said

As Kevin Herron said, the ProSys Client should implement the response on the Hello-Message with an Endpoint URL to create a connection to Milo-Based OPC Servers.

Yes, we have the fix available and it’s included in the latest SDK release, but we just need to release updates for the free products. Stay tuned or contact our support by email…

By the way: The Android OPC Client is really dope!
 

Thanks, good to hear that you like it!

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 119

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 91

pramanj: 86

ibrahim: 68

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 36

Rainer Versteeg: 32

peterrob45: 25

Member Stats:

Guest Posters: 0

Members: 897

Moderators: 12

Admins: 1

Forum Stats:

Groups: 3

Forums: 14

Topics: 898

Posts: 3787

Newest Members:

thojermaine, Lukas, lbtsheldon, dpto.informatica, nolazky8119, peter.jakubik, amaralesbeltateresa@yahoo.com, amaralesbeltateresa@gmail.com, esbeltateresaamaral@yahoo.com.br, doanphan111

Moderators: Jouni Aro: 833, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 422, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 16, Markus Johansson: 1

Administrators: admin: 0