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
Problem with connection to a Siemens OpcUa Server (Bad_CommunicationError "A low level communication error occurred")
May 27, 2020
10:34, EEST
Avatar
rocket science
Member
Members
Forum Posts: 77
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Hi there!

We have some problem connecting to a Siemens OpcUa server. Using UaExpert, the connection does work.

What could be the problem when we try to connect using the ProsysSDK? Could it be some sort of Client or Server issue?

2020-05-25 16:37:17,061 INFO [Thread-6362] org.opcfoundation.ua.transport.tcp.io.TcpConnection: /10.30.40.69:4840 Connecting
2020-05-25 16:37:17,067 INFO [Thread-6362] org.opcfoundation.ua.transport.tcp.io.TcpConnection: /10.30.40.69:4840 Connected
2020-05-25 16:37:17,080 INFO [Thread-6362] org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp: 101696 Closed
2020-05-25 16:37:17,080 INFO [Thread-6362] org.opcfoundation.ua.transport.tcp.io.TcpConnection: /10.30.40.69:4840 Closed
2020-05-25 16:37:17,080 INFO [TcpConnection/Read] org.opcfoundation.ua.transport.tcp.io.TcpConnection: /10.30.40.69:4840 Closed (expected)
2020-05-25 16:37:17,081 INFO [Thread-6362] org.opcfoundation.ua.transport.tcp.io.TcpConnection: /10.30.40.69:4840 Connecting
2020-05-25 16:37:17,086 INFO [Thread-6362] org.opcfoundation.ua.transport.tcp.io.TcpConnection: /10.30.40.69:4840 Connect failed
java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.net.SocketInputStream.read(SocketInputStream.java:224)
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable._get(InputStreamReadable.java:53)
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable.getInt(InputStreamReadable.java:143)
at org.opcfoundation.ua.transport.tcp.io.TcpConnection.open(TcpConnection.java:501)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.open(SecureChannelTcp.java:566)
at org.opcfoundation.ua.application.Client.createSecureChannel(Client.java:644)
at com.prosysopc.ua.client.UaClient.t(SourceFile:4652)
at com.prosysopc.ua.client.UaClient.connect(SourceFile:783)
2020-05-25 16:37:17,086 WARN [Thread-6362] org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp: Connection failed: Bad_CommunicationError (code=0x80050000, description=”2147811328, Software caused connection abort: recv failed”)
2020-05-25 16:37:17,086 WARN [Thread-6362] org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp: Bad_CommunicationError: Retrying
2020-05-25 16:37:17,086 INFO [Thread-6362] org.opcfoundation.ua.transport.tcp.io.TcpConnection: /10.30.40.69:4840 Connecting
2020-05-25 16:37:17,090 INFO [Thread-6362] org.opcfoundation.ua.transport.tcp.io.TcpConnection: /10.30.40.69:4840 Connect failed
java.io.EOFException
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable._get(InputStreamReadable.java:55)
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable.getInt(InputStreamReadable.java:143)
at org.opcfoundation.ua.transport.tcp.io.TcpConnection.open(TcpConnection.java:504)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.open(SecureChannelTcp.java:575)
at org.opcfoundation.ua.application.Client.createSecureChannel(Client.java:644)
at com.prosysopc.ua.client.UaClient.t(SourceFile:4652)
at com.prosysopc.ua.client.UaClient.connect(SourceFile:783)

2020-05-25 16:37:18,134 ERROR [Thread-6362] com.prosysopc.ua.client.ConnectException: Failed to create secure channel to server: : opc.tcp://10.30.40.69:4840 [http://opcfoundation.org/UA/SecurityPolicy#None,None] ServiceResult=Bad_CommunicationError (0x80050000) “A low level communication error occurred.”
com.prosysopc.ua.client.ConnectException: Failed to create secure channel to server: : opc.tcp://10.30.40.69:4840 [http://opcfoundation.org/UA/SecurityPolicy#None,None] ServiceResult=Bad_CommunicationError (0x80050000) “A low level communication error occurred.”
at com.prosysopc.ua.client.UaClient.t(SourceFile:4655)
at com.prosysopc.ua.client.UaClient.connect(SourceFile:783)
Caused by: org.opcfoundation.ua.common.ServiceResultException: Bad_CommunicationError (code=0x80050000, description=”2147811328, null”)
at org.opcfoundation.ua.transport.tcp.io.TcpConnection.open(TcpConnection.java:582)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.open(SecureChannelTcp.java:575)
at org.opcfoundation.ua.application.Client.createSecureChannel(Client.java:644)
at com.prosysopc.ua.client.UaClient.t(SourceFile:4652)
… 11 more
Caused by: java.io.EOFException
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable._get(InputStreamReadable.java:55)
at org.opcfoundation.ua.utils.bytebuffer.InputStreamReadable.getInt(InputStreamReadable.java:143)
at org.opcfoundation.ua.transport.tcp.io.TcpConnection.open(TcpConnection.java:504)
… 14 more

