cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

OPC UA client certificate issue

OPC UA client certificate issue

Axay
Established Member

I have created opcua certificate for my webclient to communicate to the opc ua server in the ctrlX CORE. i can establish the connection without any issue but sometime i am getting this kind of error msg :

client_secure_channel_layer   :236   requestData not found for requestId =  84 try with  85 
Error writing data: Invalid message header detected
Error writing data: Invalid message header detected

Writing data: ns=2;s=plc/app/Application/
Error writing data: Invalid Channel BadConnectionClosed
Error writing data: Invalid Channel BadConnectionClosed

 

and i think because of that write operation is not successful. 

do I have to create proper certificate for reliable communication? I need help in this regard.

I can not attach certificate here because of unsupported datatype.

Thank you!!

5 REPLIES 5

NoRisk4Project
Long-established Member

Hello,

the certificates are normally checked when the connection is initiated, not during the communication.  But you wrote, that you can establish the communication, so I guess the certificates are not the problem.

The error message indicates a write command to the PLC but "ns=2;s=plc/app/Application/" is not a valid PLC variable. The name of the global variable list and the variable name is missing, it should be something like "ns=2;s=plc/app/Application/sym/GVL/myInteger". Could it be that you use a wrong/invalid nodeID for this write command?

Where do you get the error message, from your client? Which client do you use and which version of our OPC UA server?

Can you create a Wireshark trace that covers the error? Please use a connection without encryption for the trace, otherwise we can't read it.

greetings Christian

Axay
Established Member

Good morning, 

Yes, correct node id contain in this message:

Writing data: ns=2;s=plc/app/Application/sym/mxA_04_Jog_Fast/A1_X_M true
07:20:37.732Z :client_secure_channel_layer   :236   requestData not found for requestId =  84 try with  85 
Error writing data: Invalid message header detected
Error writing data: Invalid message header detected
Writing data: ns=2;s=plc/app/Application/sym/mxA_04_Jog_Fast/A1_X_M false
Error writing data: Invalid Channel BadConnectionClosed
Error writing data: Invalid Channel BadConnectionClosed

I am getting this error message in my vscode console where we have webclient. this message is not too frequent but sometime. I am using OPC UA server (1.20.1)

 

NoRisk4Project
Long-established Member

Good morning,

Please create a Wireshark trace that covers the error, so we can take a look at it. Which OPC UA SDK is used for your OPC UA client?  

greetings Christian

Axay
Established Member

Hello, 

we are not using any SDK for opc ua client. client is created using javascript. this issue is not happening every time and sometime there is no any sessage in the console.

CodeShepherd
Community Moderator
Community Moderator

Is this still an issue or can this topic be closed?

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist