Skip to content

Problem: Ping-Probe from docs throws permission error? #1240

Closed

Description

@NiceRath

Greetings.

I just started playing around with your tool for more insight into network-hickups.

When I download (or make) the latest (or previous) version and supply the ping-probe as seen in the docs I get a permission error.

Maybe I overlooked something in the docs? But I would assume that a probe that simple would result in a very common error - that might give the user some more context on how to solve the problem (:

Config:

probe {
  name: "ping_dns"
  type: PING
  targets {
    host_names: "8.8.8.8,1.1.1.1"
  }
  interval: "5s"
}

Run / Error:

./cloudprober --config_file test.cfg
time=2026-03-11T15:44:46.224+01:00 level=INFO source=prober/prober.go:119 msg="Creating a PING probe: ping_dns" system=cloudprober component=global
time=2026-03-11T15:44:46.224+01:00 level=ERROR+4 source=cmd/cloudprober/main.go:157 msg="Error initializing cloudprober. Err: error while adding probe 'ping_dns': rpc error: code = Unknown desc = socket: permission denied" system=cloudprober component=global

Setting the raw-net capability seems to change nothing:

sudo setcap cap_net_raw+ep ./cloudprober

System:

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

uname -a
Linux flow 6.1.0-43-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.162-1 (2026-02-08) x86_64 GNU/Linux

Activity

  1. manugarg commented on Mar 11, 2026

    @manugarg
    Contributor

    Hi @NiceRath, ping probe is kind of tricky as it requires additional setup/config on Linux systems:
    https://cloudprober.org/docs/config/latest/probes/#cloudprober_probes_ping_ProbeConf

    If you're relying on RAW capability, you should set use_datagram_socket: false in probe config.

    Note to self: improve error message and update documentation.

  2. NiceRath commented on Mar 12, 2026

    @NiceRath
    Author

    Thank you for the fast reply 🙏
    Ah okay - I did not realize that use_datagram_socket: false has to be set 👍

  3. manugarg commented on Mar 16, 2026

    @manugarg
    Contributor
  4. manugarg commented on Mar 16, 2026

    @manugarg
    Contributor

    Improved the error message itself: #1252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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