Skip to content

Q dispatch failure on terminal CLI

0

Just configured Q CLI (1.12.2 on macOS 15.5) and started a chat session on terminal. The terminal integration is enabled. Trying to create an application and getting the following error:

~/workspaces% q chat       

    ⢠⣶⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⣶⣦⡀⠀
 ⠀⠀⠀⣾⡿⢻⣿⡆⠀⠀⠀⢀⣄⡄⢀⣠⣤⣤⡀⢀⣠⣤⣤⡀⠀⠀⢀⣠⣤⣤⣤⣄⠀⠀⢀⣤⣤⣤⣤⣤⣤⡀⠀⠀⣀⣤⣤⣤⣀⠀⠀⠀⢠⣤⡀⣀⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⢠⣿⣿⠋⠀⠀⠀⠙⣿⣿⡆
 ⠀⠀⣼⣿⠇⠀⣿⣿⡄⠀⠀⢸⣿⣿⠛⠉⠻⣿⣿⠛⠉⠛⣿⣿⠀⠀⠘⠛⠉⠉⠻⣿⣧⠀⠈⠛⠛⠛⣻⣿⡿⠀⢀⣾⣿⠛⠉⠻⣿⣷⡀⠀⢸⣿⡟⠛⠉⢻⣿⣷⠀⠀⠀⠀⠀⠀⣼⣿⡏⠀⠀⠀⠀⠀⢸⣿⣿
 ⠀⢰⣿⣿⣤⣤⣼⣿⣷⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⢀⣴⣶⣶⣶⣿⣿⠀⠀⠀⣠⣾⡿⠋⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⡇⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⢹⣿⣇⠀⠀⠀⠀⠀⢸⣿⡿
 ⢀⣿⣿⠋⠉⠉⠉⢻⣿⣇⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⣿⣿⡀⠀⣠⣿⣿⠀⢀⣴⣿⣋⣀⣀⣀⡀⠘⣿⣿⣄⣀⣠⣿⣿⠃⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣦⣀⣀⣀⣴⣿⡿⠃
 ⠚⠛⠋⠀⠀⠀⠀⠘⠛⠛⠀⠘⠛⠛⠀⠀⠀⠛⠛⠀⠀⠀⠛⠛⠀⠀⠙⠻⠿⠟⠋⠛⠛⠀⠘⠛⠛⠛⠛⠛⠛⠃⠀⠈⠛⠿⠿⠿⠛⠁⠀⠀⠘⠛⠃⠀⠀⠘⠛⠛⠀⠀⠀⠀⠀⠀⠀⠀⠙⠛⠿⢿⣿⣿⣋⠀⠀
 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⢿⡧

╭─────────────────────────────── Did you know? ────────────────────────────────╮
│                                                                              │
│        Run /prompts to learn how to build & run repeatable workflows         │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

/help all commands  •  ctrl + j new lines  •  ctrl + s fuzzy search
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🤖 You are chatting with claude-4-sonnet

> create a Python web application that accesses my Strava account, asks the start and end date, and provide a pie chart of different activities, summary of running and walking mileage and calories burned during that time.

Amazon Q is having trouble responding right now: 
   0: dispatch failure (io error): an i/o error occurred: error sending request
   1: dispatch failure
   2: io error
   3: an i/o error occurred: error sending request

Location:
   crates/chat-cli/src/cli/chat/mod.rs:782

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
> 

This is such a confusing error message that I don't even know what is the next step to do. Can you help?

asked 7 months ago542 views
2 Answers
0

The error you're encountering with Amazon Q CLI appears to be a network connectivity issue when trying to establish a connection to the Amazon Q service. This "dispatch failure" with an I/O error typically indicates that the CLI tool cannot successfully communicate with the backend servers.

Here are some troubleshooting steps you can try:

  1. Check your network connectivity - ensure you have a stable internet connection.

  2. Verify port accessibility - Amazon Q services often use specific ports (like 8443) for WebSocket connections. Your firewall or network settings might be blocking these connections.

  3. Test connectivity to the Amazon Q endpoints - you can use a terminal command like nc -v qbusiness.us-east-1.api.aws 8443 to check if you can reach the service endpoints.

  4. Check your AWS credentials - ensure your AWS CLI is properly configured with valid credentials that have the necessary permissions to access Amazon Q services.

  5. Try running with the suggested debug flags - as the error message indicates, run the command with RUST_BACKTRACE=1 q chat to get more detailed error information.

  6. Restart your terminal or computer - sometimes simple connectivity issues can be resolved with a restart.

  7. Update the Q CLI - make sure you're running the latest version of the CLI tool by updating it.

  8. Check for any network proxy settings that might be interfering with the connection.

If the issue persists after trying these steps, you might need to contact AWS support or check the AWS service health dashboard to see if there are any known issues with the Amazon Q service.
Sources
Troubleshoot server stopped responding error in Amazon Q Business | AWS re:Post
How to stop Amazon Q from messing up my terminal | AWS re:Post

answered 7 months ago
0
~/workspaces% nc -v qbusiness.us-east-1.api.aws 8443
Connection to qbusiness.us-east-1.api.aws port 8443 [tcp/pcsync-https] succeeded!

Here is full stack with RUST_BACKTRACE:

 hello

Amazon Q is having trouble responding right now: 
   0: dispatch failure (io error): an i/o error occurred: error sending request
   1: dispatch failure
   2: io error
   3: an i/o error occurred: error sending request

Location:
   crates/chat-cli/src/cli/chat/mod.rs:782

   BACKTRACE 
                                 5 frames hidden                                
   6: chat_cli::cli::chat::ChatSession::next::{{closure}}::h90656ada6f6a7ff0
      at <unknown source file>:<unknown line>
   7: chat_cli::cli::chat::ChatArgs::execute::{{closure}}::h555fc8520df47302
      at <unknown source file>:<unknown line>
   8: chat_cli::cli::RootSubcommand::execute::{{closure}}::h771960411d45479c
      at <unknown source file>:<unknown line>
   9: chat_cli::cli::Cli::execute::{{closure}}::h509c3ab320df9bbf
      at <unknown source file>:<unknown line>
  10: tokio::runtime::park::CachedParkThread::block_on::h87caaafbaf6b2a6a
      at <unknown source file>:<unknown line>
  11: tokio::runtime::context::runtime::enter_runtime::hf95f4c6060c1b150
      at <unknown source file>:<unknown line>
  12: tokio::runtime::runtime::Runtime::block_on::h1b2e99e0dbd337b4
      at <unknown source file>:<unknown line>
  13: chat_cli::main::hf830a9e3a0d3fc2d
      at <unknown source file>:<unknown line>
  14: std::sys::backtrace::__rust_begin_short_backtrace::h6548a92f850828ba
      at <unknown source file>:<unknown line>
  15: std::rt::lang_start::{{closure}}::hda916d4b93025e72
      at <unknown source file>:<unknown line>
  16: std::rt::lang_start_internal::hdff9e551ec0db2ea
      at <unknown source file>:<unknown line>
  17: _main<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.