Skip to content

DiscoverySubnets are empty!" #432

@outbackdingo

Description

@outbackdingo

Hi we started looking at edgex again to see if its come any further for onvif, previously, the hkvision camera we had weas discovered with jakarta some noths ago, then we dropped the project, well its back now however with napa we get the following error. and tyhe camera is not found. We used tui-generator for a simple onvif and mqtt exporter, the following docker compose was created

services:
  app-http-export:
    container_name: edgex-app-http-export
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
    environment:
      EDGEX_PROFILE: http-export
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-app-http-export
      WRITABLE_LOGLEVEL: INFO
      WRITABLE_PIPELINE_FUNCTIONS_HTTPEXPORT_PARAMETERS_URL: http://EXPORT_HOST_PLACE_HOLDER:7770
    hostname: edgex-app-http-export
    image: edgexfoundry/app-service-configurable:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59704
        published: "59704"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  app-metrics-influxdb:
    container_name: edgex-app-metrics-influxdb
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
    environment:
      EDGEX_PROFILE: metrics-influxdb
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-app-metrics-influxdb
    hostname: edgex-app-metrics-influxdb
    image: edgexfoundry/app-service-configurable:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59707
        published: "59707"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  app-mqtt-export:
    container_name: edgex-app-mqtt-export
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
    environment:
      EDGEX_PROFILE: mqtt-export
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-app-mqtt-export
      WRITABLE_LOGLEVEL: INFO
      WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_BROKERADDRESS: MQTT_BROKER_ADDRESS_PLACE_HOLDER
      WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_TOPIC: edgex-events
    hostname: edgex-app-mqtt-export
    image: edgexfoundry/app-service-configurable:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59703
        published: "59703"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  app-record-replay:
    container_name: edgex-app-record-replay
    depends_on:
      consul:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-app-record-replay
    hostname: edgex-app-record-replay
    image: edgexfoundry/app-record-replay:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59712
        published: "59712"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  app-rules-engine:
    container_name: edgex-app-rules-engine
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
    environment:
      EDGEX_PROFILE: rules-engine
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-app-rules-engine
    hostname: edgex-app-rules-engine
    image: edgexfoundry/app-service-configurable:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59701
        published: "59701"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  consul:
    command:
      - agent
      - -ui
      - -bootstrap
      - -server
      - -client
      - 0.0.0.0
    container_name: edgex-core-consul
    hostname: edgex-core-consul
    image: hashicorp/consul:1.16.2
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 8500
        published: "8500"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: root:root
    volumes:
      - type: volume
        source: consul-config
        target: /consul/config
        volume: {}
      - type: volume
        source: consul-data
        target: /consul/data
        volume: {}
  core-command:
    container_name: edgex-core-command
    depends_on:
      consul:
        condition: service_started
        required: true
      core-metadata:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      EXTERNALMQTT_URL: tcp://edgex-mqtt-broker:1883
      SERVICE_HOST: edgex-core-command
    hostname: edgex-core-command
    image: edgexfoundry/core-command:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59882
        published: "59882"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  core-common-config-bootstrapper:
    container_name: edgex-core-common-config-bootstrapper
    depends_on:
      consul:
        condition: service_started
        required: true
    environment:
      ALL_SERVICES_DATABASE_HOST: edgex-redis
      ALL_SERVICES_MESSAGEBUS_AUTHMODE: none
      ALL_SERVICES_MESSAGEBUS_HOST: edgex-mqtt-broker
      ALL_SERVICES_MESSAGEBUS_PORT: "1883"
      ALL_SERVICES_MESSAGEBUS_PROTOCOL: tcp
      ALL_SERVICES_MESSAGEBUS_TYPE: mqtt
      ALL_SERVICES_REGISTRY_HOST: edgex-core-consul
      APP_SERVICES_CLIENTS_CORE_METADATA_HOST: edgex-core-metadata
      DEVICE_SERVICES_CLIENTS_CORE_METADATA_HOST: edgex-core-metadata
      EDGEX_SECURITY_SECRET_STORE: "false"
    hostname: edgex-core-common-config-bootstrapper
    image: edgexfoundry/core-common-config-bootstrapper:3.1.0
    networks:
      edgex-network: null
    read_only: true
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  core-data:
    container_name: edgex-core-data
    depends_on:
      consul:
        condition: service_started
        required: true
      core-metadata:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-core-data
    hostname: edgex-core-data
    image: edgexfoundry/core-data:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59880
        published: "59880"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  core-metadata:
    container_name: edgex-core-metadata
    depends_on:
      consul:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-core-metadata
    hostname: edgex-core-metadata
    image: edgexfoundry/core-metadata:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59881
        published: "59881"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  database:
    container_name: edgex-redis
    hostname: edgex-redis
    image: redis:7.0.14-alpine
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 6379
        published: "6379"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: root:root
    volumes:
      - type: volume
        source: db-data
        target: /data
        volume: {}
  device-onvif-camera:
    container_name: edgex-device-onvif-camera
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
      core-metadata:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-device-onvif-camera
    hostname: edgex-device-onvif-camera
    image: edgexfoundry/device-onvif-camera:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59984
        published: "59984"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  device-rest:
    container_name: edgex-device-rest
    depends_on:
      consul:
        condition: service_started
        required: true
      core-data:
        condition: service_started
        required: true
      core-metadata:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-device-rest
    hostname: edgex-device-rest
    image: edgexfoundry/device-rest:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59986
        published: "59986"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  mqtt-broker:
    command:
      - /usr/sbin/mosquitto
      - -c
      - /mosquitto-no-auth.conf
    container_name: edgex-mqtt-broker
    hostname: edgex-mqtt-broker
    image: eclipse-mosquitto:2.0.18
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 1883
        published: "1883"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
  rules-engine:
    container_name: edgex-kuiper
    depends_on:
      database:
        condition: service_started
        required: true
      mqtt-broker:
        condition: service_started
        required: true
    environment:
      CONNECTION__EDGEX__MQTTMSGBUS__OPTIONAL__CLIENTID: kuiper-rules-engine
      CONNECTION__EDGEX__MQTTMSGBUS__OPTIONAL__KEEPALIVE: "500"
      CONNECTION__EDGEX__MQTTMSGBUS__PORT: "1883"
      CONNECTION__EDGEX__MQTTMSGBUS__PROTOCOL: tcp
      CONNECTION__EDGEX__MQTTMSGBUS__SERVER: edgex-mqtt-broker
      CONNECTION__EDGEX__MQTTMSGBUS__TYPE: mqtt
      CONNECTION__EDGEX__REDISMSGBUS__PORT: "6379"
      CONNECTION__EDGEX__REDISMSGBUS__PROTOCOL: redis
      CONNECTION__EDGEX__REDISMSGBUS__SERVER: edgex-redis
      CONNECTION__EDGEX__REDISMSGBUS__TYPE: redis
      EDGEX__DEFAULT__OPTIONAL__CLIENTID: kuiper-rules-engine
      EDGEX__DEFAULT__OPTIONAL__KEEPALIVE: "500"
      EDGEX__DEFAULT__PORT: "1883"
      EDGEX__DEFAULT__PROTOCOL: tcp
      EDGEX__DEFAULT__SERVER: edgex-mqtt-broker
      EDGEX__DEFAULT__TOPIC: edgex/rules-events
      EDGEX__DEFAULT__TYPE: mqtt
      KUIPER__BASIC__CONSOLELOG: "true"
      KUIPER__BASIC__RESTPORT: "59720"
    hostname: edgex-kuiper
    image: lfedge/ekuiper:1.11.4-alpine
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59720
        published: "59720"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: kuiper:kuiper
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
      - type: volume
        source: kuiper-data
        target: /kuiper/data
        volume: {}
      - type: volume
        source: kuiper-etc
        target: /kuiper/etc
        volume: {}
      - type: volume
        source: kuiper-log
        target: /kuiper/log
        volume: {}
      - type: volume
        source: kuiper-plugins
        target: /kuiper/plugins
        volume: {}
  support-notifications:
    container_name: edgex-support-notifications
    depends_on:
      consul:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-support-notifications
    hostname: edgex-support-notifications
    image: edgexfoundry/support-notifications:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59860
        published: "59860"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  support-scheduler:
    container_name: edgex-support-scheduler
    depends_on:
      consul:
        condition: service_started
        required: true
      database:
        condition: service_started
        required: true
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      INTERVALACTIONS_SCRUBAGED_HOST: edgex-core-data
      INTERVALACTIONS_SCRUBPUSHED_HOST: edgex-core-data
      SERVICE_HOST: edgex-support-scheduler
    hostname: edgex-support-scheduler
    image: edgexfoundry/support-scheduler:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        host_ip: 127.0.0.1
        target: 59861
        published: "59861"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
  ui:
    container_name: edgex-ui-go
    environment:
      EDGEX_SECURITY_SECRET_STORE: "false"
      SERVICE_HOST: edgex-ui-go
    hostname: edgex-ui-go
    image: edgexfoundry/edgex-ui:3.1.0
    networks:
      edgex-network: null
    ports:
      - mode: ingress
        target: 4000
        published: "4000"
        protocol: tcp
    read_only: true
    restart: always
    security_opt:
      - no-new-privileges:true
    user: 2002:2001
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
networks:
  edgex-network:
    name: edgex_edgex-network
    driver: bridge
