Crosser Node 3.0.0

Crosser Node 3.0.0

Release Note

Release date: 2023-10-31

Changes

Python upgraded

The docker images for the Node come with Python pre-installed. The version has now been updated to 3.11.

For Nodes that run on Windows, Python has​ to be manually installed.

Removed Date/Time string conversions

Previously we had JSON converters that would convert strings into DateTime, DateOnly and TimeOnly.

No conversion will be attempted for these types and they will remain as strings in the FlowMessage.

JSON Serializer

The default JsonNamingPolicy has been changed to CamelCase. Previously there was no JsonNamingPolicy.

PropertyNamingPolicy = JsonNamingPolicy.CamelCase,

DictionaryKeyPolicy = JsonNamingPolicy.CamelCase,

Pings between status reports

The default setting for the number of pings between status reports was changed from 0 to 5.

You will not get the new default settings unless you delete the configuration files. The easiest way to get the default settings is to delete all *.json files in the data folder and restart the Node.

More information added to MQTT Notifications

All messages containing Flow information will now have these additional properties.

"flowDefinitionId": "62df9488-7ff3-403c-ac48-52c5eb61ae37",

"nodeId": "27929e60-a586-4f51-a512-0583391b0c86",

"nodeName": "Machine123",


Flow Status

Flow Status will contain the properties mentioned above, but will also have a list with reasons for the new status.

{

  "flowId": "2220e7a7-9e98-4af3-afd4-a1b309128540",

  "flowDefinitionId": "6faf4080-c7ce-e642-37a0-43e965904899",

  "flowName": "Example MQTT Notifications",

  "version": 9,

  "status": "Warning",

  "reason": "Flow status changed to Warning",

  "reasons": [

    {

      "moduleId": "9c3727c6-7d64-4cb3-95eb-a597596068b2",

      "moduleName": "OPC UA Reader",

      "moduleType": "Crosser.EdgeNode.Modules.OPC.UA.Reader",

      "version": "2.3.0",

      "status": "Warning",

      "reason": "Module OPC UA Reader, 2.3.0 changed to status Warning: This is a test",

      "timestamp": "2023-09-28T13:22:51.743+00:00"

    }

  ],

  "nodeId": "27929e60-a586-4f51-a512-0583391b0c86",

  "nodeName": "Machine123",

  "timestamp": "2023-09-28T13:22:51.743+00:00"

}


Module Messages

Module messages (status, message dropped and dead letter) will contain the properties mentioned above, but also have moduleType included.

{

  "moduleId": "9c3727c6-7d64-4cb3-95eb-a597596068b2",

  "moduleName": "OPC UA Reader",

  "moduleType": "Crosser.EdgeNode.Modules.OPC.UA.Reader",

  "version": "2.3.0",

  "status": "Warning",

  "flowId": "2220e7a7-9e98-4af3-afd4-a1b309128540",

  "flowDefinitionId": "6faf4080-c7ce-e642-37a0-43e965904899",

  "flowName": "Example MQTT Notifications",

  "reason": "Module OPC UA Reader, 2.3.0 changed to status Warning: This is a test",

  "queue": {

    "mode": "DropWrite",

    "size": 100,

    "retries": 3,

    "retryDelay": 500,

    "delay": 0,

    "persistence": true

  },

  "nodeId": "27929e60-a586-4f51-a512-0583391b0c86",

  "nodeName": "Machine123",

  "timestamp": "2023-09-28T13:22:51.690+00:00"

}


Increased logging of external connections to the Host

To make it easier to understand the lifetime of external connections to the host the logging was increased for HTTP and MQTT. Additional information was added about protocol and remote IP.

Examples for successful connections

HTTP

[HOST   ]: 2023-10-12 16:08:06.264 [Information] "HttpConnection" "127.0.0.1:49856", connection accepted: a44c1397-1255-4b51-bf11-75b668521706

[HOST   ]: 2023-10-12 16:08:06.268 [Information] "HttpConnection" "127.0.0.1:49856", connection closed: a44c1397-1255-4b51-bf11-75b668521706

MQTT

[HOST   ]: 2023-10-12 16:10:12.266 [Information] "MqttConnection" "127.0.0.1:55568", connection started: 584cdb0e-b00b-4893-bef2-b4fc25708c7d

[HOST   ]: 2023-10-12 16:10:12.290 [Information] "MqttConnection" "127.0.0.1:55568", connection accepted: 584cdb0e-b00b-4893-bef2-b4fc25708c7d

Examples with timeout errors

HTTP

[HOST   ]: 2023-10-12 16:09:17.730 [Error      ] "HttpConnection" "127.0.0.1:45838", connection error: 491ec7c8-6d72-4502-86a0-7d6e4f3d8236