Thanks!

May 27, 2020
13:39, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

This could be just some kind of network error, see e.g. https://stackoverflow.com/questions/135919/java-net-socketexception-software-caused-connection-abort-recv-failed .

Are both connections attempts made from the same machine and relatively within the same time period? Is this reproducible or does it happen randomly?

What Siemens device is this? What is it’s firmware version? Also what versions of the SDK and UaExpert?

At least for Siemens S7-1500 and S7-1200 there has been issues in older firmwares, where possible please update to the latest ones and see if that fixes it. One characteristic of at least one issue was that there were incorrect lenght prefixes in the binary stream, which causes us to fail, but UaExpert not (since in some very special cases it is possible to ignore the lengths). At least for S7-1500 that issue is fixed in newer firmwares, for S7-1200 I do not know. And if we go more into past there has been also other problems with other devices, e.g. your post from 2017: https://forum.prosysopc.com/forum/opc-ua-java-sdk/stability-issues-with-siemens-sinumerik-840/

If that doesn’t help, where possible, please capture a Wireshark log https://www.prosysopc.com/blog/opc-ua-wireshark/ and send it to uajava-support@prosysopc.com. That would probably also show any network related problems.

P.S. Since this happens just when the connection is to be formed, it is also possible that we’ll lack some error handling, which is the reason why it reported like that, though that can always be improved, it probably wouldn’t fix any underlying cause for what reason the socket/stream breaks.

May 27, 2020
19:13, EEST
Avatar
rocket science
Member
Members
Forum Posts: 77
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Hi Bjarne, thanks for your reply.

Both connection attempts were made from the same machine and within the same time period and it is 100% reproduceable.

I do not know exactly what Siemens device it is yet, but I will try to get more information about the device itself. What I can provide is the Info which we could see in the UaExpert at Server/ServerStatus/BuildInfo which is:

SoftwareVersion 4.6.2
http://automation.siemens.com
SIEMENS AG DF MC
BUILD DATE 2017-06-22T09:13:49.000Z

Currently we are still on Prosys Client SDK 3.2.0 (we postponed upgrading to 4, because we did not have any issues with the 3.2.0 until now).

I’ll try to get a wireshark recording and maybe I’ll also try to connect using the Prosys OpcUa Browser which is on SDK 4 and maybe also an older SDK 3 version to see if it shows a different behaviour.

Thank you so far.

May 27, 2020
19:34, EEST
Avatar
rocket science
Member
Members
Forum Posts: 77
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Ok what I found out so far is that it might be a device called ‘Sinumerik OPC UA’ which looks like that it has nothing to do with the S7 1500/1200 but it is another Siemens product.
I found one thread (https://www.eclipse.org/lists/milo-dev/msg00173.html), were someone had also problems using the Milo SDK when subscribing to nodes also with the software version 4.6.2. I will take some further look into this, if there’s maybe some newer firmware for this device or more information about known bugs with it.

May 28, 2020
9:58, EEST
Avatar
rocket science
Member
Members
Forum Posts: 77
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Hi again,
after some more detailed research, I found some incidents where other people had problems using the SIemens Sinumerik OpcUa, too.
All have in common that they had problems with firmware version 4.4 up to 4.7
It seems that updating to 4.8 will make it work.
I suggested to update the Sinumerik to firmware 4.8 and we’ll try it again after it got the latest firmware apllied.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

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

Administrators: admin: 1