Skip to content

ERROR: bad argument type for built-in operation #55

Open
@ctark

Description

@ctark

Hello Team!

Thank you for the constant work on this project. Please let me know if you have any ideas on the below, or would like me to test anything!

I am currently using the develop docker branch, and am receiving the following error:
{"level":"info","ts":"2025-01-24T10:35:41.285-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"ERROR:device_discovery.policy.runner:Policy discovery_1, Hostname 192.168.99.5: bad argument type for built-in operation"}

Agent.yaml: (with api, username and password changed)

orb:
  config_manager:
    active: local
  backends:
    device_discovery:
    common:
      diode:
        target: grpc://192.168.1.221:8080/diode
        api_key: apikey
        agent_name: agent1
  policies:
    device_discovery:
      discovery_1:
        scope:
          - driver: ros
            hostname: 192.168.99.5
            username: username
            password: password

docker log: (error is 2nd last line)

Contains default config file
Setting default_pcap as visor tap
26 is not running
Installing additional drivers
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: librouteros==3.2.0 in /home/appuser/.local/lib/python3.12/site-packages (from -r /opt/orb/drivers.txt (line 1)) (3.2.0)
Requirement already satisfied: napalm-ros in /home/appuser/.local/lib/python3.12/site-packages (from -r /opt/orb/drivers.txt (line 2)) (1.2.6)
Requirement already satisfied: napalm<5.0.0,>=4.0.0 in /home/appuser/.local/lib/python3.12/site-packages (from napalm-ros->-r /opt/orb/drivers.txt (line 2)) (4.1.0)
....
....
Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.12/site-packages (from markdown-it-py>=2.2.0->rich>=13.8->netmiko>=4.1.0->napalm<5.0.0,>=4.0.0->napalm-ros->-r /opt/orb/drivers.txt (line 2)) (0.1.2)
Contains default config file
Setting default_pcap as visor tap
Running with config file parameter
Starting orb-agent : /usr/local/bin/orb-agent with args 3
{"level":"info","ts":"2025-01-24T10:35:37.906-0500","caller":"cmd/main.go:82","msg":"backends loaded","backends":{"common":{"diode":{"agent_name":"agent1","api_key":"c0bfff6561d3463bc0848a5b6c6b52cc12e15582","target":"grpc://192.168.1.221:8080/diode"}},"device_discovery":{"host":"localhost","port":"8072"}}}
{"level":"info","ts":"2025-01-24T10:35:37.906-0500","caller":"agent/agent.go:173","msg":"agent started","version":"v1.0.1","routine":"agentRoutine"}
{"level":"info","ts":"2025-01-24T10:35:37.906-0500","caller":"agent/agent.go:109","msg":"registered backends","values":["pktvisor","otel","device_discovery","network_discovery","worker"]}
{"level":"info","ts":"2025-01-24T10:35:37.906-0500","caller":"agent/agent.go:110","msg":"requested backends","values":{"common":{"diode":{"agent_name":"agent1","api_key":"c0bfff6561d3463bc0848a5b6c6b52cc12e15582","target":"grpc://192.168.1.221:8080/diode"}},"device_discovery":{"host":"localhost","port":"8072"}}}
{"level":"info","ts":"2025-01-24T10:35:37.906-0500","caller":"devicediscovery/device_discovery.go:116","msg":"device-discovery startup","arguments":["--host","localhost","--port","8072","--diode-target","grpc://192.168.1.221:8080/diode","--diode-api-key","********","--diode-app-name-prefix","agent1"]}
{"level":"info","ts":"2025-01-24T10:35:38.907-0500","caller":"devicediscovery/device_discovery.go:170","msg":"device-discovery process started","pid":24}
{"level":"error","ts":"2025-01-24T10:35:38.908-0500","caller":"devicediscovery/utils.go:61","msg":"received error from payload","error":"Get \"http://localhost:8072/api/v1/status\": dial tcp [::1]:8072: connect: connection refused"}
{"level":"info","ts":"2025-01-24T10:35:38.908-0500","caller":"devicediscovery/device_discovery.go:180","msg":"device-discovery is not ready, trying again with backoff","backoff backoffDuration":"0s"}
{"level":"error","ts":"2025-01-24T10:35:38.909-0500","caller":"devicediscovery/utils.go:61","msg":"received error from payload","error":"Get \"http://localhost:8072/api/v1/status\": dial tcp [::1]:8072: connect: connection refused"}
{"level":"info","ts":"2025-01-24T10:35:38.909-0500","caller":"devicediscovery/device_discovery.go:180","msg":"device-discovery is not ready, trying again with backoff","backoff backoffDuration":"1s"}
{"level":"info","ts":"2025-01-24T10:35:39.262-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:     Started server process [24]"}
{"level":"info","ts":"2025-01-24T10:35:39.262-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:     Waiting for application startup."}
{"level":"info","ts":"2025-01-24T10:35:39.262-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:     Application startup complete."}
{"level":"info","ts":"2025-01-24T10:35:39.265-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:     Uvicorn running on http://localhost:8072 (Press CTRL+C to quit)"}
{"level":"info","ts":"2025-01-24T10:35:39.924-0500","caller":"devicediscovery/device_discovery.go:141","msg":"device-discovery stdout","log":"INFO:     ::1:60194 - \"GET /api/v1/status HTTP/1.1\" 200 OK"}
{"level":"info","ts":"2025-01-24T10:35:39.925-0500","caller":"devicediscovery/device_discovery.go:176","msg":"device-discovery readiness ok, got version ","device_discovery_version":"0.4.1"}
{"level":"info","ts":"2025-01-24T10:35:39.925-0500","caller":"policyMgr/manager.go:54","msg":"managing agent policy from core","action":"manage","name":"discovery_1","dataset":"b67d096e-ead5-4c1e-8c80-629d293394ea","backend":"device_discovery","id":"","version":1}
{"level":"info","ts":"2025-01-24T10:35:39.927-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:apscheduler.scheduler:Scheduler started"}
{"level":"info","ts":"2025-01-24T10:35:39.928-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:device_discovery.policy.runner:Policy discovery_1, Hostname 192.168.99.5: One-time run"}
{"level":"info","ts":"2025-01-24T10:35:39.928-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:apscheduler.scheduler:Added job \"PolicyRunner.run\" to job store \"default\""}
{"level":"info","ts":"2025-01-24T10:35:39.929-0500","caller":"devicediscovery/device_discovery.go:141","msg":"device-discovery stdout","log":"INFO:     ::1:60194 - \"POST /api/v1/policies HTTP/1.1\" 201 Created"}
{"level":"info","ts":"2025-01-24T10:35:39.929-0500","caller":"policyMgr/manager.go:206","msg":"policy applied successfully","policy_id":"","policy_name":"discovery_1"}
{"level":"info","ts":"2025-01-24T10:35:39.930-0500","caller":"agent/agent.go:199","msg":"heartbeat routine started"}
{"level":"info","ts":"2025-01-24T10:35:40.929-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:apscheduler.executors.default:Running job \"PolicyRunner.run (trigger: date[2025-01-24 10:35:40 EST], next run at: 2025-01-24 10:35:40 EST)\" (scheduled at 2025-01-24 10:35:40.928481-05:00)"}
{"level":"info","ts":"2025-01-24T10:35:40.930-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:apscheduler.scheduler:Removed job d8c267ab-7a50-4d02-be67-a3287d03483c"}
{"level":"info","ts":"2025-01-24T10:35:40.930-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:device_discovery.policy.runner:Policy discovery_1, Hostname 192.168.99.5: Get driver 'ros'"}
{"level":"info","ts":"2025-01-24T10:35:40.941-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:device_discovery.policy.runner:Policy discovery_1, Hostname 192.168.99.5: Getting information"}
{"level":"info","ts":"2025-01-24T10:35:41.285-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"ERROR:device_discovery.policy.runner:Policy discovery_1, Hostname 192.168.99.5: bad argument type for built-in operation"}
{"level":"info","ts":"2025-01-24T10:35:41.286-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"INFO:apscheduler.executors.default:Job \"PolicyRunner.run (trigger: date[2025-01-24 10:35:40 EST], next run at: 2025-01-24 10:35:40 EST)\" executed successfully"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions