Skip to content

Commit

Permalink
fix: better error message for ./risedev d timeout (#18756)
Browse files Browse the repository at this point in the history
Signed-off-by: yihong0618 <zouzou0208@gamil.com>
Co-authored-by: yihong0618 <zouzou0208@gamil.com>
  • Loading branch information
yihong0618 and yihong0618 authored Sep 29, 2024
1 parent d492843 commit e6435e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ ${TMUX} list-windows -F "#{window_name} #{pane_id}" \
| xargs -I {} ${TMUX} send-keys -t {} C-c
# Stop docker components
containers=$(docker ps -a -q -f name=risedev- 2>/dev/null) || true
containers=$(docker ps -q -f name='risedev|risingwave'- 2>/dev/null) || true
if [[ -n ${containers} ]]; then
echo "Stopping docker components..."
docker stop ${containers}
Expand Down
5 changes: 4 additions & 1 deletion src/risedevtool/src/wait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ pub fn wait_tcp_available(

if let Some(ref timeout) = timeout {
if std::time::Instant::now() - start_time >= *timeout {
return Err(anyhow!("failed to wait for closing"));
return Err(anyhow!(
"Failed to wait for port closing on {}. The port may still be in use by another process or application. Please ensure the port is not being used elsewhere and try again.",
server
));
}
}

Expand Down

0 comments on commit e6435e6

Please sign in to comment.