Comments (9)
I should be able to investigate without .... stay tuned
from node-opcua.
Please forward this request to nodered-contrib-opcua forum, if you need a community answer.
Alternatively, we encourage you to use @opcua/for-node-red
, a industrial-grade OPC UA node for node-red developed and supported by the NodeOPCUA team at Sterfive.
from node-opcua.
Why you just rename my Issue like that?
I do not have anything to do with node-red!
I am using
const opcua = require("node-opcua");
And this seems to be a bug in your node-opcua lib. The servers maxMessageSize is 16384, which is negotiated with the client.
But the client still sends one Byte more =>16385
from node-opcua.
It was mentioned the issue was similar to #1263, which relates to node-red-contrib-opcua. Hence the confusion. Sorry for this.
Please adjust this initial issue description by filling carefully the Bug reporting template , providing clear step by step instructions to reproduce, version of node-opcua involved, describing the third party OPC Server you're trying to connect to: ( manufacturer, version) etc ....
from node-opcua.
-->
Current behavior
I have an OPC UA Client created with the node-opcua library. The connection to other OPC UA servers generally works.
But with a specific device (labeling system), this connection does not work. However,
there are other OPC UA clients that can connect to this labeling system, as I have tested myself.
The connection works with the OPC UA client "UaExpert" from Unified Automation, and you can browse through the OPC UA structure of the labeling system.
This is evidence that an OPC UA client-server connection with the labeling system generally works.
Describe the bug
First, I have enabled the following for an extended debug output.
process.env.NODEOPCUADEBUG = "TRANSPORT{HELACK-CHUNK}";
Then I used this connection routine.
this.client = opcua.OPCUAClient.create({
endpointMustExist: true, // also tried false and different transportSettings{...}
});
I received the following outputs.
´´´
10:17:38.521Z :client_tcp_transport :285 sending Hello
... protocolVersion = 0
... receiveBufferSize = 655360
... sendBufferSize = 655360
... maxMessageSize = 0
... maxChunkCount = 0
... endpointUrl = opc.tcp://172.18.4.25:48020
...
10:17:38.523Z :client_tcp_transport :263 receiving Ack
... protocolVersion = 0
... receiveBufferSize = 16384
... sendBufferSize = 16384
... maxMessageSize = 16384
... maxChunkCount = 1
...
10:17:38:524 MESSAGE BUILDER LIMITS maxMessageSize = 16384 maxChunkCount = 1 maxChunkSize = 16384 ( 16384 )
10:17:38.527Z :message_chunker :117 [NODE-OPCUA-E11] message size 16385 exceeds the negotiated message size 16384 nb chunks 1
´´´
Subsequently, no connection is established.
As I understand it, the client and server agree on the server's maxMessageSize of 16384 bytes. However, the client violates this agreement by sending a message with 16385 bytes (one byte more than agreed upon).
Step by step instruction to reproduce
Actually i followed the advice:
Steps to reproduce the behavior:
- Activate:
process.env.NODEOPCUADEBUG = "TRANSPORT{HELACK-CHUNK}";
- Try to connect:
this.client = opcua.OPCUAClient.create({
endpointMustExist: true, // also tried false and different transportSettings{...}
});
- Analyze Debug Output
Expected behavior
In the positive case, I would expect a successful connection setup from the client to the server.
Screenshots
Gist
process.env.NODEOPCUADEBUG = "TRANSPORT{HELACK-CHUNK}";
const { OPCUAClient } = require("node-opcua");
// replace this line with the targeted server endpoint URL:
const endpointUrl = "opc.tcp://...";
(async () => {
const client = OPCUAClient.create({});
await client.connect(endpointUrl);
await client.disconnect();
})();
Context
-
(x) my request is related to node-opcua acting as an OPCUA CLIENT
-
( ) my request is related to node-opcua acting as an OPCUA SERVER
-
( ) I have installed node-opcua from source ( using git clone)
-
(x) I have installed node-opcua as a package ( using npm install )
-
( ) I am using an application that uses node-opcua
- ( ) node-red
- ( ) other : please specify
-
Device: __
-
OS version: __
- (x) Windows : version : _Microsoft Windows 10 Pro: 10.0.19045 Build 19045_
- ( ) Linux : version : __
- ( ) MacOs : version : __
- ( ) Raspbian: version : __
- ( ) Other : specify : __
-
Description of the other OPCUA system I am trying to connect to:
- Name: __
- Version: __
- Manufacturer/Software vendor: __
- link to the manufacturer or product site: https://
-
node-opcua version: :
"version": "2.113.0",
-
Node:
node --version
= v20.5.1
from node-opcua.
can you provide
description of the other OPCUA system you are trying to connect to:
Name: __
Version: __
Manufacturer/Software vendor: __
link to the manufacturer or product site: https://
This is where it gets interesting to be able to reproduce.
- also, you mentionned that you've tried different "transportSettings{...}", what are they and what are corresponding the server negociated buffer size and message size .
Can you provide a full gist ?
from node-opcua.
The other OPCUA system I am trying to connect to:
Name: Alpha HSM (https://www.bluhmsysteme.com/etikettierung/etikettenspender/alpha-hsm.html)
Version: (have to look up later)
Manufacturer/Software vendor: https://s-q-f.com/
So you want to buy this system to reproduce the problem?
I think the Debug log of the connection process that i provided is the most important information.
from node-opcua.
fixed in [email protected]
from node-opcua.
Thanks a lot, i tested it and it works now!
from node-opcua.
Related Issues (20)
- Node-opcua does not seem to honor hostname parameter passed in when creating TCP server. HOT 2
- Webpack build fails after updating @types/node to 18.18.0
- Delay listening/wait for initialization
- Method with more than one custom variable types fails on UA Expert GUI HOT 4
- Question: Is it possible to connect to an opc.udp:// address? HOT 1
- Server and Client - Examples not connecting HOT 4
- How to acknowledge alarm using Cogent DataHub HOT 30
- When the OPC server loses power and is then powered on, the OPC client's reconnect feature is not activated. HOT 9
- node-opcua will not instantiate a child variable when it has the same name as its parent objectType HOT 2
- Node-OPCUA Issue: 'Acknowledge Method Not Found' Error with Alarm Acknowledgment Functions HOT 3
- MultiStateValueDiscrete_ValueAsText gives "Invalid" when Variable value is 0 HOT 2
- Node-opcua inherits variables from objectType with same name as variable browseName. HOT 4
- Unable to retrieve the description from KEPServerEX. HOT 1
- Delay after connection_reestablished before OPCUAClient.isReconnecting is back to false HOT 4
- Allow the nodeIdNameSeparator in the NamespaceOptions of the node-opcua-address-space to be configurable HOT 2
- Client is connected but no more changes are retrived from monitored items after some hours HOT 13
- Timestamps not updating in latest versions HOT 1
- Slow require time in jest HOT 3
- After updating node-opcua, an error during client.createSession process occurs. Old versions works fine. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-opcua.