Code Monkey home page Code Monkey logo

iot-edge-opc-plc's Introduction

page_type description languages products urlFragment
sample
Industrial IoT - Sample OPC UA server that generates random data and anomalies.
csharp
azure
azure-iot-hub
azure-iot-sample-opc-ua-server

OPC PLC server

Implements an OPC-UA server with different nodes generating random data, anomalies and configuration of user defined nodes.

Deploy to Azure

  • After deployment, the OPC PLC server will be available at opc.tcp://<NAME>.<REGION>.azurecontainer.io:50000
  • See region limits

Features

The following nodes are part of the PLC simulation:

  • Alternating boolean
  • Random signed 32-bit integer
  • Random unsigned 32-bit integer
  • Sine wave with a spike anomaly
  • Sine wave with a dip anomaly
  • Value showing a positive trend
  • Value showing a negative trend
  • Value having periodical good, bad and uncertain statuses (slow changing - 10 s by default)
  • Value having periodical good, bad and uncertain statuses (fast changing - 1 s by default)

By default everything is enabled, use command line options to disable certain anomaly or data generation features. Additionally to those nodes with simulated data, a JSON configuration file allows nodes to be created as specified. Finally, the simulation supports a number of nodes of specific types that can change at a configurable rate.

Getting Started

Prerequisites

The implementation is based on .NET Core so it is cross-platform. The recommended hosting environment is Docker.

Quickstart

A Docker container of the component is hosted in the Microsoft Container Registry (MCR) and can be pulled by:

docker pull mcr.microsoft.com/iotedge/opc-plc:<See version.json>

The tags of the container match the tags of this repository and the containers are available for Windows and Linux.

Sample start command for Docker:

docker run --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --autoaccept --sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --gn=5

Sample start command for Windows:

dotnet opcplc.dll --pn=50000 --at X509Store --autoaccept --sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --gn=5

Note: Make sure that your OPC UA client uses security policy Basic256Sha256 and message security mode Sign & Encrypt to connect.

User node configuration via JSON configuration file

If the module (application) is started with the argument --nodesfile then the specified JSON configuration file is loaded. Nodes defined in the JSON file will be published by the server. This enables another OPC-UA client application to set the state/value of the node. Please note that nodes specified in the JSON file are NOT part of the simulation. They remain visible in an unchanged state until an OPC UA client changes their status.

The following command shows how to use a configuration file on Windows:

dotnet opcplc.dll --at X509Store --nodesfile nodesfile.json

Here's a sample node configuration file:

{
  "Folder": "MyTelemetry",
  "FolderList": [
    {
      "Folder": "Directory",
      "NodeList": [
        {
          "NodeId": "ChildNode"
        },
      ]
    }
  ],
  "NodeList": [
    {
      "NodeId": 1023,
      "Name": "ActualSpeed",
      "Description": "Rotational speed"
    },
    {
      "NodeId": "aRMS"
    },
    {
      "NodeId": "1025",
      "Name": "DKW",
      "DataType": "Float",
      "ValueRank": -1,
      "AccessLevel": "CurrentReadOrWrite",
      "Description": "Diagnostic characteristic value"
    }
  ]
}
  • Folder: Defines the name of the folder under which the user specified nodes should be created. This folder is created below the root of the OPC UA server.
  • FolderList: Defines the list of child folders, which will be published by the emulated server. (Optional)
  • NodeList: Defines the list of nodes, which will be published by the emulated server. Nodes specified in the list can be browsed and changed by OPC UA applications. This enables developers to easily implement and test OPC UA client applications.
  • NodeId: Specifies the identifier of the node and is required. This value can be a decimal or string value. Every other JSON type is converted to a string identifier.
  • Name: The display name of the tag. If not set it will be set to the NodeId. (Optional)
  • DataType: The OPC UA valid type. It specifies one of types defined by BuiltInType. If an invalid type is specified or if it is omitted it defaults to 'Int32'. (Optional)
  • ValueRank: As defined by type ValueRanks. If omitted it will be set to the value '-1' (Scalar). (Optional)
  • AccessLevel: Specifies one of access levels defined by type AccessLevels. If an invalid access level is specified or if it is omitted it defaults to 'CurrentReadOrWrite'. (Optional)
  • Description: Description of the node. If not set it will be set to the NodeId. (Optional)

Slow and fast changing nodes

