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
ServiceException: Bad_EncodingLimitsExceeded
August 25, 2016
15:38, EEST
Avatar
drothe
New Member
Members
Forum Posts: 1
Member Since:
August 25, 2016
sp_UserOfflineSmall Offline

Hi,

I have used the ProSys Java Client SDK version 2.2.2-638 to create a client that should download (and also upload) some files from an OPC UA
Server. The server, on the other hand, is written in C++ and is based on the stack by Unified Automation.
The files in the server are modeled using an OPC UA type derived from the standard FileType.

With my client, I have the problem that sporadically, download will fail and leave a file that is 0 bytes or incomplete.
I haven’t yet found a reliable way to reproduce the issue, but my suspicion is that it happens when there already is much traffic in the session used,
due to supscriptions on about 4000 Nodes with updates on a seconds basis.

The client uses a loop over calls to the FileType::Read method.
Actually, the java code does not use the pre-defined class com.prosysopc.ua.types.opcua.client.FileTypeImpl, but directly uses the call service like

outArgs = client.call(file, nodeIdRead, new Variant(new UnsignedInteger(fileHandle)), new Variant(new Integer(bufferSize)));

As buffer size, I use 1024 kbyte, which is well below MaxByteStringLength.
(client.getEndpointConfiguration().getMaxByteStringLength() returns 2147483647)

Occasionally, the call to FileType::Read will trigger a ServiceException and this causes the download operation to fail before completing.
Due to the communication fault, the connection breaks, but it reconnects automatically, see output:

com.prosysopc.ua.ServiceException: Bad_EncodingLimitsExceeded (code=0x80080000, description=”MaxByteStringLength 1048560 < 1048576") ServiceResult=Bad_EncodingLimitsExceeded (0x80080000) "The message encoding/decoding limits imposed by the stack have been exceeded."
at com.prosysopc.ua.client.UaClient.call(Unknown Source)

com.prosysopc.ua.ServiceException: Bad_ServerNotConnected (code=0x800D0000, description="The operation could not complete because the client is not connected to the server.") ServiceResult=Bad_ServerNotConnected (0x800D0000) "The operation could not complete because the client is not connected to the server."
at com.prosysopc.ua.client.UaClient.call(Unknown Source)

ServerState changed from CommunicationFault to Running

Do you have any idea where the value "MaxByteStringLength 1048560" comes from?
It seems nonsensical to me, since I can use a larger buffer size (like 4MB) and the download will work most of the time.
So I got to the conclusion that there must be a problem with the encoding / decoding algorithm in the Stack.

Do you know about any similar problems? Do you have any insight what could cause the message encoding limit to become exceeded?
Can you tell if the limit is set by the server or the client?

Thanks for any help,
Dietrich

August 25, 2016
17:46, EEST
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

The Exception message about EncodingLimitsExceeded seems pretty straightforward: the server is configured with a MaxByteStringLength of 1048560. When the client requests a file with a buffer size of 1048576 (1024 * 1024), the server responds with an error. You can either use a smaller bufferSize in the client application or configure a larger MaxByteStringLength in the server application.

The client.getEndpointConfiguration().getMaxByteStringLength() returns the configuration parameter of the client application. According to my understanding there’s no negotiation between the applications about the MaxByteStringLength parameter during the connection establishment so the client and server applications can have completely different values in these parameters.

It’s hard to say anything about the problem of files sporadically being 0 bytes or incomplete. Keep us updated about the issue if you find some more information.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
16 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: 737

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6450

Newest Members:

fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley

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

Administrators: admin: 1