perfsonar / toolkit

perfSONAR Toolkit distribution environment scripts and GUI
Apache License 2.0
30 stars 5 forks source link

ping tool not found for installation (although installed) #445

Closed szymontrocha closed 6 months ago

szymontrocha commented 9 months ago

Reported by a user but I can confirm it with Ubuntu Ubuntu 20.04.6 LTS

Toolkit 5.0.5

# ping loopback

Command 'ping' not found, but can be installed with:

apt install iputils-ping    # version 3:20190709-3, or
apt install inetutils-ping  # version 2:1.9.4-11ubuntu0.2

# pscheduler task rtt --dest 150.254.173.3
Submitting task...
Task URL:
https://pssmall/pscheduler/tasks/cadcbc24-0c5a-4c53-a7b1-21a36839f4c7
Running with tool 'ping'
Fetching first run...

Next scheduled run:
https://pssmall/pscheduler/tasks/cadcbc24-0c5a-4c53-a7b1-21a36839f4c7/runs/9af79442-c02f-4529-86d2-aa8c918b9513
Starts 2023-10-09T11:01:44+00:00 (~3 seconds)
Ends   2023-10-09T11:01:55+00:00 (~10 seconds)
Waiting for result...

Run failed.

Limit system diagnostics for this run:
  Hints:
    requester: 127.0.0.1
    server: 127.0.1.1
  Identified as everybody, local-interfaces
  Classified as default, friendlies
  Application: Hosts we trust to do everything
    Group 1: Limit 'always' passed
    Group 1: Want all, 1/1 passed, 0/1 failed: PASS
    Application PASSES
  Passed one application.  Stopping.
  Proposal meets limits
  Priority set at 0:
    Initial priority  (Set to 0)

Error from pssmall:
  FileNotFoundError: [Errno 2] No such file or directory: 'ping'
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/pscheduler/program.py", line 182, in run_program
      process = __get_process(argv, new_env, attempts)
    File "/usr/lib/python3/dist-packages/pscheduler/program.py", line 174, in __get_process
      raise ex
    File "/usr/lib/python3/dist-packages/pscheduler/program.py", line 164, in __get_process
      return subprocess.Popen(argv,
    File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  FileNotFoundError: [Errno 2] No such file or directory: 'ping'

Diagnostics from pssmall:
  ping -n -c 5 -i 1.0 -W 1.0 150.254.173.3

No further runs scheduled.
#
# pscheduler troubleshoot
Performing basic troubleshooting of pssmall.

pssmall:

  Measuring MTU... 65535 (Local)
  Looking for pScheduler... OK.
  Fetching API level... 5
  Checking clock... OK.
  Exercising API... Archivers... Contexts... Tests... Tools... OK.
  Fetching service status... OK.
  Checking services... Ticker... Scheduler... Runner... Archiver... OK.
  Checking limits... OK.
  Idle test.... 9 seconds... Finished... Checking archiving... OK.

pScheduler appears to be functioning normally.

# which ping
# apt list --installed | grep ping

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

iputils-ping/focal,now 3:20190709-3 amd64 [installed,automatic]
pscheduler-tool-halfping/perfsonar-release,now 5.0.5-1 all [installed,automatic]
pscheduler-tool-owping/perfsonar-release,now 5.0.5-1 all [installed,automatic]
pscheduler-tool-ping/perfsonar-release,now 5.0.5-1 all [installed,automatic]
pscheduler-tool-tcpping/perfsonar-release,now 5.0.5-1 all [installed,automatic]
pscheduler-tool-twping/perfsonar-release,now 5.0.5-1 all [installed,automatic]
tcpping/perfsonar-release,now 0.1-1 all [installed,automatic]
#
laeti-tia commented 7 months ago

I think that what happens is the following. The upgrade process from 5.0.x to 5.0.5 removes the ping executable when paris-traceroute is automatically removed. But an install of 5.0.5 or higher provides the ping executable through the regular ip-utils package. This is because both package provide the ping executable at the exact same location /usr/bin/ping

I think the conclusion of this is twofold:

arlake228 commented 6 months ago

Added FAQ here: https://docs.perfsonar.net/FAQ.html#q-why-can-t-my-debian-ubuntu-host-find-ping