A number of changing nodes can be simulated with the following options. The nodes are categorized into slow and fast only for convenience.

  • sn: Number of slow nodes (default 1)
  • sr: Rate in seconds at which to change the slow nodes (uint, default every 10 s)
  • st: Data type for slow nodes (UInt|Double|Bool|UIntArray, case insensitive)
  • stl: lower bound of data type of slow nodes (UInt|Double types only, defaults to minimium value of the type in C# with exception of Double where it defaults to 0.0)
  • stu: upper bound of data type of slow nodes (UInt|Double types only, defaults to maximum value of the type in C#)
  • str: randomization of slow nodes value (UInt|Double types only, defaults to false)
  • sts: step or increment size of slow nodes value (UInt|Double types only, defaults to 1)
  • fn: Number of fast nodes (default 1)
  • fr: Rate in seconds at which to change the fast nodes (uint, default every 1 s)
  • vfr: Rate in milliseconds at which to change the fast nodes (uint, default every 1000 ms)
  • ft: Data type for fast nodes (UInt|Double|Bool|UIntArray, case insensitive)
  • ftl: lower bound of data type of fast nodes (UInt|Double types only, defaults to minimium value of the type in C# with exception of Double where it defaults to 0.0)
  • ftu: upper bound of data type of fast nodes (UInt|Double types only, defaults to maximum value of the type in C#)
  • ftr: randomization of fast nodes value (UInt|Double types only, defaults to false)
  • fts: step or increment size of fast nodes value (UInt|Double types only, defaults to 1)

Data types

  • UInt: Increases by 1
  • Double: Increases by 0.1
  • Bool: Alternates
  • UIntArray: 32 values that increase by 1

OPC Publisher file (pn.json)

The options --sph and --sp show and dump an OPC Publisher configuration file (default name: pn.json) that matches the configuration. In addition, a web server hosts the file on a configurable port (--wp, default 8080): e.g. http://localhost:8080/pn.json Additionally, you can set the configuration file name via the option --spf.

Complex type (Boiler #1)

Adds a simple boiler to the address space.

Features:

  • BoilerStatus is a complex type that shows: Temperature, Pressure and HeaterState
  • Method to turn heater on/off
  • When the heater is on, the bottom temperature increases by 1 degree/s, the top temperature is always 5 degrees less than the bottom one
  • Pressure is calculated as 100000 + bottom temperature

Boiler #2 derived from the Device Information (DI) companion spec

Adds a configurable boiler that exposes DI properties such as AssetId (ITagNameplate, IVendorNameplate) and DeviceHealth.

Features:

  • Configure and expose: BaseTemperature, TargetTemperature, TemperatureChangeSpeed, CurrentTemperature, HeaterState, Overheated, OverheatThresholdTemperature
  • Method to switch heater on/off
  • The MaintenanceInterval and OverheatInterval both emit events

Simulation details:

  • When the heater is off, the CurrentTemperature falls to the BaseTemperature and the heater is switched on
  • When the heater is on, the CurrentTemperature raises to the TargetTemperature and the heater is switched off
  • Emits a "MaintenanceRequiredAlarmType" event when DeviceHealth is MAINTENANCE_REQUIRED
  • The OverheatInterval increases the temperature to 10 degrees above the OverheatThresholdTemperature, the heater is switched off and:
    • Emits a "CheckFunctionAlarmType" event when DeviceHealth is CHECK_FUNCTION
    • Emits a "FailureAlarmType" event when DeviceHealth is FAILURE
    • Emits an "OffSpecAlarmType" event when DeviceHealth is OFF_SPEC

DeviceHealth (DeviceHealthEnumeration) details:

  • NORMAL: BaseTemperature <= CurrentTemperature <= TargetTemperature
  • CHECK_FUNCTION: TargetTemperature < CurrentTemperature < OverheatThresholdTemperature
  • FAILURE: Temperature >= OverheatThresholdTemperature
  • OFF_SPEC: CurrentTemperature < BaseTemperature or CurrentTemperature > OverheatThresholdTemperature + 5
  • MAINTENANCE_REQUIRED: Triggered by MaintenanceInterval
Temperature DeviceHealth
< BaseTemperature OFF_SPEC
>= BaseTemperature NORMAL
<= TargetTemperature NORMAL
> TargetTemperature CHECK_FUNCTION
>= OverheatThresholdTemperature FAILURE
> OverheatThresholdTemperature + 5 OFF_SPEC

Simple Events

The option --ses enables simple events from the quickstart sample from OPC Foundation.

Simple Events defines four new event types. SystemCycleStatusEventType is inherited from the SystemEventType and SystemCycleStartedEventType, SystemCycleAbortedEventType, SystemCycleFinishedEventType from SystemCycleStatusEventType.

Every 3000 ms a new SystemCycleStartedEventState is triggered. (The other event types are not used.) Two messages are generated with a counter "The system cycle '{counter}' has started." for each event, one has severity 1 and the other one severity 2.

A structure of type CycleStepDataType is added to SystemCycleStartedEventState event. The values in that structure is hard coded to Name: Step 1 and Duration: 1000.

Alarms and Condition

The option --alm enables Alarm and Condition quickstart sample from OPC Foundation.

It creates a hierarchical folder structure from Server, starting with Green and Yellow. The leaf nodes SouthMotor, WestTank, EastTank and NorthMotor are sources for the alarms.

The alarms are of different types:

All these alarms will update on a regular interval. It is also possible to Acknowledge, Confirm and add Comment to them.

This simulation also emits two types of system events: SystemEventType and AuditEventType, every 1000 ms.

Deterministic Alarms testing

The option --dalm=<file> enables deterministic testing of Alarms and Conditions.

More information about this feature can be found here.

Other features

  • Node with special characters in name and NodeId
  • Node with long ID (3950 bytes)
  • Nodes with large values (10/50 kB string, 100 kB StringArray, 200 kB ByteArray)
  • Nodes for testing all datatypes, arrays, methods, permissions, etc. The ReferenceNodeManager of the OPC UA .NET reference stack is used for this purpose.
  • Limit the number of updates of Slow and Fast nodes. Update the values of the SlowNumberOfUpdates and FastNumberOfUpdates configuration nodes in the OpcPlc/SimulatorConfiguration folder to:
    • < 0 (default): Slow and Fast nodes are updated indefinitely
    • 0: Slow and Fast nodes are not updated
    • > 0: Slow and Fast nodes are updated the given number of times, then they stop being updated (the value of the configuration node is decremented at every update).
  • Nodes with deterministic random GUIDs as node IDs: --gn=<number_of_nodes>
  • Node with opaque identifier (free-format byte string)
  • Nodes with 1 kB (ByteString) values: --vf1k. The first byte cycles from 0 to 255 in a configurable rate in ms: --vf1kr. The values are deterministic but scrambled to ensure that they are not efficiently compressed.
  • Load binary *.PredefinedNodes.uanodes file(s) compiled from an XML NodeSet: --unf=<PredefinedNodes_uanodes>
  • Load *.NodeSet2.xml file(s): --ns2=<NodeSet2_xml>

OPC UA Methods

Name Description Prerequisite
ResetTrend Reset the trend values to their baseline value Generate positive or negative trends activated
ResetStepUp Resets the StepUp counter to 0 Generate data activated
StopStepUp Stops the StepUp counter Generate data activated
StartStepUp Starts the StepUp counter Generate data activated
StopUpdateSlowNodes Stops the increase of value of slow nodes slow nodes activated
StopUpdateFastNodes Stops the increase of value of fast nodes fast nodes activated
StartUpdateSlowNodes Start the increase of value of slow nodes slow nodes activated
StartUpdateFastNodes Start the increase of value of fast nodes fast nodes activated

NuGet

  • The OPC PLC build generates a NuGet package that can be used to add the OPC PLC server to your own project, e.g. for unit tests
  • Sample base class for unit tests: ./samples/OpcPlcBase.cs
  • Sample unit test file that uses the base class: ./samples/OpcUaUnitTests.cs
  • Sample NuGet config to consume a local package (needs to be next to the solution file): ./samples/nuget.config
  • Sample project file that shows how to import the local OPC PLC nuget package: ./samples/OpcUaUnitTests.prj
  • Note: The NuGet package is not published to NuGet.org

Build

The build scripts are for Azure DevOps and the container build is done in ACR. To use your own ACR you need to:

  • Create a service connection called azureiiot to the subscription/resource group in which your ACR is located
  • Set a variable called BUILD_REGISTRY with the name of your Azure Container Registry

Using <reporoot>/tools/scripts/build.ps1 you can also build with Docker Desktop locally. The sample below builds a debug container and is started at the root of the repository:

.\tools\scripts\build.ps1 -Path . -Debug

If you want to build using Docker yourself, it is a bit more complicated, since the dockerfile is generated by the scripts. So first run the build.ps1 script as above, then locate the dockerfile for your configuration and target runtime under <reporoot>/src/bin/publish. Next, make your modifications and publish the opc-plc project in Visual Studio. Ensure that you have chosen "Self-Contained" as "Deployment Mode" and the correct "Target runtime" in the Visual Studio Publish configuration. Finally, run the docker build command in the folder you published to using the dockerfile of your configuration and target runtime.

Building with PowerShell is even simpler. Here's an example for a linux-x64 build:

.\tools\scripts\docker-source.ps1 .\src
docker build -f .\src\bin\publish\Release\linux-x64\Dockerfile.linux-amd64 -t iotedge/opc-plc .\src\bin\publish\Release\linux-x64

Notes

X.509 certificates:

  • Running on Windows natively, you cannot use an application certificate store of type Directory, since the access to the private key will fail. Use the option --at X509Store in this case.
  • Running as Linux Docker container, you can map the certificate stores to the host file system by using the Docker run option -v <hostpkidirectory>:/app/pki. This will make the certificate persistent over starts.
  • Running as Linux Docker container using an X509Store for the application certificate, you need to use the Docker run option -v x509certstores:/root/.dotnet/corefx/cryptography/x509stores and the application option --at X509Store
  • When running in kubernetes context, use option --at FlatDirectory. This enables the OPC UA server to consume both public key and private key certificates directly from the /app/pki/own/ path without expecting the certs and private subdirectories. Furthermore, certificates of type .crt and .key are accepted.

Resources

Command-line reference

Usage: dotnet opcplc.dll [<options>]

OPC UA PLC for different data simulation scenarios.
To exit the application, press CTRL-C while it's running.

Use the following format to specify a list of strings:
"<string 1>,<string 2>,...,<string n>"
or if one string contains commas:
""<string 1>","<string 2>",...,"<string n>""

Options:
      --lf, --logfile=VALUE  the filename of the logfile to use.
                               Default: './hostname-port-plc.log'
      --lt, --logflushtimespan=VALUE
                             the timespan in seconds when the logfile should be
                               flushed.
                               Default: 00:00:30 sec
      --ll, --loglevel=VALUE the loglevel to use (allowed: critical, error,
                               warn, info, debug, trace).
                               Default: info
      --sc, --simulationcyclecount=VALUE
                             count of cycles in one simulation phase.
                               Default: 50 cycles
      --ct, --cycletime=VALUE
                             length of one cycle time in milliseconds.
                               Default: 100 msec
      --ei, --eventinstances=VALUE
                             number of event instances.
                               Default: 0
      --er, --eventrate=VALUE
                             rate in milliseconds to send events.
                               Default: 1000
      --pn, --portnum=VALUE  the server port of the OPC server endpoint.
                               Default: 50000
      --op, --path=VALUE     the endpoint URL path part of the OPC server
                               endpoint.
                               Default: ''
      --ph, --plchostname=VALUE
                             the fully-qualified hostname of the PLC.
                               Default: hostname
      --ol, --opcmaxstringlen=VALUE
                             the max length of a string OPC can transmit/
                               receive.
                               Default: 4194304
      --otlpee, --otlpendpoint=VALUE
                             the endpoint URI to which the OTLP exporter is
                               going to send information.
                               Default: ''
      --otlpei, --otlpexportinterval=VALUE
                             the interval for exporting OTLP information in
                               seconds.
                               Default: 60
      --otlpep, --otlpexportprotocol=VALUE
                             the protocol for exporting OTLP information.
                               (allowed values: grpc, protobuf).
                               Default: grpc
      --lr, --ldsreginterval=VALUE
                             the LDS(-ME) registration interval in ms. If 0,
                               then the registration is disabled.
                               Default: 0
      --aa, --autoaccept     all certs are trusted when a connection is
                               established.
                               Default: False
      --drurs, --dontrejectunknownrevocationstatus
                             Don't reject chain validation with CA certs with
                               unknown revocation status, e.g. when the CRL is
                               not available or the OCSP provider is offline.
                               Default: False
      --ut, --unsecuretransport
                             enables the unsecured transport.
                               Default: False
      --to, --trustowncert   the own certificate is put into the trusted
                               certificate store automatically.
                               Default: False
      --msec, --maxsessioncount=VALUE
                             maximum number of parallel sessions.
                               Default: 100
      --msuc, --maxsubscriptioncount=VALUE
                             maximum number of subscriptions.
                               Default: 100
      --mqrc, --maxqueuedrequestcount=VALUE
                             maximum number of requests that will be queued
                               waiting for a thread.
                               Default: 2000
      --at, --appcertstoretype=VALUE
                             the own application cert store type.
                               (allowed values: Directory, X509Store,
                               FlatDirectory)
                               Default: 'Directory'
      --ap, --appcertstorepath=VALUE
                             the path where the own application cert should be
                               stored.
                               Default (depends on store type):
                               X509Store: 'CurrentUser\UA_MachineDefault'
                               Directory: 'pki\own'
                               FlatDirectory: 'pki\own'
      --tp, --trustedcertstorepath=VALUE
                             the path of the trusted cert store.
                               Default 'pki\trusted'
      --rp, --rejectedcertstorepath=VALUE
                             the path of the rejected cert store.
                               Default 'pki\rejected'
      --ip, --issuercertstorepath=VALUE
                             the path of the trusted issuer cert store.
                               Default 'pki\issuer'
      --csr                  show data to create a certificate signing request.
                               Default 'False'
      --ab, --applicationcertbase64=VALUE
                             update/set this application's certificate with the
                               certificate passed in as base64 string.
      --af, --applicationcertfile=VALUE
                             update/set this application's certificate with the
                               specified file.
      --pb, --privatekeybase64=VALUE
                             initial provisioning of the application
                               certificate (with a PEM or PFX format) requires
                               a private key passed in as base64 string.
      --pk, --privatekeyfile=VALUE
                             initial provisioning of the application
                               certificate (with a PEM or PFX format) requires
                               a private key passed in as file.
      --cp, --certpassword=VALUE
                             the optional password for the PEM or PFX or the
                               installed application certificate.
      --tb, --addtrustedcertbase64=VALUE
                             adds the certificate to the application's trusted
                               cert store passed in as base64 string (comma
                               separated values).
      --tf, --addtrustedcertfile=VALUE
                             adds the certificate file(s) to the application's
                               trusted cert store passed in as base64 string (
                               multiple comma separated filenames supported).
      --ib, --addissuercertbase64=VALUE
                             adds the specified issuer certificate to the
                               application's trusted issuer cert store passed
                               in as base64 string (comma separated values).
      --if, --addissuercertfile=VALUE
                             adds the specified issuer certificate file(s) to
                               the application's trusted issuer cert store (
                               multiple comma separated filenames supported).
      --rb, --updatecrlbase64=VALUE
                             update the CRL passed in as base64 string to the
                               corresponding cert store (trusted or trusted
                               issuer).
      --uc, --updatecrlfile=VALUE
                             update the CRL passed in as file to the
                               corresponding cert store (trusted or trusted
                               issuer).
      --rc, --removecert=VALUE
                             remove cert(s) with the given thumbprint(s) (comma
                               separated values).
      --daa, --disableanonymousauth
                             flag to disable anonymous authentication.
                               Default: False
      --dua, --disableusernamepasswordauth
                             flag to disable username/password authentication.
                               Default: False
      --dca, --disablecertauth
                             flag to disable certificate authentication.
                               Default: False
      --au, --adminuser=VALUE
                             the username of the admin user.
                               Default: sysadmin
      --ac, --adminpassword=VALUE
                             the password of the administrator.
                               Default: demo
      --du, --defaultuser=VALUE
                             the username of the default user.
                               Default: user1
      --dc, --defaultpassword=VALUE
                             the password of the default user.
                               Default: password
      --alm, --alarms        add alarm simulation to address space.
                               Default: False
      --ses, --simpleevents  add simple events simulation to address space.
                               Default: False
      --dalm, --deterministicalarms=VALUE
                             add deterministic alarm simulation to address
                               space.
                               Provide a script file for controlling
                               deterministic alarms.
      --sp, --showpnjson     show OPC Publisher configuration file using IP
                               address as EndpointUrl.
                               Default: False
      --sph, --showpnjsonph  show OPC Publisher configuration file using
                               plchostname as EndpointUrl.
                               Default: False
      --spf, --showpnfname=VALUE
                             filename of the OPC Publisher configuration file
                               to write when using options sp/sph.
                               Default: pn.json
      --wp, --webport=VALUE  web server port for hosting OPC Publisher
                               configuration file.
                               Default: 8080
      --cdn, --certdnsnames=VALUE
                             add additional DNS names or IP addresses to this
                               application's certificate (comma separated
                               values; no spaces allowed).
                               Default: DNS hostname
  -h, --help                 show this message and exit
      --b2ts, --boiler2tempspeed=VALUE
                             Boiler #2 temperature change speed in degrees per
                               second.
                               Default: 1
      --b2bt, --boiler2basetemp=VALUE
                             Boiler #2 base temperature to reach when not
                               heating.
                               Default: 10
      --b2tt, --boiler2targettemp=VALUE
                             Boiler #2 target temperature to reach when heating.

                               Default: 80
      --b2mi, --boiler2maintinterval=VALUE
                             Boiler #2 required maintenance interval in seconds.

                               Default: 300
      --b2oi, --boiler2overheatinterval=VALUE
                             Boiler #2 overheat interval in seconds.
                               Default: 120
      --nv, --nodatavalues   do not generate data values.
                               Default: False
      --gn, --guidnodes=VALUE
                             number of nodes with deterministic GUID IDs.
                               Default: 1
      --nd, --nodips         do not generate dip data.
                               Default: False
      --fn, --fastnodes=VALUE
                             number of fast nodes.
                               Default: 1
      --fr, --fastrate=VALUE rate in seconds to change fast nodes.
                               Default: 1
      --ft, --fasttype=VALUE data type of fast nodes (UInt|Double|Bool|
                               UIntArray).
                               Default: UInt
      --ftl, --fasttypelowerbound=VALUE
                             lower bound of data type of fast nodes (UInt|
                               Double|Bool|UIntArray).
                               Default: min value of node type.
      --ftu, --fasttypeupperbound=VALUE
                             upper bound of data type of fast nodes (UInt|
                               Double|Bool|UIntArray).
                               Default: max value of node type.
      --ftr, --fasttyperandomization=VALUE
                             randomization of fast nodes value (UInt|Double|
                               Bool|UIntArray).
                               Default: False
      --fts, --fasttypestepsize=VALUE
                             step or increment size of fast nodes value (UInt|
                               Double|Bool|UIntArray).
                               Default: 1
      --fsi, --fastnodesamplinginterval=VALUE
                             rate in milliseconds for pn.json client to sample
                               fast nodes.
                               Default: 0
      --vfr, --veryfastrate=VALUE
                             rate in milliseconds to change fast nodes.
                               Default: 1000
      --nn, --nonegtrend     do not generate negative trend data.
                               Default: False
      --ns2, --nodeset2file=VALUE
                             the *.NodeSet2.xml file that contains the nodes to
                               be created in the OPC UA address space (multiple
                               comma separated filenames supported).
      --np, --nopostrend     do not generate positive trend data.
                               Default: False
      --sn, --slownodes=VALUE
                             number of slow nodes.
                               Default: 1
      --sr, --slowrate=VALUE rate in seconds to change slow nodes.
                               Default: 10
      --st, --slowtype=VALUE data type of slow nodes (UInt|Double|Bool|
                               UIntArray).
                               Default: UInt
      --stl, --slowtypelowerbound=VALUE
                             lower bound of data type of slow nodes (UInt|
                               Double|Bool|UIntArray).
                               Default: min value of node type.
      --stu, --slowtypeupperbound=VALUE
                             upper bound of data type of slow nodes (UInt|
                               Double|Bool|UIntArray).
                               Default: max value of node type.
      --str, --slowtyperandomization=VALUE
                             randomization of slow nodes value (UInt|Double|
                               Bool|UIntArray).
                               Default: False
      --sts, --slowtypestepsize=VALUE
                             step or increment size of slow nodes value (UInt|
                               Double|Bool|UIntArray).
                               Default: 1
      --ssi, --slownodesamplinginterval=VALUE
                             rate in milliseconds for pn.json client to sample
                               slow nodes.
                               Default: 0
      --ns, --nospikes       do not generate spike data.
                               Default: False
      --unf, --uanodesfile=VALUE
                             the binary *.PredefinedNodes.uanodes file that
                               contains the nodes to be created in the OPC UA
                               address space (multiple comma separated
                               filenames supported), use ModelCompiler.cmd <
                               ModelDesign> to compile.
      --nf, --nodesfile=VALUE
                             the filename that contains the list of nodes to be
                               created in the OPC UA address space.
      --vf1k, --veryfast1knodes=VALUE
                             number of very fast 1 kB nodes.
                               Default: 1
      --vf1kr, --veryfast1krate=VALUE
                             rate in ms to change very fast 1 kB nodes.
                               Default: 1000

iot-edge-opc-plc's People

Contributors

algattik avatar bhnaphade avatar buzzfrog avatar cristipogacean avatar dacolgit avatar ddobric avatar dependabot[bot] avatar dominicbetts avatar florianbader avatar hansgschossmann avatar karok2m avatar kduenke avatar koepalex avatar laurent-martin avatar luiscantero avatar markusstuhler avatar microsoftopensource avatar mregen avatar msftgits avatar peterbryntesson avatar simonjaeger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iot-edge-opc-plc's Issues

Microsoft container entry are not the newest release

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [x] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

docker pull mcr.microsoft.com/iotedge/opc-plc

Any log messages given by the failure

OpcPlc V1.0.0+1 starting up...

Expected/desired behavior

OpcPlc V1.1.0 starting up...

OS and Version?

Linux 18.04 LTS

Mention any other details that might be useful

The image on mcr.microsoft.com/iotedge/opc-plc should be updated to the newest release


Thanks! We'll be in touch soon.

Alarm condition nodemanager uses invalid nodeId, exception thrown

Bug in Alarm nodemanager

This issue is for a: (mark with an x)

  • bug report -> please search issues before submitting
  • feature request
  • documentation issue or request
  • regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

<3>2024-05-07T04:20:26.062Z [opcua@311 ChannelId:"3"] - Error creating monitored items
System.ArgumentException: Invalid string NodeId without namespace index ('ns=').
   at Opc.Ua.NodeId.InternalParse(String text, Boolean namespaceSet)
   at Opc.Ua.NodeId.Parse(String text)
   at Opc.Ua.NodeId.op_Implicit(String text)
   at AlarmCondition.QuickstartNodeManager.AddNodeToComponentCache(ISystemContext context, NodeHandle handle, NodeState node) in D:\a\1\s\src\AlarmCondition\QuickstartNodeManager.cs:line 4007
   at AlarmCondition.QuickstartNodeManager.CreateMonitoredItem(ServerSystemContext context, NodeHandle handle, UInt32 subscriptionId, Double publishingInterval, DiagnosticsMasks diagnosticsMasks, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequest itemToCreate, Int64& globalIdCounter, MonitoringFilterResult& filterResult, IMonitoredItem& monitoredItem) in D:\a\1\s\src\AlarmCondition\QuickstartNodeManager.cs:line 3134
   at AlarmCondition.QuickstartNodeManager.CreateMonitoredItems(OperationContext context, UInt32 subscriptionId, Double publishingInterval, TimestampsToReturn timestampsToReturn, IList`1 itemsToCreate, IList`1 errors, IList`1 filterErrors, IList`1 monitoredItems, Int64& globalIdCounter) in D:\a\1\s\src\AlarmCondition\QuickstartNodeManager.cs:line 3062
   at Opc.Ua.Server.MasterNodeManager.CreateMonitoredItems(OperationContext context, UInt32 subscriptionId, Double publishingInterval, TimestampsToReturn timestampsToReturn, IList`1 itemsToCreate, IList`1 errors, IList`1 filterResults, IList`1 monitoredItems)
   at Opc.Ua.Server.Subscription.CreateMonitoredItems(OperationContext context, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequestCollection itemsToCreate, MonitoredItemCreateResultCollection& results, DiagnosticInfoCollection& diagnosticInfos)
   at Opc.Ua.Server.SubscriptionManager.CreateMonitoredItems(OperationContext context, UInt32 subscriptionId, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequestCollection itemsToCreate, MonitoredItemCreateResultCollection& results, DiagnosticInfoCollection& diagnosticInfos)
   at Opc.Ua.Server.StandardServer.CreateMonitoredItems(RequestHeader requestHeader, UInt32 subscriptionId, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequestCollection itemsToCreate, MonitoredItemCreateResultCollection& results, DiagnosticInfoCollection& diagnosticInfos)
   at OpcPlc.PlcServer.CreateMonitoredItems(RequestHeader requestHeader, UInt32 subscriptionId, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequestCollection itemsToCreate, MonitoredItemCreateResultCollection& results, DiagnosticInfoCollection& diagnosticInfos) in D:\a\1\s\src\PlcServer.cs:line 138
<3>2024-05-07T04:20:26.115Z [opcua@311 ChannelId:"3"] - SERVER - Unexpected Service Fault: Invalid string NodeId without namespace index ('ns=').
System.ArgumentException: Invalid string NodeId without namespace index ('ns=').
   at Opc.Ua.NodeId.InternalParse(String text, Boolean namespaceSet)

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Wrong architecture for image mcr.microsoft.com/iotedge/opc-plc:2.4.0-linux-arm64v8

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

A mac with Silicon processor (M1, M2)
docker run -it --rm mcr.microsoft.com/iotedge/opc-plc:2.4.0-linux-arm64v8
or docker run -it --rm mcr.microsoft.com/iotedge/opc-plc:2.4.0

Any log messages given by the failure

WARNING: The requested image's platform (linux/arm/v7) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec ./opcplc: no such file or directory

Expected/desired behavior

A working opc-plc container :-)

OS and Version?

macOS (Monterey) with M1 processor (arm64/v8 architecture)

Versions

opc-plc 2.4.0

Mention any other details that might be useful

if you perform a docker inspect on the image you will find that it has been built with the linux/arm/v7 (32 bits) architecture even the image pointed by the 2.4.0-linux-arm64v8 tag.
It seems it is an error in the deployment pipeline because I've managed to simply build the image myself from a Windows PC using the following command (from your documentation) and it works :

.\tools\scripts\docker-source.ps1 .\src
docker build -f .\src\bin\publish\Release\linux-arm64\Dockerfile.linux-arm64v8 -t iotedge/opc-plc .\src\bin\publish\Release\linux-x64

It would be amazing if you can fix it ! :-)


Thanks! We'll be in touch soon.

Add full parameter list to documentation

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Expected/desired behavior

Would be great to add the full set of parameters to the documentation. I was looking for a way to set a username&password to test that login method and had to run the docker container, exec into it and then run ./opcplc -h to find the parameter. Would've been very helpful if the output of ./opcplc -h would be somewhere in the README.

OS and Version?

Linux (Docker)

Versions

latest

Verbose logging is no longer working

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [x] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Set --loglevel=verbose
For example using docker run --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --autoaccept --sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --gn=5 --loglevel=verbose

Any log messages given by the failure

image
image

Expected/desired behavior

It should output verbose log.

OS and Version?

Tested on Docker (Windows Host) and Kubernetes (RHEL 9 host)

Versions

latest

Mention any other details that might be useful

It is working with v2.9.12.

During #314 verbose was renamed to trace, without documentation change. (Using --loglevel=trace works)

certdnsnames and plchostname not used in the certificate

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

docker run --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --autoaccept --sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --gn=5 --plchostname=localhost --showpnjsonph --certdnsnames=localhost

Any log messages given by the failure

2023-11-27_11h46_37

Expected/desired behavior

localhost should show up in the DNS names in the certificate

OS and Version?

Docker Desktop on Windows 11

Versions

docker latest

Mention any other details that might be useful

We are integrating the simulator as test simulator for the open-source project "benthos-umh" (https://github.com/united-manufacturing-hub/benthos-umh). We are troubleshooting why the server is closing the connection unexpectedly, and came up with this smaller problem. Maybe fixing this will solve the larger problem we are working on. If this does not fix our actual problem, we will probably create a separate issue for this.


Thanks! We'll be in touch soon.

Fast node with default configuration seem to be publishing data each 10 seconds instead of 1.

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X] bug report
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  • Deploy mcr.microsoft.com/iotedge/opc-plc:latest image (V2.1.0 version is deployed) with --aa -pn 51200 command. Here we are deploying it with Docker Compose:
version: '3'
services:
  opcserver0:
    image: mcr.microsoft.com/iotedge/opc-plc:latest
    restart: always
    command: --aa -pn 51200
    ports:
      - "51200:51200"
  • Enable publishing of http://microsoft.com/Opc/OpcPlc/#s=FastUInt1 node, in my case from Engineering Tool of Industrial-IoT platform. This creates a job for publishing of that node with 00:00:01 publishing and sampling intervals.

Any log messages given by the failure

I can see in Engineering Tool that data values are updated every 10 seconds.

I can also see this in the logs of OPC Publisher which is reporting 0.1/s data value changes, meaning once every 10 seconds.

[10:13:47 INF Microsoft.Azure.IIoT.Modules.OpcUa.Publisher.Controller.ConfigurationSettingsController] Agent configuration updated. 
[10:13:47 INF Microsoft.Azure.IIoT.Module.Framework.Hosting.ModuleHost] New settings processed. 
[10:14:31 INF Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] 
  DIAGNOSTICS INFORMATION for          : opc.tcp://03104504ec67:51201/
  # Ingestion duration                 :    00:00:35:00 (dd:hh:mm:ss)
  # Ingress DataChanges (from OPC)     :            211 (All time ~0.1/s; 06 in last 60s ~0.1/s)
  # Ingress ValueChanges (from OPC)    :            211 (All time ~0.1/s; 06 in last 60s ~0.1/s)
  # Ingress BatchBlock buffer size     :              0
  # Encoding Block input/output size   :              0 | 0
  # Encoder Notifications processed    :            211
  # Encoder Notifications dropped      :              0
  # Encoder IoT Messages processed     :            211
  # Encoder avg Notifications/Message  :              1
  # Encoder avg IoT Message body size  :            579 (0%)
  # Encoder avg IoT Chunk (4 KB) usage :            0.1
  # Estimated IoT Chunks (4 KB) per day:          8,681
  # Outgress Batch Block buffer size   :              0
  # Outgress input buffer count        :              0
  # Outgress input buffer dropped      :              0
  # Outgress IoT message count         :            211 (0.1/s)
  # Connection retries                 :              0
 
[10:14:48 INF Microsoft.Azure.IIoT.Modules.OpcUa.Publisher.Controller.ConfigurationSettingsController] Agent configuration updated. 
[10:14:48 INF Microsoft.Azure.IIoT.Module.Framework.Hosting.ModuleHost] New settings processed. 
[10:15:31 INF Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] 
  DIAGNOSTICS INFORMATION for          : opc.tcp://03104504ec67:51201/
  # Ingestion duration                 :    00:00:36:00 (dd:hh:mm:ss)
  # Ingress DataChanges (from OPC)     :            217 (All time ~0.1/s; 06 in last 60s ~0.1/s)
  # Ingress ValueChanges (from OPC)    :            217 (All time ~0.1/s; 06 in last 60s ~0.1/s)
  # Ingress BatchBlock buffer size     :              0
  # Encoding Block input/output size   :              0 | 0
  # Encoder Notifications processed    :            217
  # Encoder Notifications dropped      :              0
  # Encoder IoT Messages processed     :            217
  # Encoder avg Notifications/Message  :              1
  # Encoder avg IoT Message body size  :            579 (0%)
  # Encoder avg IoT Chunk (4 KB) usage :            0.1
  # Estimated IoT Chunks (4 KB) per day:          8,680
  # Outgress Batch Block buffer size   :              0
  # Outgress input buffer count        :              0
  # Outgress input buffer dropped      :              0
  # Outgress IoT message count         :            217 (0.1/s)
  # Connection retries                 :              0

Expected/desired behavior

I was expecting fast nodes to be publishing data each second and not each 10 seconds.

OS and Version?

I can see this on OPC PLC deployed on both Windows and Ubuntu hosts.

Versions

OPC PLC versoin: V2.1.0

Connecting with all Security None to opcplc 2.5.0 running in EFLOW VM form host system fails

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run OPpcPlc 2.5.0 in EFLOW with the following settings:

   "opcplc1": {
        "settings": {
            "image": "localhost:5500/opc-plc:2.5.0",
            "createOptions": {
                "Hostname": "opcplc1",
                "Cmd": [
                    "--sph",
                    "--aa",
                    "--unsecuretransport",
                    "--fr=1",
                    "--sr=2",
                    "--ph=opcplc1",
                    "--to"
                ],
                "ExposedPorts": {
                    "50000/tcp": {},
                    "8080/tcp": {}
                },
                "HostConfig": {
                    "Mounts": [
                        {
                            "Type": "volume",
                            "Target": "/appdata",
                            "Source": "opcplc1",
                            "Consistency": "consistent",
                            "RW": true
                        }
                    ],
                    "PortBindings": {
                        "50000/tcp": [
                            {
                                "HostPort": "50000"
                            }
                        ],
                        "8080/tcp": [
                            {
                                "HostPort": "8080"
                            }
                        ]
                    }
                }
            }
        },
        "env": {
            "BypassCertVerification": {
                "value": "true"
            },
            "AutoAcceptUntrustedCertificates": {
                "value": "true"
            }
        },
        "type": "docker",
        "version": "1.0",
        "status": "running",
        "restartPolicy": "always",
        "startupOrder": 2
    },

Get the EFLOW-VM IP-Address

Get-EflowVmAddr

 - Virtual machine IP : 172.27.71.63 retrieved directly from virtual machine

Use an OPC UA Client such as Softing dataFEED OPC UA Client:
Endpoint URL: opc.tcp://172.27.71.63:50000
Security Mode: None
Secuity Policy: None
Message Encoding: Binary

Try to connect from the client with the settings above fails with error:

Any log messages given by the failure

Error in Client:

2022-10-06 19:36:17.729 [17], TraceMask:Error, Message: BadCertificateHostNameInvalid ObjectId: SessionConnectViewModel BadCertificateHostNameInvalid 'BadCertificateHostNameInvalid'
2022-10-06 19:36:17.729 [17], TraceMask:Error, Message: ClientSession.InternalConnect - Session Connect error  BadCertificateHostNameInvalid 'BadCertificateHostNameInvalid'

docker logs opcplc1 in EFLOW VM:

[17:36:16 ERR] OPC: Certificate rejected. Reason=CN=OpcPlc. [CN=OpcPlc] [BB1A26C8C5CFC4A348A660D70478107CCE9ACE47]
[17:36:16 ERR] OPC: 10/06/2022 17:36:16.487 Certificate rejected. Reason=Opc.Ua.ServiceResultException: The domain '172.27.71.63' is not listed in the server certificate.. [CN=OpcPlc] [BB1A26C8C5CFC4A348A660D70478107CCE9ACE47]
[17:36:16 ERR] OPC: Server - SESSION CREATE failed. The domain '172.27.71.63' is not listed in the server certificate.
[17:36:16 ERR] OPC: 10/06/2022 17:36:16.488 Server - SESSION CREATE failed. The domain '172.27.71.63' is not listed in the server certificate.
[17:36:16 ERR] OPC: SERVER - Service Fault Occurred. Reason=BadCertificateHostNameInvalid
[17:36:16 ERR] OPC: 10/06/2022 17:36:16.488 SERVER - Service Fault Occurred. Reason=BadCertificateHostNameInvalid
[17:36:16 ERR] OPC: Certificate rejected. Reason=CN=OpcPlc. [CN=OpcPlc] [BB1A26C8C5CFC4A348A660D70478107CCE9ACE47]
[17:36:16 ERR] OPC: 10/06/2022 17:36:16.490 Certificate rejected. Reason=Opc.Ua.ServiceResultException: The domain '172.27.71.63' is not listed in the server certificate.. [CN=OpcPlc] [BB1A26C8C5CFC4A348A660D70478107CCE9ACE47]
[17:36:16 ERR] OPC: Server - SESSION CREATE failed. The domain '172.27.71.63' is not listed in the server certificate.
[17:36:16 ERR] OPC: 10/06/2022 17:36:16.493 Server - SESSION CREATE failed. The domain '172.27.71.63' is not listed in the server certificate.
[17:36:16 ERR] OPC: SERVER - Service Fault Occurred. Reason=BadCertificateHostNameInvalid
[17:36:16 ERR] OPC: 10/06/2022 17:36:16.494 SERVER - Service Fault Occurred. Reason=BadCertificateHostNameInvalid

Expected/desired behavior

With Opc-Plc 2.2.0 the and the exact same deployment template a connection with None/None form outside works.
Therefore I expect that it would work the same with version 2.5.0 as with 2.2.0.

OS and Version?

Windows 11 and EFLOW 1.3.0

Versions

iotedge version 1.3.0 or 1.4.0 tested
opcplc 2.5.0

Mention any other details that might be useful

  • Connection with none inside the VM works.
  • Connecting using SignAndEncrypt from Host to opcplc 2.5.0 in VM works as well.

Integration tests

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

This is to capture ideas and work to build an integration test framework for the solution.

An integration test framework that runs a version of the simulator, instrumented with a mocked Timer so we can advance time deterministically, verifies the behavior of the system. It can be used in CI and for TDD with new features.

Tests should cover:

  • Reading values for simulated nodes (trended data nodes, random, alternating, etc.) display the expected patterns (and frequency of changes)
  • Reading values for "Bad" simulated nodes have alternating status (Good, UncertainLastUsableValue, etc.)
  • Writing values for nodes and reading them again, demonstrates the writing functionality
  • Subscriptions receive the expected payloads, for:
    • monitored values
    • events (e.g. SystemCycleStartedEventType)
    • alarm (e.g. TripAlarmType)

Add writeable nodes for all Built-In data types

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Mention any other details that might be useful

We need nodes for all OPC UA basic datatypes which are read and writeable.

The data types are (more details can be found here: https://reference.opcfoundation.org/v104/Core/docs/Part3/#8.1):
8.8 Boolean
8.9 Byte
8.10 ByteString
8.11 DateTime
8.12 Double
8.13 Duration
8.14 Enumeration
8.15 Float
8.16 Guid
8.17 SByte
8.24 Integer
8.25 Int16
8.26 Int32
8.27 Int64
8.32 String
8.34 UInteger
8.35 UInt16
8.36 UInt32
8.37 UInt64
8.38 UtcTime

Feature request: Support incoming commands

[X] feature request

Hello,

we want to test how the OPC-Twin supports sending commands to OPC-UA servers.

Is it possible to add handling commands to the OPC-PLC? Is this possible due to the usage of the standard OPC-UA server from the UA-.NETStandard?
We are happy to help. Can you point us in the right direction on how to add this feature?

Edit: With the OPCTwin, we see already a few methods available. So the question more like a guidance for adding your own methods next to the existing once. With or without parameters.

Improvement: Add Arrays and Complex Types on Simulation

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

It would be nice if we have some Complex Types Generation on the Simulation. One that would create an array of Complex Types, another with a Single Instance just as a more "complex" kind of data that could be obtained from the OPC Server, something like:

  • ArrayOfStringData : A simple array with Random String values
  • ArrayOfFloatData : A simple array with Random Float values
  • ArrayOfComplexData : An array from a given Complex Type(A class with at least 2 Attributes...)
  • ComplexData : An instance of a Complex Type(A class with at least 2 Attributes...)

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Allow default values in nodesfile.json

This issue is for a:

- [ ] bug report -> please search issues before submitting
- [X] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Mention any other details that might be useful

It would be very useful if we could set the default value for nodes created via a custom nodesfile.json, allowing developers to create ready-to-use installations with correct values, without having to modify them manually everytime a new Docker container is created, for instance.

An example could be something like this:

{
    "Folder": "ExampleFolder",
    "NodeList": [
        {
            "NodeId": 1001,
            "Name": "ExampleNode",
            "DataType": "String",
            "Value": "TestString"
        }
    ]
}

Thanks! We'll be in touch soon.

Container fails to run on kubernetes (You must install .NET to run this application)

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Setup a RHEL 9 VM with kubernetes
  2. Install the pod
apiVersion: v1
kind: Pod
metadata:
  name: opc-plc-pod
  namespace: united-manufacturing-hub
  labels:
    app: opc-plc
spec:
  containers:
  - name: opc-plc
    image: mcr.microsoft.com/iotedge/opc-plc:latest
    args:
      - "--fn=10000"    #10k tags
      - "--fr=1"
      - "--ft=uint"
      - "--pn=50000"
      - "--autoaccept"
      - "--certdnsnames=united-manufacturing-hub-opc-plc-service,opc-plc-pod"
      - "--plchostname=united-manufacturing-hub-opc-plc-service"
      - "--showpnjsonph"
      - "--unsecuretransport"
      - "--maxsubscriptioncount=10000"
      - "--loglevel=verbose"
    ports:
    - containerPort: 50000

Any log messages given by the failure

image

Expected/desired behavior

It shall run (as the same version run on other host operating systems we tested)

OS and Version?

RHEL 9

Versions

mcr.microsoft.com/iotedge/opc-plc:latest (mcr.microsoft.com/iotedge/opc-plc@sha256:a4a32760b69c30e7ab9e30bf4ee3f13e81210ced87c5a5cc3ad8a83f78a7c771)

Mention any other details that might be useful

In our testing the same setup ran fine on our flatcar based machines.

Our RHEL machine run on an EC2 instance based on an AMD EPYC 7571, while our flatcar is a proxmox VM with a Ryzen 5 5600G

Cannot choose Slow or Fast nodes type of Bool or UIntArray

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

start the app with NodeType=Bool or UintArray: --st=bool OR --st=uintarray OR --ft=bool OR --ft=uintarray
docker run --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --autoaccept --sph --st=bool

Any log messages given by the failure

System.ArgumentNullException: Value cannot be null. (Parameter 'stepSize')
  at OpcPlc.BaseDataVariableStateExtended..ctor(NodeState nodeState, Boolean randomize, Object stepSize, Object minValue, Object maxValue) in D:\a\1\s\src\BaseDataVariableStateExtended.cs:line 21

Expected/desired behavior

The application runs normally with the new node type, as defined in the documentation

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Docker image latest

Versions

mcr.microsoft.com/iotedge/opc-plc:latest
OpcPlc v2.12.3 from 01/26/2024 10:11:26 starting up ...
OPC UA SDK 1.5.373.3 from 01/26/2024 06:22:14

Mention any other details that might be useful

Value is intentionally set to null. Is the feature still in progress?
src/PluginNodes/SlowFastCommon.cs#L98

src/PluginNodes/SlowFastCommon.cs#L108


Thanks! We'll be in touch soon.

Certificate Push Management Inquiry

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Calling the Push Management methods, "CreateSigningRequest" or "UpdateCertificate", the client recevies:

UaMethodException: status=Bad_InvalidArgument, message=One or more arguments are invalid.

However, going through the simulator logs I'm unable to find the exact argument that is invalid or any other information from the logs. Also, I'm not sure if the methods are implemented, could you tell me if the methods are implemented as well?

Any log messages given by the failure

N/A

Expected/desired behavior

Response or logs stating the error if any.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful

I'm using this https://reference.opcfoundation.org/GDS/v105/docs/7.10.7 to provide the arguments.


Thanks! We'll be in touch soon.

Unit Testing and Code Quality

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Current state of code does not allow unit testing.
Code quality is not optimal e.g. swallowing exceptions, highly coupled (NodeType in Program class?).
Readability issues ( a large section of commented code in PlcNodeManager.cs)

Any log messages given by the failure

Errors was swallowed at times and not thrown correctly.

Expected/desired behavior

Code is unit testable, consistent, decoupled and a bit more readable.

Mention any other details that might be useful

If we agree to do this, I can look into working on it in phases, gradually reaching the near optimal quality.

Add the same cli option RejectUnknownRevocationStatus to bypase the BadCertificateRevocationUnknown error

It would be nice to have the same Feature flag as in OPC Publisher, see the pull request: Azure/Industrial-IoT#1777

RejectUnknownRevocationStatus=VALUE
                                      OPC UA Client Security Config - reject chain validation 
                                      with CA certs with unknown revocation status, e.g. when the
                                      CRL is not available or the OCSP provider is offline.
                                      Alternative: N/A
                                      Mode: Standalone and Orchestrated
                                      Type: boolean
                                      Default: true

I have the same problem as descriped here: Azure/Industrial-IoT#1771

My actually solution is to add the line .SetRejectUnknownRevocationStatus(false); when i configure the Security in file OpcApplicationConfigurationSecurity.cs

Container is not published to MCR (was: Unable to generate Alarms)

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [X] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

sudo docker run --rm -it -p 60000:60000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=60000 --autoaccept --nospikes --nodips --nopostrend --nonegtrend --nodatavalues --sph --sn=25 --sr=5 --st=uint --fn=5 --fr=1 --ft=uint --ctb --alm

Any log messages given by the failure

[16:42:43 INF] Current directory is: /app
[16:42:43 INF] Log file is: /app/471b451f14a4-plc.log
[16:42:43 INF] Log level is: info
[16:42:43 ERR] Error in command line options
[16:42:43 ERR] Command line arguments: --pn=60000 --autoaccept --nospikes --nodips --nopostrend --nonegtrend --nodatavalues --sph --sn=25 --sr=5 --st=uint --fn=5 --fr=1 --ft=uint --ctb --alm
[16:42:43 INF]
[16:42:43 INF] OpcPlc V1.2.2.3
[16:42:43 INF] Informational version: V1.2.2+6f16489859
[16:42:43 INF]
[16:42:43 INF] Usage: opcplc.exe []
[16:42:43 INF]
[16:42:43 INF] OPC UA PLC for different data simulation scenarios
[16:42:43 INF] To exit the application, just press CTRL-C while it is running.
[16:42:43 INF]
[16:42:43 INF] To specify a list of strings, please use the following format:
[16:42:43 INF] "<string 1>,<string 2>,...,"
[16:42:43 INF] or if one string contains commas:
[16:42:43 INF] ""<string 1>","<string 2>",...,"""

Expected/desired behavior

Im trying to get boiler and alm. I'm unable to run it with --alm as it is not recognized and it throws the ERR in the stdout. Also with --ctb, i don't see any new nodes published. Might be i don;t understand --ctb. I expected it to publish nodes for the boiler.

specifying --ctb without --alm the PLC server runs but did not see any nodes for boiler.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Linux Ubuntu

Versions

Ubuntu 18.04

Mention any other details that might be useful


Thanks! We'll be in touch soon.

OPC BadConnectionClosed Errors

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Start the opcplc simulator:

docker run --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --autoaccept --sph --sn=5 --sr=10 --st=uint --fn=20 --fr=1 --ft=uint --ctb --scn --lid --lsn --ref --gn=5 --cdn 10.2.0.5

Connect via IoT Edge.

Copy the pn.json text from the opcplc startup:

[
  {
    "EndpointUrl": "opc.tcp://99405dd7830a:50000",
    "UseSecurity": false,
    "OpcNodes": [
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/Boiler;s=Boiler" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=StepUp" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=AlternatingBoolean" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=RandomSignedInt32" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=RandomUnsignedInt32" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=51b74e55-f2e3-4a4d-b79c-bf57c76ea67c" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=1313895e-c776-4201-b893-e514864c6692" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=84a537f5-3df8-4ab0-a33c-842bdeaf6cc9" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=c9f6d2b9-c681-4e31-9684-2014c4ec860c" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=20883862-eb87-4ef7-8f08-4892d74a121a" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=DipData" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt1" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt2" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt3" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt4" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt5" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt6" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt7" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt8" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt9" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt10" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt11" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt12" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt13" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt14" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt15" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt16" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt17" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt18" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt19" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=FastUInt20" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=BadFastUInt1" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=LongString10kB" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=LongString50kB" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=LongString100kB" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=LongString200kB" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=NegativeTrendData" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=PositiveTrendData" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=SlowUInt1", "OpcPublishingInterval": 10000 },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=SlowUInt2", "OpcPublishingInterval": 10000 },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=SlowUInt3", "OpcPublishingInterval": 10000 },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=SlowUInt4", "OpcPublishingInterval": 10000 },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=SlowUInt5", "OpcPublishingInterval": 10000 },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=BadSlowUInt1", "OpcPublishingInterval": 10000 },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=Special_\u0022!\u00A7$%\u0026/()=?\u0060\u00B4\\\u002B~*\u0027#_-:.;,\u003C\u003E|@^\u00B0\u20AC\u00B5{[]}" },
      { "Id": "nsu=http://microsoft.com/Opc/OpcPlc/;s=SpikeData" }
    ]
  }
]

