What the status and the result contain
The two outputs
- Result:
msg.payloadholdsactionandok: true.- For Connect, Disconnect and Reset:
endpoint,securityMode,securityPolicy,userIdentityType,userNameoruserCertificateThumbprint,sessionId,since,revision,warnings(when there are some) andnote(for example when Disconnect found the endpoint already disconnected). - For Get the settings, Check and Get the status: the fields below.
- The node removes
msg.configfrom the message.
- For Connect, Disconnect and Reset:
- Error:
msg.payloadholdsaction,ok: falseandfindings.findingsis the list of error messages:{ field, message }, one for each wrong field. The node also writes the error in the Node-RED log and in the debug sidebar. See Errors.
An error never stops the flow.
Connect
- The node checks the values first. If they are not valid, or if the server does not answer, the running session stays.
- The node asks the server for its endpoint list, as Check does. If the server accepts the TCP connection but does not answer this request, Connect continues. It warns (a warning of the node, and
warningsin the result). The opening of the session then decides. - The node closes the old session and opens the new one.
- If the new session does not open, the node uses the previous settings and the previous revision again. It reports the failure.
The switch has a time limit: it ends within 20 s, whatever the server does.
- A host that accepts the TCP connection and never answers cannot block the endpoint.
- A client node can wait for such a host. After 3 s, the endpoint stops this wait.
- When the time runs out, the node uses the previous settings again. It reports an error message on
connection: "the switch did not end within 20 s. The previous settings are in use again." - Reset has the same time limit. A message cannot change it.
- A client node can get one error from the abandoned attempt before it connects again.
Disconnect
Closes the session. Client nodes report an error until the next Connect or Reset. On an endpoint that is already disconnected, Disconnect succeeds, and the result holds a note that tells it. A msg.config that is not empty gets an error message.
Reset
Removes all the settings of the messages, a held password included. Then the node connects with the settings of the endpoint.
- It runs the same checks and the same restore of the previous settings as Connect.
- It takes no value from the message. A
msg.configthat is not empty, and amsg.mode, get an error message.msg.ifRevisionis used. - The values of the dialog do not apply to it. Allowed servers does not apply either: the server of the endpoint is always allowed.
Check (validate)
A test of Connect. The node makes the same checks and changes nothing. No session opens or closes.
- The node also asks the server for its endpoint list (GetEndpoints, 5 s limit). It checks that the server offers the security mode, the security policy and the login type. Connect runs the same checks before it switches.
- The result goes to output 1 with
valid(true or false) andfindings, the list of error messages, one for each wrong field. effectiveshows the settings that Connect would use, without secrets, in the shape ofmsg.config:userIdentityType,userName,maxRetry,initialDelay,maxDelay,namespaceAliases, andsubscriptionsas[ { id, parameters } ]. A dashboard can send it back asmsg.config. It holds no secret, so the login still needs the password.serverEndpointslists what the server offers.- A server that does not answer GetEndpoints gives an error message on
endpoint. - One Check runs at a time for each endpoint. While one runs, another gets an error message on
validateand starts no request to the server.
Get the settings (get)
Sends the settings that the endpoint uses. It changes nothing.
revision: the number of the settings. It changes with each switch.connection:link(active,switchingordisconnected) andsession(connected,reconnectingornot connected), withsessionIdwhen connected.settings:endpoint,securityMode,securityPolicyanduserIdentityType. Each has itsvalueand itsorigin:deployed, oroverlaywhen a message set it.identityInfo: the login in use, with itsorigin.- It holds
userIdentityType,userName,hasPassword,hasUserCertificate,hasPrivateKey, and the public facts of a user certificate (subject,thumbprint,validFrom,validTo). - It never holds a password, a passphrase or a key.
- After a restart,
hasPassword: falseorhasPrivateKey: falsetells the dashboard to ask for the secret again.
- It holds
settings.maxRetry,settings.initialDelayandsettings.maxDelay: each with itsvalue, itsorigin, itsminandmax, andapplied.deployed: the settings of the endpoint node, to compare:endpoint,securityMode,securityPolicy,userIdentityType,identityInfo,maxRetry,initialDelayandmaxDelay.subscriptions: each profile of the endpoint as it is now:id,nameand all theparameters.- It does not have the shape of
msg.config.validate.effective.subscriptionshas it. readOnlynames the fields that no message sets:requestedPublishingInterval,requestedMaxKeepAliveCountandrequestedLifetimeCount.settableholdsmaxNotificationsPerPublishandpriority(each withvalue,origin,minandmax), andpublishingEnabled(value,origin).
- It does not have the shape of
allowlist:{ active }, true when Allowed servers limits the servers. The rules are not shown.namespaceAliases: the table in use asentries(alias,namespaceUri), with itsorigin.deployed.namespaceAliasesis the table of the endpoint node.
Get the status (status)
Sends the facts of the live session. It changes nothing. Get the settings gives the settings. Get the status gives what the session uses now.
state:connected,reconnectingornot connected.link:active,switchingordisconnected.endpoint(without a user name and a password) andrevision.- With a session: the
securityModeand thesecurityPolicyin use,userIdentityType,userName(for a user name login) oruserCertificateThumbprint(for a certificate login),sessionId, andsince(when the session opened).
The values come from the open session, not from the settings that were asked for. The node never sends the authentication token of the session, a password or a key. The result of Connect and Reset holds the same facts.
The status of the node
The status under the node shows the state of the connection, as the status of the events node does:
connected · mode/policy · login type, for exampleconnected · SignAndEncrypt/Basic256Sha256 · UserNameconnecting(ordisconnecting)reconnecting · attempt 3, next in 4 sfaileddisconnected
When the licence refuses an action, the status names the licence.
Client nodes during a switch
- The node can close the old session, or use the previous settings again. While it does, each message to a Read, Write, Call or other client node gets a node error. The error says: "the connection is changing to new settings. Try again in a moment." The message is attached, for a Catch node. The node does not keep the message, and it does not answer later.
- While the new session opens, a client node waits for it and then uses it.
- After a Disconnect, the error says that an endpoint control node closed the connection. A Connect or Reset to that node opens it again.
Monitor and MonitorEvent nodes during a switch
They hold a subscription on the session, and they follow the switch with no action from you.
- While the session changes, they drop their subscription and show
switching, ordisconnectedafter a Disconnect. - When the new session is open, they subscribe again with the same settings as before. A MonitorEvent node uses the last settings of each node id. They find the node ids with the alias table that is now in use. No new message is necessary.
- If a Connect fails and the previous settings come back, they subscribe again on those.
- A Monitor that was stopped with
action: "stop"stays stopped.