Client create subcription and create monitoredItem success, but not send publish request #1598
Replies: 5 comments
-
|
Debug/Trace level logs from Consider upgrading to 1.0.x because whether or not there is a bug here does not matter, there will not be any further 0.6.x releases. |
Beta Was this translation helpful? Give feedback.
-
Due to external limitations such as the internet,I can only describe wireshark log to you in words
Currently, we will upgrade to version 0.6.15, and in the future, we will consider upgrade to version 1.0.x I guess the problem lies in this piece of code,In class OpcUaSubscriptionManager method maybeSendPublishRequests, If pendingCount reach maxPendingPublishes, pendingCount will not decreate, will not call not call method sendPublishRequest anymore |
Beta Was this translation helpful? Give feedback.
-
I'm not seeing this.
Otherwise, it's decremented after a PublishResponse is received or sending the PublishRequest completes exceptionally for some reason. |
Beta Was this translation helpful? Give feedback.
-
for (long i = pendingCount.get(); i < maxPendingPublishes; i++) {
if (pendingCount.incrementAndGet() <= maxPendingPublishes) {
sendPublishRequest(session, pendingCount);
} else {
pendingCount.getAndUpdate(p -> (p > 0) ? p - 1 : 0);
}
}If client create subscription, pendingCount is great and equals maxPendingPublishes, it will not call method sendPublishRequest. by the way, in my project, client has create subscription many times, but do not send PublishRequest. |
Beta Was this translation helpful? Give feedback.
-
it shouldn't, because this means there are already the max number of pending PublishRequests already sent to the server, without having received a response yet. If you captured all traffic from the time your client first connected you would surely see some initial PublishRequests sent to the server before the maximum is reached. If you are not receiving PublishResponses from the server then perhaps that is the issue that needs to be investigated. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
My project use milo v0.6.13 as client, client create subscription and create monitoredItem succes, but not send publish request, the subscription is invalid, after create subscrpiton and exceeded watchdog interval time, i will receive watchdog notice the subscription is invaild. we try to use wireshark, not find PublishRquest after CreateSubscription.
Expected behavior
client create subscription and create monitoredItem succes, but not send publish request, the subscription is invalid.
Logs and Packet Captures
Wireshark query condition
opcua.servicenodeid.numeric == 826 || opcua.servicenodeid.numeric == 829 || opcua.servicenodeid.numeric == 787 || opcua.servicenodeid.numeric == 790 || opcua.servicenodeid.numeric == 751 || opcua.servicenodeid.numeric == 754
Wireshark log
4345 2025-09-15 14:59:08.790703 192.168.26.2 192.168.16.250 OpcUa 126 9978343 9978343 50111 UA Secure Conversation Message: CreateSubscriptionResponse
4346 2025-09-15 14:59:08.790850 192.168.16.250 192.168.26.2 OpcUa 931 9978344 9978344 50111 UA Secure Conversation Message: CreateMonitoredItemsRequest
4347 2025-09-15 14:59:08.791408 192.168.26.2 192.168.16.250 OpcUa 344 9978344 9978344 UA Secure Conversation Message: CreateMonitoredItemsResponse
4595 2025-09-15 14:59:10.686058 192.168.16.250 192.168.26.2 OpcUa 150 9978346 9978346 UA Secure Conversation Message: CreateSubscriptionRequest
4596 2025-09-15 14:59:10.686168 192.168.26.2 192.168.16.250 OpcUa 126 9978346 9978346 50112 UA Secure Conversation Message: CreateSubscriptionResponse
4597 2025-09-15 14:59:10.686337 192.168.16.250 192.168.26.2 OpcUa 796 9978347 9978347 50112 UA Secure Conversation Message: CreateMonitoredItemsRequest
4598 2025-09-15 14:59:10.686791 192.168.26.2 192.168.16.250 OpcUa 298 9978347 9978347 UA Secure Conversation Message: CreateMonitoredItemsResponse
4663 2025-09-15 14:59:11.085968 192.168.16.250 192.168.26.2 OpcUa 150 9978349 9978349 UA Secure Conversation Message: CreateSubscriptionRequest
4664 2025-09-15 14:59:11.086032 192.168.26.2 192.168.16.250 OpcUa 126 9978349 9978349 50113 UA Secure Conversation Message: CreateSubscriptionResponse
4665 2025-09-15 14:59:11.086185 192.168.16.250 192.168.26.2 OpcUa 1050 9978350 9978350 50113 UA Secure Conversation Message: CreateMonitoredItemsRequest
4667 2025-09-15 14:59:11.086658 192.168.26.2 192.168.16.250 OpcUa 367 9978350 9978350 UA Secure Conversation Message: CreateMonitoredItemsResponse
4671 2025-09-15 14:59:11.092244 192.168.16.250 192.168.26.2 OpcUa 150 9978352 9978352 UA Secure Conversation Message: CreateSubscriptionRequest
4672 2025-09-15 14:59:11.092303 192.168.26.2 192.168.16.250 OpcUa 126 9978352 9978352 50114 UA Secure Conversation Message: CreateSubscriptionResponse
4673 2025-09-15 14:59:11.092427 192.168.16.250 192.168.26.2 OpcUa 480 9978353 9978353 50114 UA Secure Conversation Message: CreateMonitoredItemsRequest
4674 2025-09-15 14:59:11.092547 192.168.26.2 192.168.16.250 OpcUa 206 9978353 9978353 UA Secure Conversation Message: CreateMonitoredItemsResponse
4875 2025-09-15 14:59:12.262328 192.168.16.250 192.168.26.2 OpcUa 150 9978355 9978355 UA Secure Conversation Message: CreateSubscriptionRequest
4876 2025-09-15 14:59:12.262516 192.168.26.2 192.168.16.250 OpcUa 126 9978355 9978355 50115 UA Secure Conversation Message: CreateSubscriptionResponse
4877 2025-09-15 14:59:12.262630 192.168.16.250 192.168.26.2 OpcUa 210 9978356 9978356 50115 UA Secure Conversation Message: CreateMonitoredItemsRequest
4878 2025-09-15 14:59:12.262860 192.168.26.2 192.168.16.250 OpcUa 137 9978356 9978356 UA Secure Conversation Message: CreateMonitoredItemsResponse
7109 2025-09-15 14:59:27.453793 192.168.16.250 192.168.26.2 OpcUa 150 9978361 9978361 UA Secure Conversation Message: CreateSubscriptionRequest
7110 2025-09-15 14:59:27.453864 192.168.26.2 192.168.16.250 OpcUa 126 9978361 9978361 50116 UA Secure Conversation Message: CreateSubscriptionResponse
7111 2025-09-15 14:59:27.454037 192.168.16.250 192.168.26.2 OpcUa 471 9978362 9978362 50116 UA Secure Conversation Message: CreateMonitoredItemsRequest
7112 2025-09-15 14:59:27.454247 192.168.26.2 192.168.16.250 OpcUa 206 9978362 9978362 UA Secure Conversation Message: CreateMonitoredItemsResponse
Additional context
In class OpcUaSubscriptionManager method maybeSendPublishRequests, If pendingCount reach maxPendingPublishes, pendingCount will not decreate, will not call not call method sendPublishRequest anymore
Beta Was this translation helpful? Give feedback.
All reactions