Install IoT Edge and configure with the pn.json above.

CONTAINER ID   IMAGE                                            COMMAND                   CREATED        STATUS          PORTS
                                                                                                           NAMES
3c1046b8c323   mcr.microsoft.com/iotedge/opc-publisher:latest   "./Microsoft.Azure.Iโ€ฆ"    26 hours ago   Up 12 minutes   9702/tcp
                                                                                                           OPCPublisher
f0dbc3c2c235   mcr.microsoft.com/azureiotedge-hub:1.4           "/bin/sh -c 'echo \"$โ€ฆ"   41 hours ago   Up 12 minutes   0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:5671->5671/tcp, :::5671->5671/tcp, 0.0.0.0:8883->8883/tcp, :::8883->8883/tcp, 1883/tcp   edgeHub
ce681862f779   mcr.microsoft.com/azureiotedge-agent:1.4         "/bin/sh -c 'exec /aโ€ฆ"    41 hours ago   Up 13 minutes
                                                                                                           edgeAgent

No messages will show in the IoT Hub:

C:\Users\temandin>az iot hub monitor-events -n DataHubIoTHub
Starting event monitor, use ctrl-c to stop...

Any log messages given by the failure

Logs from OPC Publisher:

[2022-11-10 17:08:44.139 INF OpcUa] ChannelId 0: in Opening state.
[2022-11-10 17:08:44.140 INF OpcUa] ChannelId 0: Token #0 created. CreatedAt=17:08:44.140. Lifetime=3600000.
[2022-11-10 17:08:44.236 INF OpcUa] Security Policy: http://opcfoundation.org/UA/SecurityPolicy#None
[2022-11-10 17:08:44.236 INF OpcUa] Sender Certificate: (none)
[2022-11-10 17:08:44.250 INF OpcUa] ChannelId 1: Token #1 activated. CreatedAt=17:08:44.140. Lifetime=3600000.
[2022-11-10 17:08:44.250 INF OpcUa] ChannelId 1: in Open state.
[2022-11-10 17:08:44.250 INF OpcUa] ChannelId 1: Token Expiry 11/10/2022 18:08:44, renewal scheduled in 2699916 ms.
[2022-11-10 17:08:44.489 INF OpcUa] ChannelId 1: in Closing state.
[2022-11-10 17:08:44.502 WRN OpcUa] ChannelId 1: Force reconnect reason=BadConnectionClosed 'Remote side closed connection'
[2022-11-10 17:08:44.503 INF OpcUa] ChannelId 1: in Closed state.
[2022-11-10 17:08:44.503 INF OpcUa] ChannelId 1: CLIENTCHANNEL SOCKET CLOSED: 00606B2A
[2022-11-10 17:08:44.504 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.DefaultSessionManager] Creating session 'opc.tcp://10.2.0.5:50000_9D63A23F' for endpoint 'opc.tcp://10.2.0.5:50000'...
[2022-11-10 17:08:44.511 INF OpcUa] ChannelId 0: in Connecting state.
[2022-11-10 17:08:44.515 INF OpcUa] ChannelId 0: in Opening state.
[2022-11-10 17:08:44.516 INF OpcUa] ChannelId 0: Token #0 created. CreatedAt=17:08:44.516. Lifetime=3600000.
[2022-11-10 17:08:44.517 INF OpcUa] Security Policy: http://opcfoundation.org/UA/SecurityPolicy#None
[2022-11-10 17:08:44.517 INF OpcUa] Sender Certificate: (none)
[2022-11-10 17:08:44.518 INF OpcUa] ChannelId 2: Token #1 activated. CreatedAt=17:08:44.516. Lifetime=3600000.
[2022-11-10 17:08:44.518 INF OpcUa] ChannelId 2: in Open state.
[2022-11-10 17:08:44.518 INF OpcUa] ChannelId 2: Token Expiry 11/10/2022 18:08:44, renewal scheduled in 2699997 ms.
[2022-11-10 17:08:44.526 INF OpcUa] ChannelId 2: in Closing state.
[2022-11-10 17:08:44.527 WRN OpcUa] ChannelId 2: Force reconnect reason=BadConnectionClosed 'Remote side closed connection'
[2022-11-10 17:08:44.528 INF OpcUa] ChannelId 2: in Closed state.
[2022-11-10 17:08:44.528 INF OpcUa] ChannelId 2: CLIENTCHANNEL SOCKET CLOSED: 037129C8
[2022-11-10 17:08:44.724 WRN OpcUa] Certificate Validation failed. Reason=BadCertificateUntrusted. [CN=OpcPlc] [415BF90C0E10EEF82E41DA4A8A7BF0D65DAC301A]
[2022-11-10 17:08:44.726 WRN Microsoft.Azure.IIoT.OpcUa.Protocol.Services.DefaultSessionManager] Accepting untrusted peer certificate 415BF90C0E10EEF82E41DA4A8A7BF0D65DAC301A, 'CN=OpcPlc' due to AutoAccept(UntrustedCertificates) set!
[2022-11-10 17:08:44.727 WRN OpcUa] Validation errors suppressed:  [CN=OpcPlc] [415BF90C0E10EEF82E41DA4A8A7BF0D65DAC301A]
[2022-11-10 17:08:44.729 INF OpcUa] ChannelId 0: in Connecting state.
[2022-11-10 17:08:44.734 INF OpcUa] ChannelId 0: in Opening state.
[2022-11-10 17:08:44.734 INF OpcUa] ChannelId 0: Token #0 created. CreatedAt=17:08:44.734. Lifetime=3600000.
[2022-11-10 17:08:45.139 INF OpcUa] Security Policy: http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256
[2022-11-10 17:08:45.140 INF OpcUa] Sender Certificate: [CN=OpcPlc] [415BF90C0E10EEF82E41DA4A8A7BF0D65DAC301A]
[2022-11-10 17:08:45.145 INF OpcUa] ChannelId 3: Token #1 activated. CreatedAt=17:08:44.734. Lifetime=3600000.
[2022-11-10 17:08:45.145 INF OpcUa] ChannelId 3: in Open state.
[2022-11-10 17:08:45.145 INF OpcUa] ChannelId 3: Token Expiry 11/10/2022 18:08:44, renewal scheduled in 2699691 ms.
[2022-11-10 17:08:45.204 INF OpcUa] Revised session timeout value: 60000.
[2022-11-10 17:08:45.204 INF OpcUa] Max response message size value: 4194304. Max request message size: 4194304
[2022-11-10 17:08:45.228 INF OpcUa] Empty results were received for the ActivateSession call.
[2022-11-10 17:08:45.275 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.DefaultSessionManager] Session 'opc.tcp://10.2.0.5:50000_9D63A23F' created, loading complex type system ...
[2022-11-10 17:08:46.308 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.DefaultSessionManager] Session 'opc.tcp://10.2.0.5:50000_9D63A23F' complex type system loaded
[2022-11-10 17:08:46.309 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.DefaultSessionManager] Azure IIoT opc.tcp://10.2.0.5:50000_9D63A23F took 00:00:01.8034940.
[2022-11-10 17:08:46.309 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.DefaultSessionManager] Connected to 'opc.tcp://10.2.0.5:50000'
[2022-11-10 17:08:46.320 WRN OpcUa] A smaller lifeTime 10000ms than session timeout 60000ms configured for subscription 0.
[2022-11-10 17:08:46.344 INF OpcUa] For subscription 1, Lifetime count was revised from 10000 to 3600
[2022-11-10 17:08:46.355 INF OpcUa] Subscription CREATED, Id=1, LastNotificationTime=17:08:46, GoodPublishRequestCount=1, PublishingInterval=1000, KeepAliveCount=10, PublishingEnabled=False, MonitoredItemCount=0
[2022-11-10 17:08:46.391 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] Added 35 monitored items to subscription '1000'/'opc.tcp://10.2.0.5:50000_9D63A23F'
[2022-11-10 17:08:46.506 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] Now monitoring 35 nodes in subscription '1000'/'opc.tcp://10.2.0.5:50000_9D63A23F'
[2022-11-10 17:08:46.507 WRN OpcUa] A smaller lifeTime 10000ms than session timeout 60000ms configured for subscription 0.
[2022-11-10 17:08:46.509 INF OpcUa] For subscription 2, Lifetime count was revised from 10000 to 360
[2022-11-10 17:08:46.509 INF OpcUa] Subscription CREATED, Id=2, LastNotificationTime=17:08:46, GoodPublishRequestCount=2, PublishingInterval=10000, KeepAliveCount=10, PublishingEnabled=False, MonitoredItemCount=0
[2022-11-10 17:08:46.509 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] Added 6 monitored items to subscription '10000'/'opc.tcp://10.2.0.5:50000_9D63A23F'
[2022-11-10 17:08:46.557 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] Now monitoring 6 nodes in subscription '10000'/'opc.tcp://10.2.0.5:50000_9D63A23F'
[2022-11-10 17:08:46.568 INF OpcUa] Subscription PUBLISHING ENABLED, Id=1, LastNotificationTime=17:08:46, GoodPublishRequestCount=2, PublishingInterval=1000, KeepAliveCount=10, PublishingEnabled=True, MonitoredItemCount=35
[2022-11-10 17:08:46.568 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] Subscription '1000'/'opc.tcp://10.2.0.5:50000_9D63A23F' state actual(revised)/desired: PublishingEnabled True/True, PublishingInterval 1000/1000, KeepAliveCount 10/10, LifetimeCount 3600/10000
[2022-11-10 17:08:46.585 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] Set monitoring to Reporting for 35 items in subscription '1000'/'opc.tcp://10.2.0.5:50000_9D63A23F'.
[2022-11-10 17:08:46.663 INF OpcUa] Subscription PUBLISHING ENABLED, Id=2, LastNotificationTime=17:08:46, GoodPublishRequestCount=2, PublishingInterval=10000, KeepAliveCount=10, PublishingEnabled=True, MonitoredItemCount=6
[2022-11-10 17:08:46.663 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] Subscription '10000'/'opc.tcp://10.2.0.5:50000_9D63A23F' state actual(revised)/desired: PublishingEnabled True/True, PublishingInterval 10000/10000, KeepAliveCount 10/10, LifetimeCount 360/10000
[2022-11-10 17:08:46.664 INF Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] Set monitoring to Reporting for 6 items in subscription '10000'/'opc.tcp://10.2.0.5:50000_9D63A23F'.
[2022-11-10 17:09:47.441 INF Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine]
  DIAGNOSTICS INFORMATION for          : opc.tcp://10.2.0.5:50000_9D63A23F
  # Ingestion duration                 :    00:00:00:59 (dd:hh:mm:ss)
  # Ingress DataChanges (from OPC)     :             67 (All time ~1.12/s; 66 in last 60s ~1.1/s)
  # Ingress ValueChanges (from OPC)    :          1,982 (All time ~33.03/s; 1947 in last 60s ~32.45/s)
  # Ingress BatchBlock buffer size     :              0
  # Encoding Block input/output size   :              0 | 0
  # Encoder Notifications processed    :          1,887
  # Encoder Notifications dropped      :             57
  # Encoder IoT Messages processed     :             60
  # Encoder avg Notifications/Message  :             31
  # Encoder avg IoT Message body size  :        195,534 (75%)
  # Encoder avg IoT Chunk (4 KB) usage :           47.7
  # Estimated IoT Chunks (4 KB) per day:      4,147,230
  # Outgress Batch Block buffer size   :              0
  # Outgress input buffer count        :              0
  # Outgress input buffer dropped      :              0
  # Outgress IoT message count         :             60 (1/s)
  # Connection retries                 :             96
  # Opc endpoint connected?            :           True
  # Monitored Opc nodes succeeded count:             41
  # Monitored Opc nodes failed count   :              0