volumes:
  consul-config:
    name: edgex_consul-config
  consul-data:
    name: edgex_consul-data
  db-data:
    name: edgex_db-data
  kuiper-data:
    name: edgex_kuiper-data
  kuiper-etc:
    name: edgex_kuiper-etc
  kuiper-log:
    name: edgex_kuiper-log
  kuiper-plugins:
    name: edgex_kuiper-plugins

it comes up fine, yet no cameras are found there are 2 on the network, we checked the container logs

level=INFO ts=2024-03-27T04:35:01.803920868Z app=device-onvif-camera source=checkstatuses.go:186 msg="Starting task loop."
level=INFO ts=2024-03-27T04:35:01.803945128Z app=device-onvif-camera source=autodiscovery.go:46 msg="Starting auto-discovery with duration 1h0m0s"
level=INFO ts=2024-03-27T04:35:01.803968779Z app=device-onvif-camera source=driver.go:290 msg="Discover was called."
level=INFO ts=2024-03-27T04:35:02.804848982Z app=device-onvif-camera source=driver.go:334 msg="Discovered 0 device(s) in 1.000853586s via multicast."
level=WARN ts=2024-03-27T04:35:02.804900732Z app=device-onvif-camera source=driver.go:352 msg="netscan discovery was called, but DiscoverySubnets are empty!"

simply put we want to utilize edge to discover onvif devices in the environment and export their feeds via mqtt to mainflux, any help is appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions