Subscription issues in python client

Hello all,

I’ve just run into a peculiar problem subscribing to nodes from an external python client :

PublishService	Returning ServiceFault for request: [PublishRequest requestHandle=9]. StatusCode=StatusCode[Severity=Bad, Subcode=Bad_InternalError]
java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1)
at java.util.ArrayList.subListRangeCheck(
at java.util.ArrayList.subList(
at com.inductiveautomation.xopc.server.subscriptions.NotificationMessageFactory.createMessageForItems(
at com.inductiveautomation.xopc.server.subscriptions.BaseSubscription.returnNotifications(
at com.inductiveautomation.xopc.server.subscriptions.BaseSubscription.requestReceivedNormal(
at com.inductiveautomation.xopc.server.subscriptions.BaseSubscription.consume(
at com.inductiveautomation.xopc.server.sessions.UaSession.publishRequestReceived(
at com.inductiveautomation.xopc.server.stack.AbstractUAServer$RequestServer.serveRequest(
at com.inductiveautomation.xopc.server.stack.AbstractUAServer$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

Has anyone ever run into this? I’ve tested the client with other OPC servers, with no problems.

Thanks for your help.

Do you know what MaxNotificationsPerPublish parameter your client is creating the subscription with?

The default MaxNotificationsPerPublish is 4294967295

Here are all the parameters:

RequestedPublishingInterval = period
RequestedLifetimeCount = 3000
RequestedMaxKeepAliveCount = 10000
MaxNotificationsPerPublish = 4294967295
PublishingEnabled = True
Priority = 0

Looks like a bug in the server dealing with a value over a certain size. As a workaround you could probably change that value to 0, which let’s the server choose, or use a value <= 2147483647.

Ok, I’ll give it a go.

Thanks for looking into this.

Brilliant, that did the trick.