"Waiting for an action server to become available" in ros2 action send_goal, and rclpy action results that never arrive: causes and fixes, measured
When ros2 action send_goal prints the waiting line below and nothing after it, the client can't see a server with that exact name, type and ROS_DOMAIN_ID, so copy the name and type from ros2 action list -t and add --timeout. I ran every case in this post on 2026-11-02 in the official ros:humble-ros-base, ros:jazzy-ros-base and ros:lyrical-ros-base images, one distro at a time.
$ ros2 action send_goal /fibonacci example_interfaces/action/Fibonacci "{order: 5}"
Waiting for an action server to become available...
The CLI prints this line every time, even when the server is up, so it only means something when nothing follows it. By default the client then waits forever. I stopped it after 60 seconds and it was still waiting. In Python the same problem shows up as ActionClient.wait_for_server() returning False, or as a goal or result future that never completes.
Check what the graph has, then copy the name and type from it:
ros2 action list -t
ros2 action info /fibonacci -t
ros2 action send_goal /fibonacci example_interfaces/action/Fibonacci "{order: 5}" --timeout 10
--timeout N (short form -t N) was in ros2 action send_goal on Humble, Jazzy and Lyrical in the images I tested. It turns an endless wait into Action server is not available after waiting 3 seconds. or Timed out waiting for result after 5 seconds. The exit code was 0 in both cases, so scripts have to read the text. In rclpy, spin the node while you wait, and don't block inside a callback on a single-threaded executor. That deadlocked every time.

