Skip to content

Debugging TCP connection #164

Description

@gitopolis

I'm trying to connect two ndnds with a tcp connection: ndnd-1 is behind a loadbalancer, ndnd-2 behind NAT.
When I run ndnd dv link-create tcp://<redacted>:6364 in the ndnd-2 I see following in the logs:

  • ndnd-2 logs:
    time=2025-11-10T01:42:40.805Z level=INFO msg="Connected socket - Face UP" tag="unicast-tcp-transport (faceid=6 remote=tcp4://<redacted>:6364 local=tcp4://192.168.5.15:44348)"
    
  • ndnd-1 logs:
    time=2025-11-10T01:52:32.503Z level=INFO msg="Accepting new TCP face" tag="tcp-listener (tcp4://0.0.0.0:6364)" uri=tcp4://10.202.0.29:56017
    time=2025-11-10T01:52:32.547Z level=ERROR msg="Unable to decode incoming frame" tag="link-service (unicast-tcp-transport (faceid=16 remote=tcp4://10.202.0.29:56017 local=tcp4://10.202.0.27:6364))" err="There exists an unrecognized field that has a critical type number: 71"
    time=2025-11-10T01:52:32.547Z level=ERROR msg="Unable to decode incoming frame" tag="link-service (unicast-tcp-transport (faceid=16 remote=tcp4://10.202.0.29:56017 local=tcp4://10.202.0.27:6364))" err="There exists an unrecognized field that has a critical type number: 101"
    time=2025-11-10T01:52:32.548Z level=ERROR msg="Received packet of unknown type" tag="link-service (unicast-tcp-transport (faceid=16 remote=tcp4://10.202.0.29:56017 local=tcp4://10.202.0.27:6364))"
    time=2025-11-10T01:52:32.548Z level=ERROR msg="Unable to decode incoming frame" tag="link-service (unicast-tcp-transport (faceid=16 remote=tcp4://10.202.0.29:56017 local=tcp4://10.202.0.27:6364))" err="There exists an unrecognized field that has a critical type number: 87"
    time=2025-11-10T01:52:32.548Z level=ERROR msg="Unable to decode incoming frame" tag="link-service (unicast-tcp-transport (faceid=16 remote=tcp4://10.202.0.29:56017 local=tcp4://10.202.0.27:6364))" err="There exists an unrecognized field that has a critical type number: 99"
    time=2025-11-10T01:52:32.548Z level=ERROR msg="Unable to decode incoming frame" tag="link-service (unicast-tcp-transport (faceid=16 remote=tcp4://10.202.0.29:56017 local=tcp4://10.202.0.27:6364))" err="Failed to parse field 100: There exists an unrecognized field that has a critical type number: 101"
    time=2025-11-10T01:52:32.643Z level=INFO msg="Accepting new TCP face" tag="tcp-listener (tcp4://0.0.0.0:6364)" uri=tcp4://10.202.0.28:45172
    

How do I debug it? I have no idea where to look at.

  • ndnd-1 config:
    dv:
      network: /test1
      router: /test1/test1-dhl4n
      keychain: dir:///etc/ndn/keys
      trust_anchors:
      - /test1/KEY/%2C%02%B23%27%FC%F9%08/NA/v=1762659611498
      - /test2/KEY/%7DI%CFi%B6%CD%AC%CF/NA/v=1762659753379
    fw:
      core:
        log_level: INFO
      faces:
        queue_size: 1024
        congestion_marking: true
        lock_threads_to_cores: false
        udp:
          enabled_unicast: true
          enabled_multicast: false
          port_unicast: 6363
          lifetime: 600
          default_mtu: 1420
        tcp:
          enabled: true
          port_unicast: 6364
          lifetime: 600
          reconnect_interval: 10
        unix:
          enabled: true
          socket_path: /run/ndnd/test1.sock
        websocket:
          enabled: false
          bind: ''
          port: 9696
          tls_enabled: false
      fw:
        threads: 8
        queue_size: 1024
        lock_threads_to_cores: false
      mgmt:
        allow_localhop: false
  • ndnd-2 config
    dv:
      network: /test2
      router: /test2/test2-4bt4l
      keychain: dir:///etc/ndn/keys
      trust_anchors:
      - /test1/KEY/%2C%02%B23%27%FC%F9%08/NA/v=1762659611498
      - /test2/KEY/%7DI%CFi%B6%CD%AC%CF/NA/v=1762659753379
    fw:
      core:
        log_level: INFO
      faces:
        queue_size: 1024
        congestion_marking: true
        lock_threads_to_cores: false
        udp:
          enabled_unicast: true
          enabled_multicast: false
          port_unicast: 6363
          lifetime: 600
          default_mtu: 1420
        tcp:
          enabled: false
          port_unicast: 6363
          lifetime: 600
          reconnect_interval: 10
        unix:
          enabled: true
          socket_path: /run/ndnd/test2.sock
        websocket:
          enabled: false
          bind: ''
          port: 9696
          tls_enabled: false
      fw:
        threads: 8
        queue_size: 1024
        lock_threads_to_cores: false
      mgmt:
        allow_localhop: false

The ndnd version is efc6b86

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions