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
Can't connect to Open62541
July 5, 2017
14:27, EEST
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

We are trying to connect to the Open62541 server (or discovery server). But I get following error. Connecting with UaExpert works, so is it mabe a bug in the Prosys SDK? We have Version 2.2.6, so it should not be the bug, which was mentioned in the other posts.

Caused by: com.prosysopc.ua.client.ConnectException: Failed to retrieve endpoints. The server is not available: opc.tcp://10.129.233.56:16664 ServiceResult=Bad_CommunicationError (0x80050000) “A low level communication error occurred.”
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.getEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.w(Unknown Source)
at com.prosysopc.ua.client.UaClient.connect(Unknown Source)
at com.kuka.basys.opcua.client.opcua.OpcUaConnection.(OpcUaConnection.java:76)
… 7 more
Caused by: org.opcfoundation.ua.common.ServiceResultException: Bad_CommunicationError (code=0x80050000, description=”2147811328, null”)
at org.opcfoundation.ua.transport.tcp.io.TcpConnection.open(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.open(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
… 13 more
Caused by: java.io.EOFException
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable._get(Unknown Source)
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable.getInt(Unknown Source)
… 18 more
07/05/2017 11:54:07.435 ERROR Connection to endpoint could not be established
Exception in thread “main” java.lang.NullPointerException
at com.kuka.basys.opcua.client.OpcUaApplication.startApplication(OpcUaApplication.java:56)
at com.kuka.basys.opcua.client.OpcUaApplication.main(OpcUaApplication.java:50)

July 7, 2017
9:34, EEST
Avatar
Lauri Saikko
New Member
Members
Forum Posts: 2
Member Since:
July 6, 2017
sp_UserOfflineSmall Offline

I tried to reproduce your problem but could not. Using SDK version 2.2.6 and the server in the examples of Open62541, I could establish a connection to the server, and I did not get any errors.

July 7, 2017
10:23, EEST
Avatar
Lauri Saikko
New Member
Members
Forum Posts: 2
Member Since:
July 6, 2017
sp_UserOfflineSmall Offline

Could you be a bit more specific on what you did and how the problems appeared? With some more information it would be easier to find out where the problem is and why you couldn’t connect to the server.

July 7, 2017
12:48, EEST
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

Hi,
actually it is difficult to provide extra information, I increased logging: What i do is

UaClient uaClient = new UaClient();
try {
uaClient.setUri(SERVER_URI_LBR);
uaClient.connect();
} catch (URISyntaxException | ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

What I get is:
* Prosys OPC UA Java SDK v2.2.6-708
* (c) Prosys PMS Ltd.

07/07/2017 11:44:23.068 DEBUG java.runtime.name=Java(TM) SE Runtime Environment
07/07/2017 11:44:23.068 DEBUG sun.boot.library.path=C:\Program Files\Java\jdk1.8.0_111\jre\bin
07/07/2017 11:44:23.069 DEBUG java.vm.version=25.111-b14
07/07/2017 11:44:23.069 DEBUG java.vm.vendor=Oracle Corporation
07/07/2017 11:44:23.069 DEBUG java.vendor.url=http://java.oracle.com/
07/07/2017 11:44:23.069 DEBUG path.separator=;
07/07/2017 11:44:23.069 DEBUG java.vm.name=Java HotSpot(TM) 64-Bit Server VM
07/07/2017 11:44:23.069 DEBUG file.encoding.pkg=sun.io
07/07/2017 11:44:23.069 DEBUG user.country=DE
07/07/2017 11:44:23.069 DEBUG user.script=
07/07/2017 11:44:23.069 DEBUG sun.java.launcher=SUN_STANDARD
07/07/2017 11:44:23.069 DEBUG sun.os.patch.level=Service Pack 1
07/07/2017 11:44:23.069 DEBUG java.vm.specification.name=Java Virtual Machine Specification
07/07/2017 11:44:23.069 DEBUG user.dir=C:\Users\workspaceNeon\OpcUaClient
07/07/2017 11:44:23.069 DEBUG java.runtime.version=1.8.0_111-b14
07/07/2017 11:44:23.069 DEBUG java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
07/07/2017 11:44:23.069 DEBUG java.endorsed.dirs=C:\Program Files\Java\jdk1.8.0_111\jre\lib\endorsed
07/07/2017 11:44:23.069 DEBUG os.arch=amd64
07/07/2017 11:44:23.069 DEBUG java.io.tmpdir=C:\Users\AppData\Local\Temp\
07/07/2017 11:44:23.069 DEBUG line.separator=

07/07/2017 11:44:23.070 DEBUG java.vm.specification.vendor=Oracle Corporation
07/07/2017 11:44:23.070 DEBUG user.variant=
07/07/2017 11:44:23.070 DEBUG os.name=Windows 7
07/07/2017 11:44:23.070 DEBUG sun.jnu.encoding=Cp1252
07/07/2017 11:44:23.070 DEBUG java.library.path=C:\Program Files\Java\jdk1.8.0_111\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.8.0_111\jre\bin;C:/Program Files/Java/jdk1.8.0_121/jre/bin/server;C:/Program Files/Java/jdk1.8.0_121/jre/bin;C:/Program Files/Java/jdk1.8.0_121/jre/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Autodesk Shared\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CMake\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\apache-maven-3.3.9\bin;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files\TortoiseGit\bin;C:\Users\Kaspar\Programme\eclipse-java-neon-1a-win32-x86_64\eclipse;;.
07/07/2017 11:44:23.070 DEBUG java.specification.name=Java Platform API Specification
07/07/2017 11:44:23.070 DEBUG java.class.version=52.0
07/07/2017 11:44:23.070 DEBUG sun.management.compiler=HotSpot 64-Bit Tiered Compilers
07/07/2017 11:44:23.070 DEBUG os.version=6.1
07/07/2017 11:44:23.070 DEBUG user.home=C:\Users\…
07/07/2017 11:44:23.070 DEBUG java.awt.printerjob=sun.awt.windows.WPrinterJob
07/07/2017 11:44:23.070 DEBUG file.encoding=Cp1252
07/07/2017 11:44:23.070 DEBUG java.specification.version=1.8

07/07/2017 11:44:23.071 DEBUG user.language=de
07/07/2017 11:44:23.071 DEBUG java.specification.vendor=Oracle Corporation
07/07/2017 11:44:23.071 DEBUG awt.toolkit=sun.awt.windows.WToolkit
07/07/2017 11:44:23.071 DEBUG java.vm.info=mixed mode
07/07/2017 11:44:23.071 DEBUG java.version=1.8.0_111
07/07/2017 11:44:23.071 DEBUG java.ext.dirs=C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
07/07/2017 11:44:23.071 DEBUG sun.boot.class.path=C:\Program Files\Java\jdk1.8.0_111\jre\lib
esources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib
t.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\classes
07/07/2017 11:44:23.071 DEBUG java.vendor=Oracle Corporation
07/07/2017 11:44:23.071 DEBUG file.separator=\
07/07/2017 11:44:23.071 DEBUG java.vendor.url.bug=http://bugreport.sun.com/bugreport/
07/07/2017 11:44:23.071 DEBUG sun.io.unicode.encoding=UnicodeLittle
07/07/2017 11:44:23.071 DEBUG sun.cpu.endian=little
07/07/2017 11:44:23.071 DEBUG sun.desktop=windows
07/07/2017 11:44:23.071 DEBUG sun.cpu.isalist=amd64
07/07/2017 11:44:23.260 DEBUG connect
07/07/2017 11:44:23.604 DEBUG discoverEndpoints: connectUri=opc.tcp://10.129.232.220:16664 protocols=[opc.tcp]
07/07/2017 11:44:23.611 DEBUG initialize: url=opc.tcp://10.129.232.220:16664
07/07/2017 11:44:23.617 DEBUG open
07/07/2017 11:44:23.617 INFO /10.129.232.220:16664 Connecting
07/07/2017 11:44:23.623 DEBUG /10.129.232.220:16664 Socket connected
07/07/2017 11:44:23.633 INFO /10.129.232.220:16664 Connect failed
java.io.EOFException
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable._get(Unknown Source)
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable.getInt(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.TcpConnection.open(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.open(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.getEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.w(Unknown Source)
at com.prosysopc.ua.client.UaClient.connect(Unknown Source)
at com.kuka.basys.opcua.client.OpcUaApplication.main(OpcUaApplication.java:59)
07/07/2017 11:44:23.655 WARN Connection failed: Bad_CommunicationError (code=0x80050000, description=”2147811328, null”)
07/07/2017 11:44:23.655 WARN Bad_CommunicationError: Retrying
07/07/2017 11:44:23.655 INFO /10.129.232.220:16664 Connecting
07/07/2017 11:44:23.657 DEBUG /10.129.232.220:16664 Socket connected
07/07/2017 11:44:23.661 INFO /10.129.232.220:16664 Connect failed
java.io.EOFException
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable._get(Unknown Source)
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable.getInt(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.TcpConnection.open(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.open(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.getEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.w(Unknown Source)
at com.prosysopc.ua.client.UaClient.connect(Unknown Source)
at com.kuka.basys.opcua.client.OpcUaApplication.main(OpcUaApplication.java:59)
07/07/2017 11:44:24.672 DEBUG requests.clear()
07/07/2017 11:44:24.673 DEBUG Connection failed
org.opcfoundation.ua.common.ServiceResultException: Bad_CommunicationError (code=0x80050000, description=”2147811328, null”)
at org.opcfoundation.ua.transport.tcp.io.TcpConnection.open(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.open(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.getEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.w(Unknown Source)
at com.prosysopc.ua.client.UaClient.connect(Unknown Source)
at com.kuka.basys.opcua.client.OpcUaApplication.main(OpcUaApplication.java:59)
Caused by: java.io.EOFException
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable._get(Unknown Source)
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable.getInt(Unknown Source)
… 11 more
com.prosysopc.ua.client.ConnectException: Failed to retrieve endpoints. The server is not available: opc.tcp://10.129.232.220:16664 ServiceResult=Bad_CommunicationError (0x80050000) “A low level communication error occurred.”
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.discoverEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.getEndpoints(Unknown Source)
at com.prosysopc.ua.client.UaClient.w(Unknown Source)
at com.prosysopc.ua.client.UaClient.connect(Unknown Source)
at com.kuka.basys.opcua.client.OpcUaApplication.main(OpcUaApplication.java:59)
Caused by: org.opcfoundation.ua.common.ServiceResultException: Bad_CommunicationError (code=0x80050000, description=”2147811328, null”)
at org.opcfoundation.ua.transport.tcp.io.TcpConnection.open(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.open(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
… 6 more
Caused by: java.io.EOFException
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable._get(Unknown Source)
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable.getInt(Unknown Source)
… 11 more

July 7, 2017
13:37, EEST
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

Ok we found out, that it works with the lastest normal release, but it crashes with the version on the open62541 master branch. But we don’t know on which side the problem is, because UaExpert can also connect with open62541 on the master branch…

July 10, 2017
17:09, EEST
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

Thank you for the information. Based on your description, it sounds like there has been a change in the server side toolkit which causes the error. So I would suggest to primarily focus on finding the cause for the error from the server application made with the Open62541 toolkit.

The fact that UaExpert can establish a connection is of course a good thing but it cannot be regarded as interoperability testing. On the other hand, Prosys OPC UA Java SDK is certified for compliance by OPC Foundation. And we’re just going through with compliance testing Prosys OPC UA Simulation Server application which is based on the Java SDK.

That being said, we’re of course very happy to correct any bugs or interoperability issues in the Prosys OPC UA Java SDK. And we’re very glad that you’re reporting them to us. But this case sounds like a server application issue until proven otherwise.

July 19, 2017
15:56, EEST
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

Hi,
so the developers from Open62541 say, that is probably an issue with the Prosys Stack, or that at least there should be another error handling… See the post here:
https://github.com/open62541/open62541/issues/1107. Currently we can’t connect the two SDKs!

July 20, 2017
17:37, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Might be an issue with Java, but with the current knowledge there is nothing else we can do. The socket is giving an EOFException, which is being raised properly as a ServiceResultException: Bad_CommunicationError. I cannot figure out any better error handling for this situation.

IMO, it is a bit exaggerated to label this as ‘crash’. The client application just fails to connect. OTOH, I am not sure what happens in the server.

Anyway, we are glad to help in sorting this issue out, if you find out more information about the problem. With the current knowledge we don’t know how to target this.

The Java stack should also support IPV6 in general, although it has not been used very extensively. I would find it better to support IPV4 as long as it is available, anyway.

July 24, 2017
16:39, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

The issue was fixed in Open62541 (see the link above)

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 75

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 709

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1465

Posts: 6252

Newest Members:

christi10l, ahamad1, Flores Frederick, ellenmoss, harriettscherer, shanonhumphreys, KupimotoblokfuB, tamhollander5, paulinafcf, bridgette18l

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 982, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 319, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1