Errors will begin to show in the opcplc log:

17:08:40 INF] PLC simulation started, press Ctrl+C to exit ...
[17:08:45 ERR] OPC: Certificate Validation failed. Reason=BadCertificateUntrusted. [CN=Micorosft.Azure.IIoT, C=DE, S=Bav, O=Microsoft, DC=DataHubEdge] [B9D119501682AE069CBFDBD1D00BE4A57593CDD0]
[17:08:45 ERR] OPC: 11/10/2022 17:08:45.118 Certificate Validation failed. Reason=BadCertificateUntrusted. [CN=Micorosft.Azure.IIoT, C=DE, S=Bav, O=Microsoft, DC=DataHubEdge] [B9D119501682AE069CBFDBD1D00BE4A57593CDD0]
[17:08:45 INF] Certificate 'CN=Micorosft.Azure.IIoT, C=DE, S=Bav, O=Microsoft, DC=DataHubEdge' will be trusted, because of corresponding command line option.
[17:08:45 ERR] OPC: Validation errors suppressed:  [CN=Micorosft.Azure.IIoT, C=DE, S=Bav, O=Microsoft, DC=DataHubEdge] [B9D119501682AE069CBFDBD1D00BE4A57593CDD0]
[17:08:45 ERR] OPC: 11/10/2022 17:08:45.119 Validation errors suppressed:  [CN=Micorosft.Azure.IIoT, C=DE, S=Bav, O=Microsoft, DC=DataHubEdge] [B9D119501682AE069CBFDBD1D00BE4A57593CDD0]

Expected/desired behavior

Messages will show in the IoT Hub

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
From IoT Hub diagnostics:

