Skip to content

Error-running-scanner #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sean12345-1 opened this issue May 23, 2025 · 8 comments
Closed

Error-running-scanner #117

sean12345-1 opened this issue May 23, 2025 · 8 comments

Comments

@sean12345-1
Copy link

The issue is when the heart beat starts the logs state that it is running scanner and then immediately in the next line states there was an error running the scanner. I have built this all new over the past two weeks with Netbox-Docker and the diode server. There is however another thing I noticed there is no Ingestion-logs showing on the netbox web page. There is however the settings and a way to create clients which I tested them with the ORB agent and it authenticated correctly.

@leoparente
Copy link
Contributor

Hi @sean12345-1 thanks for the report. Can you share your orb-agent logs?

Regarding Diode plugin, the ingestion logs page was removed in V1.0. The current way to keep track of that is to look into diode-reconciler container logs ;

@sean12345-1
Copy link
Author

Hello @leoparente I have attached the logs.
Contains configuration argument parameter
Setting default_pcap as visor tap
Running with config file parameter
Starting orb-agent : /usr/local/bin/orb-agent with args 3
{"time":"2025-05-23T21:21:21.435438428Z","level":"INFO","msg":"backends loaded","backends":{"common":{"diode":{"agent_name":"my-agent-003","client_id":"${DIODE_CLIENT_ID}","client_secret":"${DIODE_CLIENT_SECRET}","target":"grpc:///diode"}},"network_discovery":null}}
{"time":"2025-05-23T21:21:21.435546784Z","level":"INFO","msg":"no secrets manager specified or invalid type, skipping"}
{"time":"2025-05-23T21:21:21.435573913Z","level":"INFO","msg":"agent started","version":"v2.0.0","routine":"agentRoutine"}
{"time":"2025-05-23T21:21:21.435578243Z","level":"INFO","msg":"requested backends","values":{"common":{"diode":{"agent_name":"my-agent-003","client_id":"${DIODE_CLIENT_ID}","client_secret":"${DIODE_CLIENT_SECRET}","target":"grpc:///diode"}},"network_discovery":null}}
{"time":"2025-05-23T21:21:21.435590065Z","level":"INFO","msg":"registered backends","values":["network_discovery","worker","pktvisor","otel","device_discovery"]}
{"time":"2025-05-23T21:21:21.435678994Z","level":"INFO","msg":"network-discovery startup","arguments":["--host","localhost","--port","8073","--diode-target","grpc:///diode","--diode-client-id","${DIODE_CLIENT_ID}","--diode-client-secret","********","--diode-app-name-prefix","my-agent-003"]}
{"time":"2025-05-23T21:21:21.585083668Z","level":"INFO","msg":"network-discovery stdout","log":"time=2025-05-23T21:21:21.584Z level=INFO msg="starting network-discovery server at: localhost:8073""}
{"time":"2025-05-23T21:21:22.436016276Z","level":"INFO","msg":"network-discovery process started","pid":18}
{"time":"2025-05-23T21:21:22.437496156Z","level":"INFO","msg":"network-discovery readiness ok, got version ","network_discovery_version":"1.2.0"}
{"time":"2025-05-23T21:21:22.4375246Z","level":"INFO","msg":"managing agent policy from core","action":"manage","name":"discovery_1","dataset":"fddca6bd-eb28-4ae9-a089-de731d62191b","backend":"network_discovery","id":"28bbc0b2-2539-501e-97b0-3a6d1882b89f","version":1}
{"time":"2025-05-23T21:21:22.438127819Z","level":"INFO","msg":"network-discovery stdout","log":"time=2025-05-23T21:21:22.438Z level=INFO msg="policies started" policies=[discovery_1]"}
{"time":"2025-05-23T21:21:22.438245926Z","level":"INFO","msg":"policy applied successfully","policy_id":"28bbc0b2-2539-501e-97b0-3a6d1882b89f","policy_name":"discovery_1"}
{"time":"2025-05-23T21:21:22.438265666Z","level":"INFO","msg":"heartbeat routine started"}
{"time":"2025-05-23T21:22:00.014262601Z","level":"INFO","msg":"network-discovery stdout","log":"time=2025-05-23T21:22:00.014Z level=INFO msg="running scanner" targets=[] policy=discovery_1"}
{"time":"2025-05-23T21:22:00.066114881Z","level":"INFO","msg":"network-discovery stdout","log":"time=2025-05-23T21:22:00.065Z level=ERROR msg="error running scanner" error="exit status 1" policy=discovery_1"}

@sean12345-1
Copy link
Author

After some review I am going to assume that my issue is with the diode-sdk-go. I installed it I think though there isn't a straight forward guide on how to set this up.

@leoparente
Copy link
Contributor

Hi @sean12345-1 the issue is happening when you ran the network discovery which is a wrapper over nmap. Can you share your docker run command and your config.yaml. Please, anonymise data if needed.

@sean12345-1
Copy link
Author

sean12345-1 commented May 28, 2025

Hello @leoparente the following is the podman run and the agent.yaml file.

podman run --net=host -v /opt/orb:/opt/orb/ -e DIODE_CLIENT_ID=my-agent-003-4fd353635ab6ba57 -e DIODE_CLIENT_SECRET= netboxlabs/orb-agent:develop run -c /opt/orb/orb/agent.yaml

orb:

config_manager:

active: local

backends:

network_discovery:

common:

  diode:

    target: grpc://<removed>/diode

    agent_name: my-agent-003

    client_id: ${DIODE_CLIENT_ID}

    client_secret: ${DIODE_CLIENT_SECRET}

policies:

network_discovery:

  discovery_1:

    config:

      schedule: "* * * * *"

      timeout: 5

      defaults:

        comments: none

        description: IP discovered by network discovery

        tags: [net-discovery, orb-agent]

    scope:

      targets: [<removed>]

      fast_mode: True

@leoparente
Copy link
Contributor

hi @sean12345-1 your command and config seem correct. Based on the logs, nmap is exiting:

{"time":"2025-05-23T21:22:00.066114881Z","level":"INFO","msg":"network-discovery stdout","log":"time=2025-05-23T21:22:00.065Z level=ERROR msg="error running scanner" error="exit status 1" policy=discovery_1"}

what you can try to check what may be happening is to access the container and try to run directly the nmap to see if it works or have same behavior

inside the container:

container@ ~ nmap -F <target>

@sean12345-1
Copy link
Author

@leoparente thank you for all your assistance after I looked into the container and resolved the nmap access issue the ip discovery worked just fine besides making the ip /32 when it isn't. I see there is another thread on that.

@leoparente
Copy link
Contributor

hi @sean12345-1 great! We will be working on a feature to no apply /32 everytime. we can do the follow up on that in the other ticket #111. I will close this one for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants