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, EEST
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, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1028
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, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
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, EEST
Avatar
Kevin Herron
Member
Members
Forum Posts: 8
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, EEST
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, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
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: 1919

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 726

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1525

Posts: 6456

Newest Members:

ernestoportus31, martin123, rickie5305, shaylamaggard4, rickyjuarez140, jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1028, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1