Match what send_goal printed to a cause
Every row behaved the same on Humble, Jazzy and Lyrical unless the distro differences section says otherwise. "Hangs" means the command was still waiting when I killed it.
| Cause | What send_goal printed | What the graph showed |
|---|---|---|
| No server running | Waiting for an action server..., then hangs (60 s, still waiting) |
ros2 action info /fibonacci -t: Action servers: 0 |
Wrong name (server is /fibonacci_as) |
Waiting line, then hangs | ros2 action list -t: /fibonacci_as [example_interfaces/action/Fibonacci] |
Server in namespace /robot1 |
Waiting line, then hangs | /robot1/fibonacci [example_interfaces/action/Fibonacci] |
Wrong but existing type (tf2_msgs/action/LookupTransform) |
Waiting line, then hangs | The list shows the right name with the real type in brackets |
| Misspelled type, or its package not installed | The passed action type is invalid, exit 1, under 0.6 s |
Not relevant, nothing is sent |
Goal field that doesn't exist ({orders: 5}) |
Failed to populate message fields: AttributeError("'Fibonacci_Goal' object has no attribute 'orders'"), exit 1 |
Not relevant |
Server on ROS_DOMAIN_ID=7, client on the default |
Waiting line, then hangs. Same in one container and across two containers | ros2 action list -t empty, Action servers: 0 |
| Server created, but its node never spins | Waiting line, Sending goal:, then hangs |
Listed normally, Action servers: 1 |
| Server rejects the goal | Goal was rejected., exit 0 |
Listed normally |
| Server killed after accepting the goal | Goal accepted with ID: ..., then hangs (40 s, still waiting) |
Gone once discovery notices |
The "never spins" row is the one that confuses people. Discovery is done by the middleware, so the server looks healthy in every CLI tool, but nobody answers the goal request. If ros2 action info shows your server and the client still stalls after Sending goal:, look at the server's executor.
Test setup: three ros-base images and a Fibonacci server
On 2026-11-02 I used the official ros:humble-ros-base, ros:jazzy-ros-base and ros:lyrical-ros-base images on a 2 vCPU Linux host, one distro at a time. None of the three ros-base images ships example_interfaces. The only action type in them was tf2_msgs/action/LookupTransform, so the script installs ros-<distro>-example-interfaces first. Before that install, send_goal with example_interfaces/action/Fibonacci printed The passed action type is invalid.
The server is a small rclpy Fibonacci action server on a MultiThreadedExecutor. It can accept, reject, abort or run slowly (1 s per step) so it can be canceled or killed mid-goal. The client is a short rclpy script with a few modes. Each case ran the CLI under timeout so a hang ends and gets measured. For the domain test, I also ran server and client in two separate containers on the default Docker bridge network.
send_goal waits forever unless you pass --timeout
With no server, ros2 action send_goal printed one Waiting for an action server to become available... line and nothing else for 60 seconds. It doesn't repeat the line, so a 10-second run also showed exactly one. When timeout sent SIGTERM, it printed Failed to check if action server is available: rcl node's context is invalid, at ./src/rcl/node.c:428 (the line number differs per distro). That message is about the shutdown. It isn't the cause. Ctrl+C (SIGINT) exited with code 2 and printed nothing extra.
With --timeout 3 it gave up after 3.47 to 3.57 s with Action server is not available after waiting 3 seconds. and exit code 0. The rclpy equivalent behaves as documented. wait_for_server(timeout_sec=0.0) returned False immediately, and 0.5, 2 and 5 seconds returned False after 0.50, 2.00 and 5.00 to 5.01 s.
The waiting line isn't an error in itself. Against a server that was already running, the CLI still printed it once and then Goal accepted 0.57 to 1.05 s after the command started.
Hangs from a wrong name, namespace or remap
Action names follow the same rules as topics. A server created with the relative name fibonacci in a node under /robot1 became /robot1/fibonacci. send_goal /fibonacci hung, and send_goal /robot1/fibonacci succeeded. An rclpy client in the same namespace found it with the relative name fibonacci (True after 0.00 to 2.50 s). The same client with the absolute name /fibonacci returned False after its 3 s timeout.
Remapping is where the distros differed. With the server started as --ros-args -r fibonacci:=fib2, Humble ignored the rule. The action stayed at /fibonacci and the goal succeeded. On Jazzy the list showed /fib2, and /fibonacci hung. On Lyrical /fibonacci also hung. If a launch file remaps an rclpy action server, check ros2 action list on the distro you actually run.
"The passed action type is invalid" vs. a silent type mismatch
The CLI resolves the type locally before it waits. If the type can't be imported (a typo like Fibonaci, or a package that isn't installed or sourced in that shell), you get The passed action type is invalid right away. The type example_interfaces/Fibonacci, without /action/, was accepted and worked.
A type that exists but isn't the server's type is worse. With the server on example_interfaces/action/Fibonacci and the CLI sending tf2_msgs/action/LookupTransform to the same name, the CLI printed the waiting line and hung. There's no "type mismatch" message. ros2 action list -t shows the real type in brackets, so compare it with what you typed.
Different ROS_DOMAIN_ID, in one container or two
A server on ROS_DOMAIN_ID=7 and a client on the default domain don't see each other. ros2 action list -t was empty and send_goal hung. That was true in one container and with two containers on the default bridge network. Setting ROS_DOMAIN_ID=7 in the client container fixed it, and the goal finished in 1.02 to 1.87 s including startup. Check printenv ROS_DOMAIN_ID in both containers, along with their compose files and entrypoints.
How far discovery reaches beyond one machine is measured in ROS 2 nodes can't see each other? ROS_AUTOMATIC_DISCOVERY_RANGE. If the server shows up in ros2 action list from a container on --net=host but nothing arrives, see topic list works but echo prints nothing in Docker (Fast DDS shared memory).
Discovery delay: starting both at once
When the server and send_goal started at the same moment, the server logged ready after 0.38 to 0.50 s, and the CLI reached Goal accepted after 0.54 to 0.97 s (5 runs per distro). An rclpy client started at the same moment saw the server and had its goal accepted after 0.41 to 0.76 s. Discovery delay on one host is under a second. If your client waits longer than a few seconds, the cause is one of the mismatches above, not slow discovery. A fixed sleep before the first goal doesn't help. wait_for_server() with a timeout does the same job and ends sooner.
rclpy: futures that never complete
An rclpy future only completes when an executor processes the response. In the no-spin case, wait_for_server returned True and send_goal_async returned a future. After 5 s of time.sleep it was still done=False. One rclpy.spin_until_future_complete(node, future, timeout_sec=5.0) completed it right away with accepted=True. wait_for_server itself worked without spinning. It returned True in this client and also against the server that never spun.
Inside callbacks it depends on the executor and the callback groups. A timer callback sent the goal and then waited for the result. The executor ran in a thread, and a watchdog gave up after 10 s:
| Pattern in the timer callback | Executor and groups | Result (all three distros) |
|---|---|---|
send_goal_async().add_done_callback(), then get_result_async().add_done_callback(), return at once |
SingleThreadedExecutor |
Worked. Result 0.4 s after the goal |
Busy-wait on the send_goal_async future |
SingleThreadedExecutor |
Deadlock. Still done=False after 8 s |
Blocking ActionClient.send_goal() |
SingleThreadedExecutor |
Deadlock |
Blocking send_goal() |
MultiThreadedExecutor, default group for timer and client |
Deadlock |
Blocking send_goal() |
MultiThreadedExecutor, one ReentrantCallbackGroup for both |
Worked. Returned 2.4 to 3.7 s after the callback started |
Blocking send_goal() |
MultiThreadedExecutor, separate MutuallyExclusiveCallbackGroup for timer and client |
Worked. Returned 1.7 to 3.7 s after the callback started |
A MultiThreadedExecutor alone doesn't fix it. The node's default callback group is mutually exclusive, which fits what I saw: the client's response callbacks can't run while the timer callback in the same group is blocked. They need a group the blocked callback isn't holding. The fully asynchronous version needed neither and was the fastest. The blocking versions took several seconds for a goal that otherwise finished in 0.4 s. I didn't look into why.
Rejected, aborted, canceled, or server gone
Rejected: the CLI printed Goal was rejected. and exited 0 in under a second. In rclpy the goal future completes and goal_handle.accepted is False. Calling get_result_async() on a rejected goal makes no sense, so check accepted first.
Aborted: the CLI printed the partial result and Goal finished with status: ABORTED, exit 0. In rclpy the result arrives normally with status=ABORTED.
Canceled from rclpy: cancel_goal_async() returned return_code=0 and goals_canceling=1. The result came about 0.5 s later with status=CANCELED, on all three distros. The server has to accept the cancel and check is_cancel_requested in its loop. Mine did.
Ctrl+C on the CLI during a goal: on Humble the CLI printed the partial result and Goal finished with status: CANCELED, exit 0. On Jazzy and Lyrical it printed Canceling goal..., then Executor is already spinning, and exited with code 1. The server still received the cancel and canceled the goal. On Lyrical the server also logged RuntimeWarning: failed to send response (timeout): client will not receive response. So on Jazzy and Lyrical the error comes from the CLI's own exit path. The cancel went through.
Server killed with SIGKILL mid-goal: nothing tells the client. The CLI sat after Goal accepted with ID: ... until my 40 s limit. With --timeout 5 it printed Timed out waiting for result after 5 seconds. after 5.73 to 5.83 s, exit 0. In rclpy the result future never completed within 25 s. server_is_ready() stayed True until 22.3 s into the client run, about 19 s after the kill.
Server stopped with SIGTERM mid-goal: server_is_ready() turned False about a second after the signal. The result future still never completed. In both cases the client has to notice on its own, with a timeout on the result or a check on server_is_ready().
Which fix solves which hang
| Fix | Solves | Doesn't solve |
|---|---|---|
Copy name and type from ros2 action list -t |
Wrong name, namespace, remap, wrong type | Domain mismatch, a server that doesn't spin |
Same ROS_DOMAIN_ID on both sides |
Empty list across shells or containers | Anything else |
| Install and source the interface package in the client's shell | The passed action type is invalid |
Typos in the type |
send_goal --timeout N |
Endless waits, for the server and for the result | Nothing about the cause. Exit code stays 0, so parse the text |
wait_for_server(timeout_sec=N) and check the return value |
Endless waits for the server in rclpy | A server that is listed but doesn't spin |
spin_until_future_complete(node, fut, timeout_sec=N) on goal and result |
Futures that never complete when nothing spins, results that never come | Doesn't belong inside a callback |
Chain add_done_callback, never block in a callback |
Deadlocks on any executor | Needs code restructured around callbacks |
MultiThreadedExecutor plus a reentrant or separate callback group |
Blocking send_goal() inside a callback |
Not enough with the default group |
| Spin the server node | Stuck after Sending goal: |
Anything on the client side |
Service calls behave much the same way when the response never comes back. The rclpy asyncio and hung call_async post covers that case.
Where Humble, Jazzy and Lyrical differed
Most results were identical across Humble, Jazzy and Lyrical. These were the differences:
--timeoutwas present on all three. Jazzy and Lyrical also had--stdin. Lyrical's help adds that the timeout "Also applies to goal cancellation if interrupted".-r fibonacci:=fib2on an rclpy action server was ignored on Humble and worked on Jazzy.- Ctrl+C during a goal ended with
CANCELEDand exit 0 on Humble, and withExecutor is already spinningand exit 1 on Jazzy and Lyrical. - The
rcl node's context is invalidline pointed atnode.c:428on Humble,node.c:404on Jazzy andnode.c:409on Lyrical. On Lyrical a killed CLI sometimes also printedfailed to initialize wait set: the given context is not valid. Drop the line numbers when you search. - Discovery was a little slower on Jazzy and Lyrical (CLI goal accepted after 0.89 to 0.97 s) than on Humble (0.54 to 0.80 s).
One thing to watch on Jazzy and Lyrical: right after ros2 daemon stop, the first ros2 action list -t sometimes printed nothing, even though ros2 action info showed the server in the same case. If the list is empty, run it again or check with ros2 action info before you assume the server is gone.
Not tested
rclcpp action clients and servers, Cyclone DDS or any other RMW, mixed RMWs, hosts on different machines, discovery server or ROS_AUTOMATIC_DISCOVERY_RANGE settings, goals sent through launch files or Nav2, the ros2 action send_goal --stdin option, and Foxy, Iron, Kilted and Rolling.
Measured on 2026-11-02 with ros:humble-ros-base (sha256:d9bcf2e6f72d..., rclpy 3.3.22, rclcpp 16.0.21, ros2cli and ros2action 0.18.20, rmw 6.1.4, rmw_fastrtps_cpp 6.2.10), ros:jazzy-ros-base (sha256:8eed0a4669bb..., rclpy 7.1.12, rclcpp 28.1.22, ros2cli 0.32.13, rmw 7.3.4, rmw_fastrtps_cpp 8.4.4) and ros:lyrical-ros-base (sha256:3224ee150cb0..., rclpy 10.0.11, rclcpp 32.0.3, ros2cli 0.40.9, rmw 7.10.2, rmw_fastrtps_cpp 9.4.10), default RMW (Fast DDS), with example_interfaces installed from apt. Full digests are in digests.txt.
Script and raw output: evidence folder. Questions this answers: ros2 action send_goal option with timeout, How to wait for an action to be complete inside a callback?, ROS2 action client callbacks not triggered, Nothing happens when running Writing an action server and client (C++), unable to run ros2 action send-goal.
If send_goal still waits after all of this, run ros2 action list -t in the same terminal and copy the name and type from its output exactly, then compare ROS_DOMAIN_ID on both sides.