Telegraf OPC UA Input Data Example (from TwinCat Server)

I try to get som values as Input from a OPC-UA Server (Twincat3).
In my InfluxDB Bucket are no results.
Can anybody help me to find the error? At the moment I have no more ideas how to fix this…

What can fix this issue:

panic: runtime error: invalid memory address or nil pointer dereference

Telegraf config:

### Configuration for telegraf agent
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 1000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = "ns"
debug = false
quiet = false
#hostname = ""

   urls = ["http://localhost:8086"]
  token = "$INFLUX_TOKEN"
  organization = "MasterOrg"
  bucket = "opc1"

  ## Metric name
  name = "opc1"
  ## OPC UA Endpoint URL
#endpoint = "opc.tcp://localhost:4840"
  endpoint = "opc.tcp://Manu:4840"
 # endpoint = "opc.tcp://"

  ## Maximum time allowed to establish a connect to the endpoint.
  connect_timeout = "10s"
  ## Maximum time allowed for a request over the estabilished connection.
  request_timeout = "5s"
  ## Security policy, one of "None", "Basic128Rsa15", "Basic256",
  ## "Basic256Sha256", or "auto"
  #security_policy = "Basic256Sha256"
  security_policy = "None"
  ## Security mode, one of "None", "Sign", "SignAndEncrypt", or "auto"
  #security_mode = "Sign"
  security_mode = "None"
  ## Path to cert.pem. Required when security mode or policy isn't "None".
  ## If cert path is not supplied, self-signed cert and key will be generated.
  # certificate = "/Program Files/Telegraf/cert.pem"
  ## Path to private key.pem. Required when security mode or policy isn't "None".
  ## If key path is not supplied, self-signed cert and key will be generated.
  #private_key = "/Program Files/Telegraf/key.pem"
  ## Authentication Method, one of "Certificate", "UserName", or "Anonymous".  To
  ## authenticate using a specific ID, select 'Certificate' or 'UserName'
  auth_method = "Anonymous"
  ## Node ID configuration
  ## name              - field name to use in the output
  ## namespace         - OPC UA namespace of the node (integer value 0 thru 3)
  ## identifier_type   - OPC UA ID type (s=string, i=numeric, g=guid, b=opaque)
  ## identifier        - OPC UA ID (tag as shown in opcua browser)
  ## tags              - extra tags to be added to the output metric (optional)
  ## Example:
 #nodes = [ {name="", namespace="", identifier_type="", identifier=""} ]

  nodes = [
  {name="opc1", namespace="4",identifier_type="i", identifier="MAIN.ncounter"},
  {name="test2", namespace="3",identifier_type="i", identifier="MAIN.nNumber"},
  {name="test3", namespace="4",identifier_type="i", identifier="MAIN.iVar2"},

CLI Information when starting Telegraf:

PS C:\Program Files\Telegraf> .\telegraf --config

.\telegraf : 2021-10-29T07:58:24Z I! Starting Telegraf 1.19.2
In Zeile:1 Zeichen:1
+ .\telegraf --config ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (2021-10-29T07:5...Telegraf 1.19.2:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
2021-10-29T07:58:24Z I! Loaded inputs: opcua
2021-10-29T07:58:24Z I! Loaded aggregators: 
2021-10-29T07:58:24Z I! Loaded processors: 
2021-10-29T07:58:24Z I! Loaded outputs: influxdb_v2
2021-10-29T07:58:24Z I! Tags enabled: host=Manu
2021-10-29T07:58:24Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"Manu", Flush Interval:10s
2021-10-29T07:58:24Z I! Failed to load certificate: open /etc/telegraf/cert.pem: Das System kann den angegebenen Pfad nicht finden.
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x2398ab9]
goroutine 22 [running]:*NodeID).Encode(0x0, 0x47f7500, 0x0, 0x23d7d51d678, 0x0, 0x0)
	/go/pkg/mod/ +0x59, 0xc0000a3460, 0x196, 0xc0007f6270, 0x2b, 0xc0000a3460, 0x196, 0x8, 0x0, 0x3cf8b7e)
	/go/pkg/mod/ +0xccf, 0xc0000a3b08, 0x197, 0xc0007f6240, 0x28, 0x136cdc, 0x28, 0xc0007f6240, 0x28, 0xc0007f6240)
	/go/pkg/mod/ +0x2ff, 0xc0000a3b08, 0x197, 0xc0007f6240, 0x28, 0xc0000a3b08, 0x197, 0xc0007f6240, 0x28, 0x0)
	/go/pkg/mod/ +0xa87, 0xc0000a3b00, 0x199, 0x3d3144f, 0x18, 0x42549f8, 0xc000105080, 0x3c7c504, 0xc000105080, 0x3c6c76f)
	/go/pkg/mod/ +0x265, 0xc0000a3b00, 0x199, 0x3d3144f, 0x18, 0x199, 0x145e7c, 0x41908c0, 0x0, 0xc0003b0aa0)
	/go/pkg/mod/ +0xb31, 0xc0000a3b00, 0x16, 0x3d3144f, 0x18, 0xc0007998b0, 0x4, 0xc0007998c0, 0x23d7d51da00, 0xc000559808)
	/go/pkg/mod/ +0x993, 0xc0000a3b00, 0xc0000a3b00, 0x0, 0x0, 0x0, 0x4)
	/go/pkg/mod/ +0x118*Buffer).WriteStruct(0xc000559958, 0x42549c0, 0xc0000a3b00)
	/go/pkg/mod/ +0x67*Message).Encode(0xc0000a3b60, 0x53c2d98, 0xc0000a3b00, 0xc000000004, 0xc000288690, 0x12a05f200)
	/go/pkg/mod/ +0x137*SecureChannel).sendAsyncWithTimeout(0xc0002e8d10, 0x53c2d98, 0xc0000a3b00, 0xc000000004, 0xc00042c480, 0xc000288690, 0x23c4601, 
0x12a05f200, 0xc000288690, 0x12a05f200, ...)
	/go/pkg/mod/ +0x145*SecureChannel).sendRequestWithTimeout(0xc0002e8d10, 0x53c2d98, 0xc0000a3b00, 0x4, 0xc00042c480, 0xc000288690, 0x12a05f200, 0xc000559c90, 
0x0, 0x0)
	/go/pkg/mod/ +0xbe*SecureChannel).SendRequestWithTimeout(0xc0002e8d10, 0x53c2d98, 0xc0000a3b00, 0xc000288690, 0x12a05f200, 0xc000559c90, 0x8, 0x4254a40)
	/go/pkg/mod/ +0xd5*Client).sendWithTimeout(0xc000493880, 0x53c2d98, 0xc0000a3b00, 0x12a05f200, 0xc000559c90, 0xef03f, 0x20)
	/go/pkg/mod/ +0xbf*Client).Send(...)
	/go/pkg/mod/*Client).RegisterNodes(0xc000493880, 0xc0000a3b00, 0xc00042c2a0, 0x0, 0x0)
	/go/pkg/mod/ +0x96, 0x0, 0x0)
	/go/src/ +0x325*OpcUA).Gather(0xc0006c4180, 0x5445078, 0xc000629d80, 0x0, 0x0)
	/go/src/ +0x58c*RunningInput).Gather(0xc0007b6410, 0x5445078, 0xc000629d80, 0x0, 0x0)
	/go/src/ +0x74*Agent).gatherOnce.func1(0xc000428300, 0xc0007b6410, 0x5445078, 0xc000629d80)
	/go/src/ +0x46
created by*Agent).gatherOnce
	/go/src/ +0xc5

Anybody knows what issues can lead to this error?