.NET/1.36.6 (.NET 6.0.9; Linux 5.15.0-1022-azure #27~20.04.1-Ubuntu SMP Mon Oct 17 02:03:50 UTC 2022; X64) EdgeHub/1.4.2.61356014

Versions

see above

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Possibility to use all OPC UA available authentications

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Expected/desired behavior

At the moment there is not the possibility to authenticate using a basic authentication without encryption.

image

by default OPC UA supports more than None and Basic256Sha256 Sign & Encrypt.

image

Normally the most used is the one without encryption that it is not available.

OS and Version?

Docker container with Linux


Thanks! We'll be in touch soon.

Add support for defining namespace index in nodesfile

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

In some cases it would be very useful to be able to define the OPC UA namespace index to be able to simulate PLCs having the user defined tags in a different namespace index than the currently hardcoded ns=3 where all the tags defined in nodesfile are.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful

NodesFile (--nf) is not picked by latest docker image and errors out

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [x] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run the latest docker image with --nf or-nodesfile parameter and pass the sample (provided in this article). The nodes are not picked up and an error message is shown in the container logs. This was working fine with earlier docker images

docker run --rm -it --name opcplc -v /home/dev/samplenf.json:/app/data/opc-ua-node-files.json -p 50000:50000 -p 8080:8080 mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --autoaccept
--sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --ctb --scn --lid --lsn --ref --gn=5 --nf=/app/data/opc-ua-node-files.json

samplenf.json file content:

{
  "Folder": "MyTelemetry",
  "NodeList": [
    {
      "NodeId": 1023,
      "Name": "ActualSpeed",
      "Description": "Rotational speed"
    },
    {
      "NodeId": "aRMS"
    },
    {
      "NodeId": "1025",
      "Name": "DKW",
      "DataType": "Float",
      "ValueRank": -1,
      "AccessLevel": "CurrentReadOrWrite",
      "Description": "Diagnostic characteristic value"
    }
  ]
}

Any log messages given by the failure

[04:29:17 ERR] Error creating address space.
System.ArgumentException: Identifier type not supported. (Parameter 'value')
   at Opc.Ua.NodeId..ctor(Object value, UInt16 namespaceIndex)
   at CallSite.Target(Closure , CallSite , Type , Object , UInt16 )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at OpcPlc.PlcNodeManager.CreateBaseVariable(BaseDataVariableState baseDataVariableState, NodeState parent, Object path, String name, NodeId dataType, Int32 valueRank, Byte accessLevel, String description, NamespaceType namespaceType, Object defaultValue) in D:\a\1\s\src\PlcNodeManager.cs:line 190
   at CallSite.Target(Closure , CallSite , PlcNodeManager , BaseDataVariableState , NodeState , Object , String , NodeId , Int32 , Byte , String , NamespaceType , Object )
   at OpcPlc.PlcNodeManager.CreateBaseVariable(NodeState parent, Object path, String name, NodeId dataType, Int32 valueRank, Byte accessLevel, String description, NamespaceType namespaceType, Object defaultValue) in D:\a\1\s\src\PlcNodeManager.cs:line 145
   at CallSite.Target(Closure , CallSite , PlcNodeManager , NodeState , Object , String , NodeId , Int32 , Byte , String , NamespaceType , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid10[T0,T1,T2,T3,T4,T5,T6,T7,T8,T9](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9)
   at OpcPlc.PluginNodes.UserDefinedPluginNodes.CreateBaseVariable(NodeState parent, ConfigNode node) in D:\a\1\s\src\PluginNodes\UserDefinedPluginNodes.cs:line 131
   at OpcPlc.PluginNodes.UserDefinedPluginNodes.AddNodes(FolderState folder) in D:\a\1\s\src\PluginNodes\UserDefinedPluginNodes.cs:line 93
   at OpcPlc.PluginNodes.UserDefinedPluginNodes.AddToAddressSpace(FolderState telemetryFolder, FolderState methodsFolder, PlcNodeManager plcNodeManager) in D:\a\1\s\src\PluginNodes\UserDefinedPluginNodes.cs:line 35
   at OpcPlc.PlcNodeManager.CreateAddressSpace(IDictionary`2 externalReferences) in D:\a\1\s\src\PlcNodeManager.cs:line 68

Expected/desired behavior

The nodesfile should be picked up and new nodes added to the namespace

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Ubuntu 20.04
Ubuntu 22.04

Versions

Mention any other details that might be useful

This feature was working fine for a long time and need this :)


Thanks! We'll be in touch soon.

Regression in mcr.microsoft.com/iotedge/opc-plc:1.2.0

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ x] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

docker run -it --rm -p "50000:50000" mcr.microsoft.com/iotedge/opc-plc:1.2.0 --plchostname=opcplc --showpnjsonph --portnum=50000 --autoaccept --unsecuretransport

Any log messages given by the failure

Unable to find image 'mcr.microsoft.com/iotedge/opc-plc:1.2.0' locally
1.2.0: Pulling from iotedge/opc-plc
Digest: sha256:866d6e4b62ad24b4e84988a84d7c173cae24907074854942374f8b6b24173222
Status: Downloaded newer image for mcr.microsoft.com/iotedge/opc-plc:1.2.0
[14:27:40 INF] Current directory is: /app
[14:27:40 INF] Log file is: /app/dbf88900f3e5-plc.log
[14:27:40 INF] Log level is: info
[14:27:40 INF] OpcPlc V1.2.0 starting up...
info: Microsoft.Hosting.Lifetime[0]
      Now listening on: http://[::]:8080
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /app
[14:27:40 INF] Web server started on port 8080
[14:27:40 INF] opcstacktracemask set to: 0x0
[14:27:40 INF] OPC UA server base address: opc.tcp://opcplc:50000
[14:27:40 INF] Security policy http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256 with mode SignAndEncrypt added
[14:27:40 INF] Unsecure security policy http://opcfoundation.org/UA/SecurityPolicy#None with mode None added
[14:27:40 WRN] Note: This is a security risk and needs to be disabled for production use
[14:27:40 INF] Trusted Issuer store type is: Directory
[14:27:40 INF] Trusted Issuer Certificate store path is: pki/issuer
[14:27:40 INF] Trusted Peer Certificate store type is: Directory
[14:27:40 INF] Trusted Peer Certificate store path is: pki/trusted
[14:27:40 INF] Rejected certificate store type is: Directory
[14:27:40 INF] Rejected Certificate store path is: pki/rejected
[14:27:40 INF] Rejection of SHA1 signed certificates is disabled
[14:27:40 INF] Minimum certificate key size set to 1024
[14:27:40 INF] Application Certificate store type is: Directory
[14:27:40 INF] Application Certificate store path is: pki/own
[14:27:40 INF] Application Certificate subject name is: OpcPlc
[14:27:40 WRN] WARNING: Automatically accepting certificates. This is a security risk.
[14:27:40 INF] No existing Application certificate found. Create a self-signed Application certificate valid from yesterday for 12 months,
[14:27:40 INF] with a 2048 bit key and 256 bit hash.
[14:27:41 INF] Application certificate with thumbprint '9A9799313BD331342916BF04EC3196111A564A43' created.
[14:27:41 INF] Application certificate is for ApplicationUri 'urn:OpcPlc:opcplc', ApplicationName 'OpcPlc' and Subject is 'OpcPlc'
[14:27:41 INF] LDS(-ME) registration interval set to 0 ms (0 means no registration)
[14:27:41 INF] Trusted issuer store contains 0 certs
[14:27:41 INF] Trusted issuer store has 0 CRLs.
[14:27:41 INF] Trusted peer store contains 0 certs
[14:27:41 INF] Trusted peer store has 0 CRLs.
[14:27:41 INF] Rejected certificate store contains 0 certs
[14:27:41 INF] Starting server on endpoint opc.tcp://opcplc:50000 ...
[14:27:41 INF] Simulation settings are:
[14:27:41 INF] One simulation phase consists of 50 cycles
[14:27:41 INF] One cycle takes 100 milliseconds
[14:27:41 INF] Spike generation is enabled
[14:27:41 INF] Data generation is enabled
[14:27:41 INF] Anonymous authentication: enabled
[14:27:41 INF] Username/Password authentication: enabled
[14:27:41 INF] Certificate authentication: enabled
[14:27:41 INF] OPC UA Server started.
Unhandled exception.Unhandled exception.Unhandled exception.  Unhandled exception.  Unhandled exception. Unhandled exception. [14:27:41 INF] OPC Publisher configuration file: pn.json
[
  {
    "EndpointUrl": "opc.tcp://opcplc:50000",
    "UseSecurity": false,
    "OpcNodes": [
      { "Id": "ns=2;s=AlternatingBoolean" },
      { "Id": "ns=2;s=DipData" },
      { "Id": "ns=2;s=NegativeTrendData" },
      { "Id": "ns=2;s=PositiveTrendData" },
      { "Id": "ns=2;s=RandomSignedInt32" },
      { "Id": "ns=2;s=RandomUnsignedInt32" },
      { "Id": "ns=2;s=SpikeData" },
      { "Id": "ns=2;s=StepUp" }
    ]
  }
]

System.NullReferenceException: Object reference not set to an instance of an object.
   at OpcPlc.PlcNodeManager.SetValue[T](BaseDataVariableState variable, T value) in D:\a\1\s\src\PlcNodeManager.cs:line 777
   at OpcPlc.PlcNodeManager.set_DipData(Double value) in D:\a\1\s\src\PlcNodeManager.cs:line 36
   at OpcPlc.PlcSimulation.DipGenerator(Object state) in D:\a\1\s\src\PlcSimulation.cs:line 144
   at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.System.Threading.IThreadPoolWorkItem.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()System.NullReferenceException: Object reference not set to an instance of an object.
   at OpcPlc.PlcNodeManager.SetValue[T](BaseDataVariableState variable, T value) in D:\a\1\s\src\PlcNodeManager.cs:line 777
   at OpcPlc.PlcNodeManager.set_AlternatingBoolean(Boolean value) in D:\a\1\s\src\PlcNodeManager.cs:line 54
   at OpcPlc.PlcSimulation.ValueGenerator(Object state) in D:\a\1\s\src\PlcSimulation.cs:line 216
   at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.System.Threading.IThreadPoolWorkItem.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()System.NullReferenceException: Object reference not set to an instance of an object.
   at OpcPlc.PlcNodeManager.SetValue[T](BaseDataVariableState variable, T value) in D:\a\1\s\src\PlcNodeManager.cs:line 777
   at OpcPlc.PlcNodeManager.set_PosTrendData(Double value) in D:\a\1\s\src\PlcNodeManager.cs:line 42
   at OpcPlc.PlcSimulation.PosTrendGenerator(Object state) in D:\a\1\s\src\PlcSimulation.cs:line 168
   at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.System.Threading.IThreadPoolWorkItem.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

System.NullReferenceException: Object reference not set to an instance of an object.
   at OpcPlc.PlcNodeManager.SetValue[T](BaseDataVariableState variable, T value) in D:\a\1\s\src\PlcNodeManager.cs:line 777
   at OpcPlc.PlcNodeManager.set_NegTrendData(Double value) in D:\a\1\s\src\PlcNodeManager.cs:line 48
   at OpcPlc.PlcSimulation.NegTrendGenerator(Object state) in D:\a\1\s\src\PlcSimulation.cs:line 192
   at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.System.Threading.IThreadPoolWorkItem.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
System.NullReferenceException: Object reference not set to an instance of an object.
   at OpcPlc.PlcNodeManager.IncreaseNodes(BaseDataVariableState[] nodes, NodeType type) in D:\a\1\s\src\PlcNodeManager.cs:line 271
   at OpcPlc.PlcNodeManager.IncreaseSlowNodes(Object state) in D:\a\1\s\src\PlcNodeManager.cs:line 80
   at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.System.Threading.IThreadPoolWorkItem.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
System.NullReferenceException: Object reference not set to an instance of an object.
   at OpcPlc.PlcNodeManager.IncreaseNodes(BaseDataVariableState[] nodes, NodeType type) in D:\a\1\s\src\PlcNodeManager.cs:line 271
   at OpcPlc.PlcNodeManager.IncreaseFastNodes(Object state) in D:\a\1\s\src\PlcNodeManager.cs:line 87
   at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
   at System.Threading.TimerQueue.FireNextTimers()
   at System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)

Expected/desired behavior

The previous version worked:

docker run -it --rm -p "50000:50000" mcr.microsoft.com/iotedge/opc-plc:1.1.6 --plchostname=opcplc --showpnjsonph --portnum=50000 --autoaccept --unsecuretransport

OS and Version?

  • macOS Catalina Version 10.15.7
  • docker desktop community Version 2.5.0.1 (49550)

Versions

mcr.microsoft.com/iotedge/opc-plc:1.2.0

Mention any other details that might be useful

How to configure the server to work completely without certificates?

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Set EnableUnsecureTransport to true and remove the block defining the secure ServerSecurityPolicy

Any log messages given by the failure

Any client e(.g. UAExpert) will notify the user about the use of an untrusted certificate. The user will have to manually "trust this certificate" to establish a connection.

Expected/desired behavior

No certificate should be used if "EnableUnsecureTransport" is used.
Of course this will also mean, that TLS won't be working but this is ok, since the flag already points out, that it is an "unsecure transport".
This is also fine from a security perspective, if the setup is running in a private network whose perimeters have been secured.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Windows 10 using UAExpert 1.5.1

Versions

1809

Mention any other details that might be useful

The documentation does not provide information what I have to do to completely disable any certificate / to disable TLS.

This is the log when starting up - as you can see, there is only a "None" Security policy runing, but still a self-signed-certifiacte is created, though I don't want that here ;)

15:09:16 INF] Web server started on port 8080
[15:09:16 INF] opcstacktracemask set to: 0x0
[15:09:16 INF] OPC UA server base address: opc.tcp://287ed39ad887:50000
[15:09:16 INF] Unsecure security policy http://opcfoundation.org/UA/SecurityPolicy#None with mode None added
[15:09:16 WRN] Note: This is a security risk and needs to be disabled for production use
[15:09:16 INF] Trusted Issuer store type is: Directory
[15:09:16 INF] Trusted Issuer Certificate store path is: pki/issuer
[15:09:16 INF] Trusted Peer Certificate store type is: Directory
[15:09:16 INF] Trusted Peer Certificate store path is: pki/trusted
[15:09:16 INF] Rejected certificate store type is: Directory
[15:09:16 INF] Rejected Certificate store path is: pki/rejected
[15:09:16 INF] Rejection of SHA1 signed certificates is disabled
[15:09:16 INF] Minimum certificate key size set to 1024
[15:09:16 INF] Application Certificate store type is: Directory
[15:09:16 INF] Application Certificate store path is: pki/own
[15:09:16 INF] Application Certificate subject name is: OpcPlc
[15:09:16 WRN] WARNING: Automatically accepting certificates. This is a security risk.
[15:09:16 INF] No existing Application certificate found. Create a self-signed Application certificate valid from yesterday for 12 months,
[15:09:16 INF] with a 2048 bit key and 256 bit hash.
[15:09:17 INF] Application certificate with thumbprint 'AEB28F47284A635E2E1BA044243A49B21AD3DC6D' created.
[15:09:17 INF] Application certificate is for ApplicationUri 'urn:OpcPlc:287ed39ad887', ApplicationName 'OpcPlc' and Subject is 'OpcPlc'
[15:09:17 INF] LDS(-ME) registration interval set to 0 ms (0 means no registration)
[15:09:17 INF] Trusted issuer store contains 0 certs
[15:09:17 INF] Trusted issuer store has 0 CRLs.
[15:09:17 INF] Trusted peer store contains 0 certs
[15:09:17 INF] Trusted peer store has 0 CRLs.
[15:09:17 INF] Rejected certificate store contains 0 certs
[15:09:17 INF] Starting server on endpoint opc.tcp://287ed39ad887:50000 ...
[15:09:17 INF] Simulation settings are:
[15:09:17 INF] One simulation phase consists of 50 cycles
[15:09:17 INF] One cycle takes 100 milliseconds
[15:09:17 INF] Spike generation is disabled
[15:09:17 INF] Data generation is disabled
[15:09:17 INF] Anonymous authentication: enabled
[15:09:17 INF] Username/Password authentication: enabled
[15:09:17 INF] Certificate authentication: disabled
[15:09:18 INF] Creating 25 Slow nodes of type: UInt
[15:09:18 INF] Node values will change each 10 sec
[15:09:18 INF] Node values sampling rate is 0 msec
[15:09:18 INF] Creating 5 Fast nodes of type: UInt
[15:09:18 INF] Node values will change each 1 sec
[15:09:18 INF] Node values sampling rate is 0 msec
[15:09:18 INF] OPC UA Server started.
[15:09:18 INF] OPC Publisher configuration file: pn.json
[
{
"EndpointUrl": "opc.tcp://287ed39ad887:50000",
"UseSecurity": false,
"OpcNodes": [
{ "Id": "ns=2;s=SlowUInt1", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt2", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt3", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt4", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt5", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt6", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt7", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt8", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt9", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt10", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt11", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt12", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt13", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt14", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt15", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt16", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt17", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt18", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt19", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt20", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt21", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt22", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt23", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt24", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=SlowUInt25", "OpcPublishingInterval": 10000 },
{ "Id": "ns=2;s=FastUInt1" },
{ "Id": "ns=2;s=FastUInt2" },
{ "Id": "ns=2;s=FastUInt3" },
{ "Id": "ns=2;s=FastUInt4" },
{ "Id": "ns=2;s=FastUInt5" }
]
}
]


Thanks! We'll be in touch soon.

Mechanism to control the number of generated data-changes

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Mention any other details that might be useful

For E2E tests, would be good to have a mechanism to control the number of data-changes generated for some variables.

  1. define a new subset of variables having integer datatype.
  2. define a simple simulation control mechanism having a couple of writeable properties:
    • start/stop simulation
    • the number of desired changes
      (or a method having 2 similar parameters)
  3. on server start-up the value of the variables is initialized, but kept constant
  4. when control mechanism is triggered - simulation starts and generates values up to the number of desired changes
  5. simulation stops
  6. back to 4) on demand

Please help me connect opc UA client with prosys opc UA simulation server step by step: Please help

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ x ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Linux (Ubuntu 20.04)

Versions

Mention any other details that might be useful

Opc.Ua.ServiceResultException: Error establishing a connection: BadNotConnected
at Opc.Ua.Bindings.ChannelAsyncOperation`1.End(Int32 timeout, Boolean throwOnError)
at Opc.Ua.Bindings.UaSCUaBinaryClientChannel.EndSendRequest(IAsyncResult result)
at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.EndSendRequest(IAsyncResult result)
at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.SendRequest(IServiceRequest request)
at Opc.Ua.DiscoveryClient.GetEndpoints(RequestHeader requestHeader, String endpointUrl, StringCollection localeIds, StringCollection profileUris, EndpointDescriptionCollection& endpoints)
at Opc.Ua.DiscoveryClient.GetEndpoints(StringCollection profileUris)
at Opc.Ua.Client.CoreClientUtils.SelectEndpoint(String discoveryUrl, Boolean useSecurity, Int32 operationTimeout)
at OpcClient.OpcSession.ConnectSessionAsync(CancellationToken ct) in /app/opcclient/OpcSession.cs:line 175
[18:45:08 INF] Execute 'OpcClient.OpcTestAction' action on node 'i=2258' on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security.
[18:45:08 INF] Action (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258') execution with error
[18:45:08 INF] Result (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258'): BadNotConnected 'Error establishing a connection: BadNotConnected'

[18:45:18 INF] Connect and monitor session and nodes on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security.
[18:45:18 ERR] Session creation to endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' failed 2 time(s). Please verify if server is up and OpcClient configuration is correct.
Opc.Ua.ServiceResultException: Error establishing a connection: BadNotConnected
at Opc.Ua.Bindings.ChannelAsyncOperation1.End(Int32 timeout, Boolean throwOnError) at Opc.Ua.Bindings.UaSCUaBinaryClientChannel.EndSendRequest(IAsyncResult result) at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.EndSendRequest(IAsyncResult result) at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.SendRequest(IServiceRequest request) at Opc.Ua.DiscoveryClient.GetEndpoints(RequestHeader requestHeader, String endpointUrl, StringCollection localeIds, StringCollection profileUris, EndpointDescriptionCollection& endpoints) at Opc.Ua.DiscoveryClient.GetEndpoints(StringCollection profileUris) at Opc.Ua.Client.CoreClientUtils.SelectEndpoint(String discoveryUrl, Boolean useSecurity, Int32 operationTimeout) at OpcClient.OpcSession.ConnectSessionAsync(CancellationToken ct) in /app/opcclient/OpcSession.cs:line 175 [18:45:18 INF] Execute 'OpcClient.OpcTestAction' action on node 'i=2258' on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security. [18:45:18 INF] Action (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258') execution with error [18:45:18 INF] Result (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258'): BadNotConnected 'Error establishing a connection: BadNotConnected' [18:45:28 INF] Connect and monitor session and nodes on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security. [18:45:28 ERR] Session creation to endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' failed 3 time(s). Please verify if server is up and OpcClient configuration is correct. Opc.Ua.ServiceResultException: Error establishing a connection: BadNotConnected at Opc.Ua.Bindings.ChannelAsyncOperation1.End(Int32 timeout, Boolean throwOnError)
at Opc.Ua.Bindings.UaSCUaBinaryClientChannel.EndSendRequest(IAsyncResult result)
at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.EndSendRequest(IAsyncResult result)
at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.SendRequest(IServiceRequest request)
at Opc.Ua.DiscoveryClient.GetEndpoints(RequestHeader requestHeader, String endpointUrl, StringCollection localeIds, StringCollection profileUris, EndpointDescriptionCollection& endpoints)
at Opc.Ua.DiscoveryClient.GetEndpoints(StringCollection profileUris)
at Opc.Ua.Client.CoreClientUtils.SelectEndpoint(String discoveryUrl, Boolean useSecurity, Int32 operationTimeout)
at OpcClient.OpcSession.ConnectSessionAsync(CancellationToken ct) in /app/opcclient/OpcSession.cs:line 175
[18:45:28 INF] Execute 'OpcClient.OpcTestAction' action on node 'i=2258' on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security.
[18:45:28 INF] Action (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258') execution with error
[18:45:28 INF] Result (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258'): BadNotConnected 'Error establishing a connection: BadNotConnected'
[18:45:38 INF] Connect and monitor session and nodes on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security.
[18:45:38 ERR] Session creation to endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' failed 4 time(s). Please verify if server is up and OpcClient configuration is correct.
Opc.Ua.ServiceResultException: Error establishing a connection: BadNotConnected
at Opc.Ua.Bindings.ChannelAsyncOperation1.End(Int32 timeout, Boolean throwOnError) at Opc.Ua.Bindings.UaSCUaBinaryClientChannel.EndSendRequest(IAsyncResult result) at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.EndSendRequest(IAsyncResult result) at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.SendRequest(IServiceRequest request) at Opc.Ua.DiscoveryClient.GetEndpoints(RequestHeader requestHeader, String endpointUrl, StringCollection localeIds, StringCollection profileUris, EndpointDescriptionCollection& endpoints) at Opc.Ua.DiscoveryClient.GetEndpoints(StringCollection profileUris) at Opc.Ua.Client.CoreClientUtils.SelectEndpoint(String discoveryUrl, Boolean useSecurity, Int32 operationTimeout) at OpcClient.OpcSession.ConnectSessionAsync(CancellationToken ct) in /app/opcclient/OpcSession.cs:line 175 [18:45:38 INF] Execute 'OpcClient.OpcTestAction' action on node 'i=2258' on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security. [18:45:38 INF] Action (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258') execution with error [18:45:38 INF] Result (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258'): BadNotConnected 'Error establishing a connection: BadNotConnected' [18:45:48 INF] Connect and monitor session and nodes on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security. [18:45:48 ERR] Session creation to endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' failed 5 time(s). Please verify if server is up and OpcClient configuration is correct. Opc.Ua.ServiceResultException: Error establishing a connection: BadNotConnected at Opc.Ua.Bindings.ChannelAsyncOperation1.End(Int32 timeout, Boolean throwOnError)
at Opc.Ua.Bindings.UaSCUaBinaryClientChannel.EndSendRequest(IAsyncResult result)
at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.EndSendRequest(IAsyncResult result)
at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.SendRequest(IServiceRequest request)
at Opc.Ua.DiscoveryClient.GetEndpoints(RequestHeader requestHeader, String endpointUrl, StringCollection localeIds, StringCollection profileUris, EndpointDescriptionCollection& endpoints)
at Opc.Ua.DiscoveryClient.GetEndpoints(StringCollection profileUris)
at Opc.Ua.Client.CoreClientUtils.SelectEndpoint(String discoveryUrl, Boolean useSecurity, Int32 operationTimeout)
at OpcClient.OpcSession.ConnectSessionAsync(CancellationToken ct) in /app/opcclient/OpcSession.cs:line 175
[18:45:48 INF] Execute 'OpcClient.OpcTestAction' action on node 'i=2258' on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security.
[18:45:48 INF] Action (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258') execution with error
[18:45:48 INF] Result (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258'): BadNotConnected 'Error establishing a connection: BadNotConnected'
[18:45:58 INF] Connect and monitor session and nodes on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security.
[18:45:58 ERR] Session creation to endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' failed 6 time(s). Please verify if server is up and OpcClient configuration is correct.
Opc.Ua.ServiceResultException: Error establishing a connection: BadNotConnected
at Opc.Ua.Bindings.ChannelAsyncOperation1.End(Int32 timeout, Boolean throwOnError) at Opc.Ua.Bindings.UaSCUaBinaryClientChannel.EndSendRequest(IAsyncResult result) at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.EndSendRequest(IAsyncResult result) at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.SendRequest(IServiceRequest request) at Opc.Ua.DiscoveryClient.GetEndpoints(RequestHeader requestHeader, String endpointUrl, StringCollection localeIds, StringCollection profileUris, EndpointDescriptionCollection& endpoints) at Opc.Ua.DiscoveryClient.GetEndpoints(StringCollection profileUris) at Opc.Ua.Client.CoreClientUtils.SelectEndpoint(String discoveryUrl, Boolean useSecurity, Int32 operationTimeout) at OpcClient.OpcSession.ConnectSessionAsync(CancellationToken ct) in /app/opcclient/OpcSession.cs:line 175 [18:45:58 INF] Execute 'OpcClient.OpcTestAction' action on node 'i=2258' on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security. [18:45:58 INF] Action (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258') execution with error [18:45:58 INF] Result (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258'): BadNotConnected 'Error establishing a connection: BadNotConnected' [18:46:08 INF] Connect and monitor session and nodes on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security. [18:46:08 ERR] Session creation to endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' failed 7 time(s). Please verify if server is up and OpcClient configuration is correct. Opc.Ua.ServiceResultException: Error establishing a connection: BadNotConnected at Opc.Ua.Bindings.ChannelAsyncOperation1.End(Int32 timeout, Boolean throwOnError)
at Opc.Ua.Bindings.UaSCUaBinaryClientChannel.EndSendRequest(IAsyncResult result)
at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.EndSendRequest(IAsyncResult result)
at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.SendRequest(IServiceRequest request)
at Opc.Ua.DiscoveryClient.GetEndpoints(RequestHeader requestHeader, String endpointUrl, StringCollection localeIds, StringCollection profileUris, EndpointDescriptionCollection& endpoints)
at Opc.Ua.DiscoveryClient.GetEndpoints(StringCollection profileUris)
at Opc.Ua.Client.CoreClientUtils.SelectEndpoint(String discoveryUrl, Boolean useSecurity, Int32 operationTimeout)
at OpcClient.OpcSession.ConnectSessionAsync(CancellationToken ct) in /app/opcclient/OpcSession.cs:line 175
[18:46:08 INF] Execute 'OpcClient.OpcTestAction' action on node 'i=2258' on endpoint 'opc.tcp://ng:53530/OPCUA/SimulationServer' with security.
[18:46:08 INF] Action (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258') execution with error
[18:46:08 INF] Result (ActionId: 000 ActionType: 'OpcTestAction', Endpoint: 'opc.tcp://ng:53530/OPCUA/SimulationServer' Node 'i=2258'): BadNotConnected 'Error establishing a connection: BadNotConnected'
^X^C[18:46:12 INF]
[18:46:12 INF]
[18:46:12 INF] OpcClient is shutting down...


Thanks! We'll be in touch soon.

Dockerfile and container configuration

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Docker

Versions

Mention any other details that might be useful

I am looking to use this in some demoes and I could not really find the Dockerfiles for this repository - https://hub.docker.com/_/microsoft-iotedge-opc-plc?tab=description. There are some links there, but all end up in 404 on GitHub.

Can you provide more details on how to use this container (e.g. how to properly provide configuration for it) and maybe the link to source Dockerfile?

PS I can build my own container on top, of course, but just wondering if there was a way to config the existing container.


Thanks! We'll be in touch soon.

Support very fast nodes

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Mention any other details that might be useful

I need a feature to test nodes which are changing with a higher frequency (10Hz) than the fast node feature provides (1Hz).
It would be great to add similar functionality as slow and fast nodes with very fast nodes.

Add own certificates to OPC UA Server

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Create a certificate with new key in /tmp/opcua_certs/

openssl req -x509 -nodes -newkey rsa:2048 -keyout /tmp/opcua_certs/key_opcua.pem -out /tmp/opcua_certs/opcua.pem -sha256 -days 365

Run the following command which is a mix of the quickstart plus options for adding private key and certificate

docker run -v /tmp/opcua_certs:/app/pki --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest
--pn=50000 --autoaccept --sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --gn=5 --ll=trace
--pk=/app/pki/key_opcua.pem
--af=/app/pki/opcua.pem

Any log messages given by the failure

Application store contains 2 certs
01: Subject CN=OpcPlc (thumbprint: 7B51229B40A79AB6CAB0A37DC09ADA465CC5B62B)
02: Subject CN=my-opcua, OU=foo, O=foo, L=foo, S=foo, C=foo (thumbprint: AB20A6603718D81A0285042338F73B96AB733CFE)

Expected/desired behavior

I expect that the passed in certificate is used as the application certificate. However, a new one is being generated and is preferred

OS and Version?

Debian 3.2.3 (bullseye)

Versions

Mention any other details that might be useful

I am unable to update the certificate at a later time because the CN is not matching the generated certificate.
Would be nice to extend the readme with a guide on how to set your own certificates. Because not all OPC UA clients have the possibility of accepting the certificate from the server during the initial connection, but may have the option of adding the certificate beforehand as a verification.


Thanks! We'll be in touch soon.

Some messages are not received from OPC PLC

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

We are using OPC PLC in integration tests for OPC Publisher. And one of the scenarios is to check whether there are missing values in the timeline. For this we rely on publishing data of incremental fast nodes of OPC PLC and then we check received values in IoT Hub.

During the testing we have observed that some values are missing. The original test setup is the following:

  • Start publishing 50 fast nodes using OPC Publisher (version from main branch which builds on top of 2.7.206). I am using 250 milliseconds as sampling interval and 500 milliseconds as publishing interval for all of the nodes.
  • Start TestEventProcessor which will consume received data in IoT Hub. It keeps track of last received value for each node and reports if latest received value is not equal to previous one plus 1. If the value is the same then it is reported as duplicate, otherwise as dropped.
  • Run TestEventProcessor for 90 seconds and report results.

To minimize number of moving pieces I've moved the dropped message detection logic to the OPC Publisher and ran it against an OPC PLC instance running on the same machine. I've also enabled logging of OPC stack to potentially see any issues reported by it. With this setup I am again publishing 50 fast nodes from OPC PLC with sampling interval of 250 milliseconds and publishing interval of 500 milliseconds. In this case I kept the publisher running to see if it detects dropped messages. And again it showed that from time to time there are gaps in the timeline. I can also see that logs of OPC stack also do not contain entries for the missing values. So the issues seem to be on the OPC PLC side. It should be noted that when a value is missing it is not just a value for one node but rather all published nodes are missing a specific value. So it seems that a message containing values for all published nodes is missing.

Any log messages given by the failure

Excerpt of OPC Publisher logs is bellow. There are logs from both SubscriptionServices and DataFlowProcessingEngine as I've added the same detection logic in two places to make sure that values are not dropped in between.

Full log: publisher_local_run.1.log

[17:30:42 INF Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine]
  DIAGNOSTICS INFORMATION for          : uat06ca1f1d237ce294704660e014945fbea5078f18
  # Ingestion duration                 :    00:00:01:48 (dd:hh:mm:ss)
  # Ingress DataChanges (from OPC)     :            109 (1/s)
  # Ingress ValueChanges (from OPC)    :          5,450 (50/s)
  # Ingress BatchBlock buffer size     :              0
  # Encoding Block input/output size   :              0 | 0
  # Encoder Notifications processed    :          5,450
  # Encoder Notifications dropped      :              0
  # Encoder IoT Messages processed     :            108
  # Encoder avg Notifications/Message  :             50
  # Encoder avg IoT Message body size  :         28,783 (11%)
  # Encoder avg IoT Chunk (4 KB) usage :              7
  # Estimated IoT Chunks (4 KB) per day:        323,408
  # Outgress Batch Block buffer size   :              0
  # Outgress input buffer count        :             56
  # Outgress input buffer dropped      :              0
  # Outgress IoT message count         :             51 (0.47/s)
  # Connection retries                 :              0

[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt1 node: 143609 2021-05-25 15:31:28.9351058Z ---> 143611 2021-05-25 15:31:30.9350911Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt2 node: 143609 2021-05-25 15:31:28.9351301Z ---> 143611 2021-05-25 15:31:30.9351158Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt3 node: 143609 2021-05-25 15:31:28.9351346Z ---> 143611 2021-05-25 15:31:30.9351364Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt4 node: 143609 2021-05-25 15:31:28.9351392Z ---> 143611 2021-05-25 15:31:30.9351439Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt5 node: 143609 2021-05-25 15:31:28.9351436Z ---> 143611 2021-05-25 15:31:30.9351493Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt6 node: 143609 2021-05-25 15:31:28.9351513Z ---> 143611 2021-05-25 15:31:30.9351540Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt7 node: 143609 2021-05-25 15:31:28.9351562Z ---> 143611 2021-05-25 15:31:30.9351590Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt8 node: 143609 2021-05-25 15:31:28.9351605Z ---> 143611 2021-05-25 15:31:30.9351642Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt9 node: 143609 2021-05-25 15:31:28.9351651Z ---> 143611 2021-05-25 15:31:30.9351686Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt10 node: 143609 2021-05-25 15:31:28.9351697Z ---> 143611 2021-05-25 15:31:30.9351738Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt11 node: 143609 2021-05-25 15:31:28.9351747Z ---> 143611 2021-05-25 15:31:30.9351784Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt12 node: 143609 2021-05-25 15:31:28.9351793Z ---> 143611 2021-05-25 15:31:30.9351827Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt13 node: 143609 2021-05-25 15:31:28.9351835Z ---> 143611 2021-05-25 15:31:30.9351884Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt14 node: 143609 2021-05-25 15:31:28.9351879Z ---> 143611 2021-05-25 15:31:30.9351930Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt15 node: 143609 2021-05-25 15:31:28.9351921Z ---> 143611 2021-05-25 15:31:30.9351975Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt16 node: 143609 2021-05-25 15:31:28.9351969Z ---> 143611 2021-05-25 15:31:30.9352016Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt17 node: 143609 2021-05-25 15:31:28.9352010Z ---> 143611 2021-05-25 15:31:30.9352068Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt18 node: 143609 2021-05-25 15:31:28.9352053Z ---> 143611 2021-05-25 15:31:30.9352118Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt19 node: 143609 2021-05-25 15:31:28.9352094Z ---> 143611 2021-05-25 15:31:30.9352167Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt20 node: 143609 2021-05-25 15:31:28.9352136Z ---> 143611 2021-05-25 15:31:30.9352213Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt21 node: 143609 2021-05-25 15:31:28.9352181Z ---> 143611 2021-05-25 15:31:30.9352261Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt22 node: 143609 2021-05-25 15:31:28.9352223Z ---> 143611 2021-05-25 15:31:30.9352310Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt23 node: 143609 2021-05-25 15:31:28.9352265Z ---> 143611 2021-05-25 15:31:30.9352355Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt24 node: 143609 2021-05-25 15:31:28.9352311Z ---> 143611 2021-05-25 15:31:30.9352414Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt25 node: 143609 2021-05-25 15:31:28.9352354Z ---> 143611 2021-05-25 15:31:30.9352459Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt26 node: 143609 2021-05-25 15:31:28.9352406Z ---> 143611 2021-05-25 15:31:30.9352502Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt27 node: 143609 2021-05-25 15:31:28.9352447Z ---> 143611 2021-05-25 15:31:30.9352542Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt28 node: 143609 2021-05-25 15:31:28.9352491Z ---> 143611 2021-05-25 15:31:30.9352586Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt29 node: 143609 2021-05-25 15:31:28.9352532Z ---> 143611 2021-05-25 15:31:30.9352641Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt30 node: 143609 2021-05-25 15:31:28.9352578Z ---> 143611 2021-05-25 15:31:30.9352684Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt31 node: 143609 2021-05-25 15:31:28.9352626Z ---> 143611 2021-05-25 15:31:30.9352726Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt32 node: 143609 2021-05-25 15:31:28.9352668Z ---> 143611 2021-05-25 15:31:30.9352767Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt33 node: 143609 2021-05-25 15:31:28.9352710Z ---> 143611 2021-05-25 15:31:30.9352807Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt34 node: 143609 2021-05-25 15:31:28.9352754Z ---> 143611 2021-05-25 15:31:30.9352855Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt35 node: 143609 2021-05-25 15:31:28.9352800Z ---> 143611 2021-05-25 15:31:30.9352897Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt36 node: 143609 2021-05-25 15:31:28.9352846Z ---> 143611 2021-05-25 15:31:30.9352938Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt37 node: 143609 2021-05-25 15:31:28.9352891Z ---> 143611 2021-05-25 15:31:30.9352980Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt38 node: 143609 2021-05-25 15:31:28.9352932Z ---> 143611 2021-05-25 15:31:30.9353022Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt39 node: 143609 2021-05-25 15:31:28.9352975Z ---> 143611 2021-05-25 15:31:30.9353073Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt40 node: 143609 2021-05-25 15:31:28.9353017Z ---> 143611 2021-05-25 15:31:30.9353120Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt41 node: 143609 2021-05-25 15:31:28.9353067Z ---> 143611 2021-05-25 15:31:30.9353164Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt42 node: 143609 2021-05-25 15:31:28.9353109Z ---> 143611 2021-05-25 15:31:30.9353214Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt43 node: 143609 2021-05-25 15:31:28.9353151Z ---> 143611 2021-05-25 15:31:30.9353263Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt44 node: 143609 2021-05-25 15:31:28.9353193Z ---> 143611 2021-05-25 15:31:30.9353317Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt45 node: 143609 2021-05-25 15:31:28.9353236Z ---> 143611 2021-05-25 15:31:30.9353365Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt46 node: 143609 2021-05-25 15:31:28.9353278Z ---> 143611 2021-05-25 15:31:30.9353416Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt47 node: 143609 2021-05-25 15:31:28.9353327Z ---> 143611 2021-05-25 15:31:30.9353469Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt48 node: 143609 2021-05-25 15:31:28.9353367Z ---> 143611 2021-05-25 15:31:30.9353519Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt49 node: 143609 2021-05-25 15:31:28.9353407Z ---> 143611 2021-05-25 15:31:30.9353572Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Protocol.Services.SubscriptionServices+SubscriptionWrapper] SubscriptionServices: Message dropped for FastUInt50 node: 143609 2021-05-25 15:31:28.9353450Z ---> 143611 2021-05-25 15:31:30.9353616Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt1 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:31 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt2 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt3 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt4 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt5 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt6 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt7 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt8 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt9 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt10 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt11 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt12 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt13 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt14 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt15 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt16 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt17 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt18 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt19 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt20 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt21 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt22 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt23 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt24 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt25 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt26 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt27 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt28 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt29 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt30 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt31 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt32 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt33 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt34 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt35 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt36 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt37 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt38 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt39 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt40 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt41 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:32 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt42 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:33 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt43 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:33 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt44 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:33 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt45 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:33 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt46 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:33 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt47 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:33 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt48 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:33 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt49 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:33 ERR Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine] DataFlowProcessingEngine: Message dropped for ns=2;s=FastUInt50 node: 143609 2021-05-25 15:31:28.9423207Z ---> 143611 2021-05-25 15:31:30.9484328Z
[17:31:42 INF Microsoft.Azure.IIoT.OpcUa.Edge.Publisher.Engine.DataFlowProcessingEngine]
  DIAGNOSTICS INFORMATION for          : uat06ca1f1d237ce294704660e014945fbea5078f18
  # Ingestion duration                 :    00:00:02:48 (dd:hh:mm:ss)
  # Ingress DataChanges (from OPC)     :            169 (1/s)
  # Ingress ValueChanges (from OPC)    :          8,450 (50/s)
  # Ingress BatchBlock buffer size     :              0
  # Encoding Block input/output size   :              0 | 0
  # Encoder Notifications processed    :          8,400
  # Encoder Notifications dropped      :              0
  # Encoder IoT Messages processed     :            165
  # Encoder avg Notifications/Message  :             51
  # Encoder avg IoT Message body size  :         29,055 (11%)
  # Encoder avg IoT Chunk (4 KB) usage :            7.1
  # Estimated IoT Chunks (4 KB) per day:        327,211
  # Outgress Batch Block buffer size   :              0
  # Outgress input buffer count        :             84
  # Outgress input buffer dropped      :              0
  # Outgress IoT message count         :             80 (0.47/s)
  # Connection retries                 :              0

Excerpt of OPC stack logs is bellow.

Full log: opc_stack_trace.1.log

25-May-21 17:31:28.943 Bytes read: 8
25-May-21 17:31:28.947 Bytes read: 1448
25-May-21 17:31:28.951 1179079501 Message Received: 1456 bytes
25-May-21 17:31:28.955 Channel 170: ProcessResponseMessage
25-May-21 17:31:28.958 PUBLISH #157 RECEIVED
25-May-21 17:31:28.962 Publish Completed. RequestHandle=157, PendingRequestCount=0
25-May-21 17:31:28.966 NOTIFICATION RECEIVED: SubId=23, SeqNo=157
25-May-21 17:31:28.970 Publish Called. RequestHandle=158, PendingRequestCount=1
25-May-21 17:31:28.970 NotificationReceived: ClientHandle=4, Value=143609
25-May-21 17:31:28.975 Bytes written: 112
25-May-21 17:31:28.978 NotificationReceived: ClientHandle=5, Value=143609
25-May-21 17:31:28.982 PUBLISH #158 SENT
25-May-21 17:31:28.985 NotificationReceived: ClientHandle=6, Value=143609
25-May-21 17:31:28.992 NotificationReceived: ClientHandle=7, Value=143609
25-May-21 17:31:28.995 NotificationReceived: ClientHandle=8, Value=143609
25-May-21 17:31:28.998 NotificationReceived: ClientHandle=9, Value=143609
25-May-21 17:31:29.001 NotificationReceived: ClientHandle=10, Value=143609
25-May-21 17:31:29.005 NotificationReceived: ClientHandle=11, Value=143609
25-May-21 17:31:29.008 NotificationReceived: ClientHandle=12, Value=143609
25-May-21 17:31:29.011 NotificationReceived: ClientHandle=13, Value=143609
25-May-21 17:31:29.015 NotificationReceived: ClientHandle=14, Value=143609
25-May-21 17:31:29.019 NotificationReceived: ClientHandle=15, Value=143609
25-May-21 17:31:29.023 NotificationReceived: ClientHandle=16, Value=143609
25-May-21 17:31:29.026 NotificationReceived: ClientHandle=17, Value=143609
25-May-21 17:31:29.029 NotificationReceived: ClientHandle=18, Value=143609
25-May-21 17:31:29.032 NotificationReceived: ClientHandle=19, Value=143609
25-May-21 17:31:29.035 NotificationReceived: ClientHandle=20, Value=143609
25-May-21 17:31:29.038 NotificationReceived: ClientHandle=21, Value=143609
25-May-21 17:31:29.041 NotificationReceived: ClientHandle=22, Value=143609
25-May-21 17:31:29.044 NotificationReceived: ClientHandle=23, Value=143609
25-May-21 17:31:29.047 NotificationReceived: ClientHandle=24, Value=143609
25-May-21 17:31:29.050 NotificationReceived: ClientHandle=25, Value=143609
25-May-21 17:31:29.053 NotificationReceived: ClientHandle=26, Value=143609
25-May-21 17:31:29.056 NotificationReceived: ClientHandle=27, Value=143609
25-May-21 17:31:29.059 NotificationReceived: ClientHandle=28, Value=143609
25-May-21 17:31:29.062 NotificationReceived: ClientHandle=29, Value=143609
25-May-21 17:31:29.065 NotificationReceived: ClientHandle=30, Value=143609
25-May-21 17:31:29.069 NotificationReceived: ClientHandle=31, Value=143609
25-May-21 17:31:29.072 NotificationReceived: ClientHandle=32, Value=143609
25-May-21 17:31:29.075 NotificationReceived: ClientHandle=33, Value=143609
25-May-21 17:31:29.079 NotificationReceived: ClientHandle=34, Value=143609
25-May-21 17:31:29.082 NotificationReceived: ClientHandle=35, Value=143609
25-May-21 17:31:29.086 NotificationReceived: ClientHandle=36, Value=143609
25-May-21 17:31:29.089 NotificationReceived: ClientHandle=37, Value=143609
25-May-21 17:31:29.093 NotificationReceived: ClientHandle=38, Value=143609
25-May-21 17:31:29.097 NotificationReceived: ClientHandle=39, Value=143609
25-May-21 17:31:29.101 NotificationReceived: ClientHandle=40, Value=143609
25-May-21 17:31:29.104 NotificationReceived: ClientHandle=41, Value=143609
25-May-21 17:31:29.107 NotificationReceived: ClientHandle=42, Value=143609
25-May-21 17:31:29.111 NotificationReceived: ClientHandle=43, Value=143609
25-May-21 17:31:29.114 NotificationReceived: ClientHandle=44, Value=143609
25-May-21 17:31:29.118 NotificationReceived: ClientHandle=45, Value=143609
25-May-21 17:31:29.121 NotificationReceived: ClientHandle=46, Value=143609
25-May-21 17:31:29.125 NotificationReceived: ClientHandle=47, Value=143609
25-May-21 17:31:29.128 NotificationReceived: ClientHandle=48, Value=143609
25-May-21 17:31:29.132 NotificationReceived: ClientHandle=49, Value=143609
25-May-21 17:31:29.136 NotificationReceived: ClientHandle=50, Value=143609
25-May-21 17:31:29.140 NotificationReceived: ClientHandle=51, Value=143609
25-May-21 17:31:29.145 NotificationReceived: ClientHandle=52, Value=143609
25-May-21 17:31:29.148 NotificationReceived: ClientHandle=53, Value=143609
25-May-21 17:31:30.949 Bytes read: 8
25-May-21 17:31:30.954 Bytes read: 1448
25-May-21 17:31:30.958 1179079501 Message Received: 1456 bytes
25-May-21 17:31:30.961 Channel 170: ProcessResponseMessage
25-May-21 17:31:30.965 PUBLISH #158 RECEIVED
25-May-21 17:31:30.968 Publish Completed. RequestHandle=158, PendingRequestCount=0
25-May-21 17:31:30.971 NOTIFICATION RECEIVED: SubId=23, SeqNo=158
25-May-21 17:31:30.974 NotificationReceived: ClientHandle=4, Value=143611
25-May-21 17:31:30.974 Publish Called. RequestHandle=159, PendingRequestCount=1
25-May-21 17:31:30.978 NotificationReceived: ClientHandle=5, Value=143611
25-May-21 17:31:30.984 Bytes written: 112
25-May-21 17:31:30.987 NotificationReceived: ClientHandle=6, Value=143611
25-May-21 17:31:30.990 PUBLISH #159 SENT
25-May-21 17:31:30.994 NotificationReceived: ClientHandle=7, Value=143611
25-May-21 17:31:31.000 NotificationReceived: ClientHandle=8, Value=143611
25-May-21 17:31:31.003 NotificationReceived: ClientHandle=9, Value=143611
25-May-21 17:31:31.007 NotificationReceived: ClientHandle=10, Value=143611
25-May-21 17:31:31.010 NotificationReceived: ClientHandle=11, Value=143611
25-May-21 17:31:31.014 NotificationReceived: ClientHandle=12, Value=143611
25-May-21 17:31:31.017 NotificationReceived: ClientHandle=13, Value=143611
25-May-21 17:31:31.020 NotificationReceived: ClientHandle=14, Value=143611
25-May-21 17:31:31.024 NotificationReceived: ClientHandle=15, Value=143611
25-May-21 17:31:31.028 NotificationReceived: ClientHandle=16, Value=143611
25-May-21 17:31:31.032 NotificationReceived: ClientHandle=17, Value=143611
25-May-21 17:31:31.036 NotificationReceived: ClientHandle=18, Value=143611
25-May-21 17:31:31.040 NotificationReceived: ClientHandle=19, Value=143611
25-May-21 17:31:31.044 NotificationReceived: ClientHandle=20, Value=143611
25-May-21 17:31:31.047 NotificationReceived: ClientHandle=21, Value=143611
25-May-21 17:31:31.050 NotificationReceived: ClientHandle=22, Value=143611
25-May-21 17:31:31.053 NotificationReceived: ClientHandle=23, Value=143611
25-May-21 17:31:31.058 NotificationReceived: ClientHandle=24, Value=143611
25-May-21 17:31:31.062 NotificationReceived: ClientHandle=25, Value=143611
25-May-21 17:31:31.065 NotificationReceived: ClientHandle=26, Value=143611
25-May-21 17:31:31.068 NotificationReceived: ClientHandle=27, Value=143611
25-May-21 17:31:31.072 NotificationReceived: ClientHandle=28, Value=143611
25-May-21 17:31:31.076 NotificationReceived: ClientHandle=29, Value=143611
25-May-21 17:31:31.079 NotificationReceived: ClientHandle=30, Value=143611
25-May-21 17:31:31.083 NotificationReceived: ClientHandle=31, Value=143611
25-May-21 17:31:31.086 NotificationReceived: ClientHandle=32, Value=143611
25-May-21 17:31:31.090 NotificationReceived: ClientHandle=33, Value=143611
25-May-21 17:31:31.093 NotificationReceived: ClientHandle=34, Value=143611
25-May-21 17:31:31.097 NotificationReceived: ClientHandle=35, Value=143611
25-May-21 17:31:31.101 NotificationReceived: ClientHandle=36, Value=143611
25-May-21 17:31:31.105 NotificationReceived: ClientHandle=37, Value=143611
25-May-21 17:31:31.108 NotificationReceived: ClientHandle=38, Value=143611
25-May-21 17:31:31.111 NotificationReceived: ClientHandle=39, Value=143611
25-May-21 17:31:31.115 NotificationReceived: ClientHandle=40, Value=143611
25-May-21 17:31:31.119 NotificationReceived: ClientHandle=41, Value=143611
25-May-21 17:31:31.122 NotificationReceived: ClientHandle=42, Value=143611
25-May-21 17:31:31.126 NotificationReceived: ClientHandle=43, Value=143611
25-May-21 17:31:31.130 NotificationReceived: ClientHandle=44, Value=143611
25-May-21 17:31:31.134 NotificationReceived: ClientHandle=45, Value=143611
25-May-21 17:31:31.137 NotificationReceived: ClientHandle=46, Value=143611
25-May-21 17:31:31.142 NotificationReceived: ClientHandle=47, Value=143611
25-May-21 17:31:31.145 NotificationReceived: ClientHandle=48, Value=143611
25-May-21 17:31:31.149 NotificationReceived: ClientHandle=49, Value=143611
25-May-21 17:31:31.153 NotificationReceived: ClientHandle=50, Value=143611
25-May-21 17:31:31.156 NotificationReceived: ClientHandle=51, Value=143611
25-May-21 17:31:31.160 NotificationReceived: ClientHandle=52, Value=143611
25-May-21 17:31:31.163 NotificationReceived: ClientHandle=53, Value=143611

As you can see there is a missing message for value 143610 in OPC stack logs as well.

Expected/desired behavior

I would expect OPC PLC to send messages for all values. I would also like to have logs in OPC PLC in cases there were issues with sending data. Currently it is not logging anything after the initial startup logs.

OS and Version?

Test were performed on Windows 10.

Versions

Container image used is mcr.microsoft.com/iotedge/opc-plc:latest. Logs are reporting V1.2.4 version.

Mention any other details that might be useful

OPC Publisher codes with additional changes for dropped message detection can be found in kakostan/publisher branch in Industrial-IoT repo.

Certificate error : unable to load CRL in trust store

This issue is for a:

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Generate an openssl CA (key and certificate). Use the following commands to generate the key and the certificate :

  • Key generation : openssl genrsa -des3 -out myCA.key 2048
  • PEM Certificate generation : openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem
  • CRL generation using CA : openssl ca -gencrl -keyfile myCA.key -cert myCA.pem -out myCA.crl -config crl_openssl.cnf

The following command can be used to verify the CLR : openssl crl -in myCA.crl -CAfile myCA.crt

Here is the content of the crl_openssl.cnf :

# OpenSSL configuration for CRL generation
#
####################################################################
[ ca ]
default_ca	= CA_default		# The default ca section

####################################################################
[ CA_default ]
database = index.txt
crlnumber = crl_number


default_days	= 365			# how long to certify for
default_crl_days= 30			# how long before next CRL
default_md	= default		# use public key default MD
preserve	= no			# keep passed DN ordering

####################################################################
[ crl_ext ]
# CRL extensions.
# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
# issuerAltName=issuer:copy
authorityKeyIdentifier=keyid:always,issuer:always

The PEM certificate has to be transformed to DER format using the following command : openssl x509 -in myCA.pem -out myCA.der -outform DER

Afterwards place the certificate in the trust store as described below :

โ”œโ”€โ”€ own
โ”‚ย ย  โ”œโ”€โ”€ certs
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ OpcPlc [3330615D8D4794D4581DCBE5FF857F2C7BFAECF2].der
โ”‚ย ย  โ””โ”€โ”€ private
โ”‚ย ย      โ””โ”€โ”€ OpcPlc [3330615D8D4794D4581DCBE5FF857F2C7BFAECF2].pfx
โ””โ”€โ”€ trusted
    โ”œโ”€โ”€ certs
    โ”‚ย ย  โ””โ”€โ”€ myCA.der
    โ””โ”€โ”€ crl
        โ””โ”€โ”€ myCA.crl

The command used to start the PLC is the following :

docker run --rm -it -v /tmp/plc:/app/pki -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --ctb --scn --lid --lsn --ref --gn=5 --ph=0.0.0.0 --csr

Any log messages given by the failure

[08:34:49 ERR] Error while trying to read information from trusted peer store.
System.Security.Cryptography.CryptographicException: Failed to decode the X509 signature.
 ---> System.Formats.Asn1.AsnContentException: The provided data is tagged with 'Universal' class value '13', but it should have been 'Universal' class value '16'.
   at System.Formats.Asn1.AsnDecoder.CheckExpectedTag(Asn1Tag tag, Asn1Tag expectedTag, UniversalTagNumber tagNumber)
   at System.Formats.Asn1.AsnDecoder.ReadSequence(ReadOnlySpan`1 source, AsnEncodingRules ruleSet, Int32& contentOffset, Int32& contentLength, Int32& bytesConsumed, Nullable`1 expectedTag)
   at System.Formats.Asn1.AsnReader.ReadSequence(Nullable`1 expectedTag)
   at Opc.Ua.Security.Certificates.X509Signature.Decode(Byte[] crl)
   --- End of inner exception stack trace ---
   at Opc.Ua.Security.Certificates.X509Signature.Decode(Byte[] crl)
   at Opc.Ua.Security.Certificates.X509Signature..ctor(Byte[] signedBlob)
   at Opc.Ua.Security.Certificates.X509CRL.Decode(Byte[] crl)
   at Opc.Ua.Security.Certificates.X509CRL.EnsureDecoded()
   at Opc.Ua.Security.Certificates.X509CRL.get_IssuerName()
   at Opc.Ua.Security.Certificates.X509CRL.get_Issuer()
   at OpcPlc.OpcApplicationConfiguration.ShowCertificateStoreInformationAsync() in D:\a\1\s\src\OpcApplicationConfigurationSecurity.cs:line 338

Expected/desired behavior

The CRL should be loaded in the trust store.

OS and Version?

Linux :

Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.6 LTS
Release:	18.04
Codename:	bionic

Versions

Version : latest, 2.5.0, 2.4.0, 2.3.0

Mention any other details that might be useful

The first time this error occured was during a CRL generation test in JAVA. Since we were not able to understand why it was not possible to load our CRL, we generated everything using openssl and found out it may be a bug.

myCA.zip

Feature: Deterministic testing of Alarms and Condition

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

This is a proposal to include deterministic testing for Alarms and Condition.
I have created the proposed solution and documentation in my own repository.
https://github.com/buzzfrog/MySimpleOpcAlarmServerSim

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Need help with certificates and connecting to ACI

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Click the "Deploy to Azure" button from the readme.

Any log messages given by the failure

On the OPC Client software
Error establishing a connection: BadNotConnected
I'm getting lots of traffic on the OPC server, potentially bots, but when connected to the logs from the azure portal here are some related messages from the OPC Server

[17:59:51 ERR] OPC: TCPSERVERCHANNEL ForceChannelFault Socket=027CB571, ChannelId=0, TokenId=0, Reason=BadConnectionClosed 'Remote side closed connection'
[17:59:51 ERR] OPC: 06/16/2022 17:59:51.575 TCPSERVERCHANNEL ForceChannelFault Socket=027CB571, ChannelId=0, TokenId=0, Reason=BadConnectionClosed 'Remote side closed connection'
[17:59:51 ERR] OPC: TCPSERVERCHANNEL ForceChannelFault Socket=03FE6417, ChannelId=0, TokenId=0, Reason=BadConnectionClosed 'Remote side closed connection'
[17:59:51 ERR] OPC: 06/16/2022 17:59:51.780 TCPSERVERCHANNEL ForceChannelFault Socket=03FE6417, ChannelId=0, TokenId=0, Reason=BadConnectionClosed 'Remote side closed connection'

Expected/desired behavior

That I can connect to the OPC Server

OS and Version?

Running cat /etc/issue on the connect of the aci returns
Debian GNU/Linux 11 \n \l
The OPC UA Client is running on my windows 10 machine.

Versions

The aci Logs show: OpcPlc V2.3.0 starting up ...

Mention any other details that might be useful

I tried my best to find documentation on the readme about how to run this docker image as an aci and manage the certificates but was not able to find any. I apologize if it's in an obvious place, but I could not find any.

As per the directions on the readme, after you run the Deploy to Azure you should be able to connect using
opc.tcp://<NAME>.<REGION>.azurecontainer.io:50000

Looking at the container logs I tried this as well as since it said it was Starting server on endpoint <endpoint-below> ...
opc.tcp://aci-<NAME>-<RNG>-plc1.<REGION>.azurecontainer.io:50000
both didn't work.

I believe the issues is that I need the certificate (der file) from the aci / opc ua server on my client machine so I can connect but I do not know how to get it. Here is some of the log at the end when the certificates are created:

[17:54:05 INF] Application store contains 1 certs
[17:54:05 INF] 01: Subject 'CN=OpcPlc' (thumbprint: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
[17:54:05 INF] Trusted issuer store contains 0 certs
[17:54:05 INF] Trusted issuer store has 0 CRLs.
[17:54:05 INF] Trusted peer store contains 0 certs
[17:54:05 INF] Trusted peer store has 0 CRLs.

Looking at the logs I see there are several entries where it's creating the certificates on the container instance but that doesn't seem to be a good idea. Also, do I need to copy my OPC UA Client certificates to the server as well? I haven't gotten to that phase yet but that might be something that is needed?

I figure I can't connect because I don't have certificates on my OPC UA Client machine and perhaps I need to get certificates to the OPC UA server eventually, but none of that is clear on how to do with aci.

Can I configure the aci with where to get the certificates? is there other ways?

Mechanism to control value range of simulated nodes

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report 
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Define for fast and slow nodes upper and lower levels to define a range. When the node will change the value it should generate random value within that range instead just increment.

Mention any other details that might be useful

Ability to import an XML NodeSet file into the simulator

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

N/A

Any log messages given by the failure

N/A

Expected/desired behavior

I would like to be able to provide one (or ideally multiple) XML Nodeset files to the simulator, such that those Nodesets are included in the address space of the simulator. I am aware of nodefile.json, but as far as I can see this only supports putting nodes in a single folder which is a child of the root node, rather than replicating an existing address space.

OS and Version?

N/A

Versions

N/A

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Documentation issue on the docker run options

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

just run the docker run as documented

Any log messages given by the failure

[08:12:11 ERR] Command line arguments: --pn=50000 --autoaccept --nospikes --nodips --nopostrend --nonegtrend --nodatavalues --sp --sn=25 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint

Expected/desired behavior

the container image just starts ;)

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
ubuntu

Versions

18.04 LTS

Mention any other details that might be useful


Thanks! We'll be in touch soon.

BuildInfo members not containing values

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

trying to read ServerStatus->BuildInfo with a OPC-UA Foundation sample client I can read BuildInfo string but if I try to read the single members I get null values

I'm on Windows 10 Build 19044 source code compiled with VisualStudio 2022 Community 17.5.4

Mention any other details that might be useful

I've tried the console reference server from OPC Foundation with the same client and it works fine

Can't read simulated history data

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

Is it possible to retrieve simulated historical data?
And is it possible to use the OPC read_history function? I tried changing changing all Historizing = false, to Historizing = true,. Then I try to read-in the values using

myvar = root.get_child(["0:Objects", "2:OpcPlc", "2:Telemetry", "2:RandomSignedInt32"])
var = myvar # client.get_node("ns=2;s=Input.IEPE11")
dt_now = datetime.datetime.utcnow()
endtime = dt_now + datetime.timedelta(seconds=30)
starttime = dt_now - datetime.timedelta(seconds=0)
print("Start and end times are: ", endtime, starttime)
result = var.read_raw_history(starttime, endtime)

the error message I get it:

Traceback (most recent call last):
  File "/path/mocks/client.py", line 55, in <module>
    result = var.read_raw_history(starttime, endtime)
  File "/path/python3.6/site-packages/opcua/common/node.py", line 510, in read_raw_history
    return result.HistoryData.DataValues
AttributeError: 'NoneType' object has no attribute 'DataValues'

But this doesn't work.

Is it possible to determine this somehow (and determine the kind of data to be simulated) using the config file:?

Is it possible to determine what kind of data is to be generated?

  "NodeList": [
    {
      "NodeId": "07ZC619-01.OP001",
      "Name": "07ZC619-01.OP001",
      "DataType": "Float",
      "ValueRank": -1,
      "AccessLevel": "HistoryRead",
      "UserAccessLevel": 1,
      "Description": ""
    },

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

OPC PLC seem to have issues with responding to session keep-alive requests

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

I am seeing a lot of messaged about OPC PLC not responding to session keep-alive requests when running TelemetryTransformationTests test suite of OMP Adapter with OPC Publisher 3.0. Please note that in the test suite there are scenarios where up to 100 concurrent sessions (10 assets each having 10 nodes with different publishing intervals) may be opened to consume data from OPC PLC. Though this is not the only test where those logs appear.

Here is the excerpt from test logs:

[15:49:16 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:49:16 INF] Outstanding requests: 1, Defunct requests: 0
[15:49:16 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:49:16 INF] SessionId: ns=6;i=1981790945
[15:49:16 INF] Session State: True
[15:49:16 INF] Missed Keep-Alives: 1
[15:49:16 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:49:16 INF] Outstanding requests: 1, Defunct requests: 0
[15:49:16 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:49:16 INF] SessionId: ns=6;i=1981790721
[15:49:16 INF] Session State: True
[15:49:16 INF] Missed Keep-Alives: 1
[15:49:16 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:49:16 INF] Outstanding requests: 1, Defunct requests: 0
[15:49:16 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:49:16 INF] SessionId: ns=6;i=1981790833
[15:49:16 INF] Session State: True
[15:49:16 INF] Missed Keep-Alives: 1
[15:49:16 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:49:16 INF] Outstanding requests: 2, Defunct requests: 0
[15:49:16 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:49:16 INF] SessionId: ns=6;i=1981790721
[15:49:16 INF] Session State: True
[15:49:16 INF] Missed Keep-Alives: 2
[15:49:29 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:49:29 INF] Outstanding requests: 1, Defunct requests: 0
[15:49:29 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:49:29 INF] SessionId: ns=6;i=1981790889
[15:49:29 INF] Session State: True
[15:49:29 INF] Missed Keep-Alives: 1
[15:49:29 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:49:29 INF] Outstanding requests: 1, Defunct requests: 0
[15:49:29 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:49:29 INF] SessionId: ns=6;i=1981791057
[15:49:29 INF] Session State: True
[15:49:29 INF] Missed Keep-Alives: 1
[15:49:29 INF] Session endpoint: opc.tcp://opcplclarge:50001/ got a keep alive after 1 was missed.
[15:49:29 INF] Session endpoint: opc.tcp://opcplclarge:50001/ got a keep alive after 1 was missed.
[15:49:29 INF] Session endpoint: opc.tcp://opcplclarge:50001/ got a keep alive after 2 were missed.
[15:49:29 INF] Session endpoint: opc.tcp://opcplclarge:50001/ got a keep alive after 1 was missed.
[15:49:29 INF] Session endpoint: opc.tcp://opcplclarge:50001/ got a keep alive after 1 was missed.
[15:49:44 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:49:44 INF] Outstanding requests: 1, Defunct requests: 0
[15:49:44 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:49:44 INF] SessionId: ns=6;i=1981790889
[15:49:44 INF] Session State: True
[15:49:44 INF] Missed Keep-Alives: 1
[15:49:44 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:49:44 INF] Outstanding requests: 1, Defunct requests: 0
[15:49:44 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:49:44 INF] SessionId: ns=6;i=1981791057
[15:49:44 INF] Session State: True
[15:49:44 INF] Missed Keep-Alives: 1
[15:49:44 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:49:44 INF] Outstanding requests: 2, Defunct requests: 0
[15:49:44 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:49:44 INF] SessionId: ns=6;i=1981790889
[15:49:44 INF] Session State: True
[15:49:44 INF] Missed Keep-Alives: 2
[15:49:59 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:49:59 INF] Outstanding requests: 3, Defunct requests: 0
[15:49:59 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:49:59 INF] SessionId: ns=6;i=1981790889
[15:49:59 INF] Session State: True
[15:49:59 INF] Missed Keep-Alives: 3
[15:49:59 INF] RECONNECTING session ns=6;i=1981790889...
[15:49:59 INF] Session ns=6;i=1981790889 is closing
[15:50:33 INF] ==========================================================================
OPC Publisher status for Leaf7 telemetry pipeline @ 06/22/2021 15:50:33 (started @ 06/22/2021 15:48:44)
---------------------------------
OPC UA sessions: 1
OPC UA subscriptions: 1
OPC UA monitored items: 3
---------------------------------
OPC UA monitored items queue capacity: 20000
OPC UA monitored items queue current items: 3
OPC UA monitored item notifications enqueued: 9
OPC UA monitored item notifications enqueue failure: 0
---------------------------------
Messages sent to IoT Hub: 0
Last successful IoT Hub message sent @: 06/22/2021 15:48:44
Total bytes sent to IoT Hub: 0
Average IoT Hub message size (bytes): 0
Average IoT Hub message latency (ms): 0
Average IoT Hub messages/second sent: 0
Average number of OPC UA notifications batched in IoT Hub message: 0
Average number of OPC UA notifications/second sent: 0
IoT Hub message send failures: 0
IoT Hub messages too large to sent to IoT Hub: 0
Missed IoT Hub message send intervals: 0
Number of OPC UA notifications encoded: 0
Number of OPC UA notifications encoding failures: 0
---------------------------------
Current working set in MB: 125
IoT Hub send interval setting: 10
IoT Hub message size setting: 262144
IoT Hub protocol setting: MQTT
==========================================================================
[15:50:33 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:50:33 INF] Outstanding requests: 1, Defunct requests: 0
[15:50:33 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:50:33 INF] SessionId: ns=6;i=1981791113
[15:50:33 INF] Session State: True
[15:50:33 INF] Missed Keep-Alives: 1
[15:50:33 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:50:33 INF] Outstanding requests: 2, Defunct requests: 0
[15:50:33 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:50:33 INF] SessionId: ns=6;i=1981791057
[15:50:33 INF] Session State: True
[15:50:33 INF] Missed Keep-Alives: 2
[15:50:51 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:50:51 INF] Outstanding requests: 3, Defunct requests: 0
[15:50:51 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:50:51 INF] SessionId: ns=6;i=1981791057
[15:50:51 INF] Session State: True
[15:50:51 INF] Missed Keep-Alives: 3
[15:50:51 INF] RECONNECTING session ns=6;i=1981791057...
[15:50:51 INF] Session ns=6;i=1981791057 is closing
[15:51:31 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:51:31 INF] Outstanding requests: 2, Defunct requests: 0
[15:51:31 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:51:31 INF] SessionId: ns=6;i=1981791113
[15:51:31 INF] Session State: True
[15:51:31 INF] Missed Keep-Alives: 2
[15:51:31 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:51:31 INF] Outstanding requests: 1, Defunct requests: 0
[15:51:31 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:51:31 INF] SessionId: ns=6;i=1981790945
[15:51:31 INF] Session State: True
[15:51:31 INF] Missed Keep-Alives: 1
[15:51:31 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:51:31 INF] Outstanding requests: 1, Defunct requests: 0
[15:51:31 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:51:31 INF] SessionId: ns=6;i=1981790777
[15:51:31 INF] Session State: True
[15:51:31 INF] Missed Keep-Alives: 1
[15:51:31 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:51:31 INF] Outstanding requests: 1, Defunct requests: 0
[15:51:31 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:51:31 INF] SessionId: ns=6;i=1981791001
[15:51:31 INF] Session State: True
[15:51:31 INF] Missed Keep-Alives: 1
[15:51:31 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:51:31 INF] Outstanding requests: 1, Defunct requests: 0
[15:51:31 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:51:31 INF] SessionId: ns=6;i=1981790833
[15:51:31 INF] Session State: True
[15:51:31 INF] Missed Keep-Alives: 1
[15:51:31 WRN] Session endpoint: opc.tcp://opcplclarge:50001/ has Status: BadNoCommunication 'Server not responding to keep alive requests.'
[15:51:31 INF] Outstanding requests: 3, Defunct requests: 0
[15:51:31 INF] Good publish requests: 1, KeepAlive interval: 5000
[15:51:31 INF] SessionId: ns=6;i=1981791113
[15:51:31 INF] Session State: True
[15:51:31 INF] Missed Keep-Alives: 3
[15:51:31 INF] RECONNECTING session ns=6;i=1981791113...
[15:51:31 INF] Session ns=6;i=1981791113 is closing

Expected/desired behavior

I would expect OPC PLC to keep up with keep-alive requests and respond in timely manner.

OS and Version?

Linux (ubuntu 18.04)

Versions

Image: mcr.microsoft.com/iotedge/opc-plc:latest-debug

Version:

[14:47:14 INF] Certificate 'CN=OPC Publisher, C=US, S=Washington, O=Microsoft, DC=opcpublisher' will be trusted, because of corresponding command line option.
[15:45:57 INF] Certificate 'CN=OPC Publisher, C=US, S=Washington, O=Microsoft, DC=opcpublisher' will be trusted, because of corresponding command line option.
[15:46:48 INF] Current directory is: /app
[15:46:49 INF] Log file is: /app/opcplc-plc.log
[15:46:49 INF] Log level is: info
[15:46:49 INF] OpcPlc V1.2.4 starting up...
[15:46:49 INF] opcstacktracemask set to: 0x0
[15:46:49 INF] OPC UA server base address: opc.tcp://opcplc:50000
[15:46:49 INF] Security policy http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256 with mode SignAndEncrypt added

feat: Add logging info if Boiler simulator is enabled/disabled

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

When implemented, a new log message should be written and tell if Boiler Simulation is enabled/disabled.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Support of OPC UA 1.04.365.48

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Do you plan to migrate to OPC UA 1.04.365 instead of OPC UA 1.04.363 ? To align with the new CertificateBuilder class and the others enhancements of version 1.04.365.

Minimal steps to reproduce

Any log messages given by the failure

Compilation failed with 1.04.365.48

Expected/desired behavior

Compiled with Nuget packages 1.04.365.48 (current version)

OS and Version?

NETCORE 3.1

Versions

Last version from trunK

Mention any other details that might be useful

V2.5.0 Broken

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [x] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Deploy to Azure using "Deploy to Azure" button. Can't connect using OPC UA Client. IIOT Opc UA Publisher module can't connect either.

Expected/desired behavior

Can connect using OPC UA client. Reverting to 2.4.2 works.

Versions

2.5.0

Mention any other details that might be useful

Log: opcplclog.txt

Connection error from client:
Please verify that the Server is available at the selected address.

Bad_ConnectionRejected (0x80AC0000) "Could not establish a network connection to remote server."

Failed to retrieve endpoints. The server is not available: opc.tcp://aci-contoso-aiui3mg-plc1.westeurope.azurecontainer.io:50000


Thanks! We'll be in touch soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.