System.OperationCanceledException: The operation was canceled.

   at System.Threading.CancellationToken.ThrowOperationCanceledException()

   at System.Threading.CancellationToken.ThrowIfCancellationRequested()

   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)

   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)

   at System.IO.BufferedStream.ReadFromUnderlyingStreamAsync(Memory`1 buffer, CancellationToken cancellationToken, Int32 bytesAlreadySatisfied, Task semaphoreLockTask)

   at Crosser.EdgeNode.Core.Net.Tcp.TcpConnection.ReadAsync(Memory`1 buff) in /home/crosser/repositories/crosser/EdgeNode/src/Core/Crosser.EdgeNode.Core/Net/Tcp/TcpConnection.cs:line 301

[HOST   ]: 2023-10-12 16:09:17.731 [Information] "HttpConnection" "127.0.0.1:45838", connection closed: 491ec7c8-6d72-4502-86a0-7d6e4f3d8236

MQTT

[HOST   ]: 2023-10-12 16:10:43.102 [Information] "MqttConnection" "127.0.0.1:35574", connection started: c98bf944-afbf-40fd-a3d9-d80b3d467885

[HOST   ]: 2023-10-12 16:10:53.147 [Error      ] "MqttConnection" "127.0.0.1:35574", connection error: c98bf944-afbf-40fd-a3d9-d80b3d467885

System.OperationCanceledException: The operation was canceled.

   at System.Threading.CancellationToken.ThrowOperationCanceledException()

   at System.Threading.CancellationToken.ThrowIfCancellationRequested()

   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)

   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)

   at System.IO.BufferedStream.ReadFromUnderlyingStreamAsync(Memory`1 buffer, CancellationToken cancellationToken, Int32 bytesAlreadySatisfied, Task semaphoreLockTask)

   at Crosser.EdgeNode.Core.Net.Mqtt.MqttConnection.ReadByteAsync() in /home/crosser/repositories/crosser/EdgeNode/src/Core/Crosser.EdgeNode.Core/Net/Mqtt/MqttConnection.cs:line 168

[HOST   ]: 2023-10-12 16:10:53.147 [Information] "MqttConnection" "127.0.0.1:35574", connection closed: c98bf944-afbf-40fd-a3d9-d80b3d467885

Bug Fixes

When retry runs out there is no warning

When having retries enabled without persistence enabled there was no warning triggered when the retry attempts ran out.

Disable module does not work unless having multiple connections

When having only one module connected to a disabled module the module would still send messages to the next module.

QueryString was not decoded when sending HTTP requests to flows over the Host

Since query-strings was not decoded values like test=hello%20world would become

{'test': 'hello%20world' }


The result will now be:

{ 'test': 'hello world' }

Modules stop processing data when filter properties are missing on the FlowMessage

This could happen when having persistence disabled and using filter properties that were not present on the incoming message.

Altering FlowMessages that already have a partial path would cause a null reference exception

If we have a FlowMessage {"id": 123} and then try to set id.test to foo we get a null reference exception.

The FlowMessage should respect the requested change and be altered to:

{'id': {'test': 'foo'}}


The Has method would only verify the type on the first level

If we have a FlowMessage that looks like { 'value': 123 } and use Has<bool>("value"), for example in the C# module or the SDK, the result will be false. However, if we have { 'sensor': { 'value': 123 } } and use Has<bool>("value") the result would be true since a bug caused the method to only check that a property exist on lower level, but not that the type of T is a match.

Endpoints could behave as unresponsive

If more than 10 connections were made to the local endpoints but no data was sent the queue would be full and no more connections could be opened.

This behavior has now been changed and new connections will not block the connections queue. A timeout has also been added for clients connecting so that we do not get idle connections using the resources.

Flow with multiple Universal Connectors cannot be deployed

These flows will work in remote sessions, but will fail when deployed due to a comparison on versions that will be different in remote session vs deployments.

This bug was introduced in 2.6.2 and was fixed in 3.0.0.



    • Related Articles

    • Crosser Security Overview

      Crosser Security Overview November 2023 About this document This document describes security aspects related to the Crosser Streaming Analytics solution. The Crosser Streaming Analytics solution The Crosser Streaming Analytics solution has two main ...
    • Crosser Node 2.5.3

      Crosser Node 2.5.3 May 2022 Bugfix - Prevent Crash When Getting ChannelClosedExceptions When running remote sessions with unstable network connections the node host process could crash due to not handling a ChannelClosed exception in a proper way.
    • Monitoring the Crosser Node

      Introduction Once you have your first flows deployed, you might think about how to integrate the Crosser Node and Flows into your existing monitoring solution. In this article we describe what options you have and how to utilize provided interfaces ...
    • Crosser Node 3.1.0

      Release Note Release date: 2023-12-20 Changes Sending metrics for Host and Runtimes Now that Crosser Control Center can handle metrics both for the Node and the deployed flows (runtimes), the Node will report metrics for the host as well as all ...
    • Crosser Node 2.5.4

      Crosser Node 2.5.4 Note: Version 2.5.4 of the node has been pulled back due to critical issues that were identified after the release. Please upgrade to a later version. September 2022 Bugfix - Prevent Invalid Http Requests To Cause 100% CPU This bug ...