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: 88
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: 1027
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: 88
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: 88
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: 88
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: 1919

Currently Online:
68 Guest(s)

Currently Browsing this Page:
2 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: 739

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6453

Newest Members:

shaylamaggard4, rickyjuarez140, jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons

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

Administrators: admin: 1