Skip to content

Crash at startup with "No ports free" from portpicker crate #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sarim opened this issue Apr 21, 2025 · 0 comments
Open

Crash at startup with "No ports free" from portpicker crate #72

sarim opened this issue Apr 21, 2025 · 0 comments

Comments

@sarim
Copy link

sarim commented Apr 21, 2025

After docker compose up

Attaching to backend-1, dashboard-1
backend-1    | 2025-04-21T16:34:04.363056Z  INFO convex_local_backend: Starting a Convex backend
backend-1    | 2025-04-21T16:34:04.363318Z  INFO convex_local_backend: The self-host Convex backend will periodically communicate with a remote beacon server. This is to help Convex understand and improve the product. You can disable this telemetry by setting the --disable-beacon flag or the DISABLE_BEACON environment variable if you are self-hosting using the Docker image.
backend-1    | 2025-04-21T16:34:04.364572Z  INFO convex_local_backend: Sentry is not enabled.
backend-1    | 2025-04-21T16:34:04.377105Z  INFO local_backend::persistence: Connected to SQLite at /convex/data/db.sqlite3
backend-1    | 2025-04-21T16:34:04.379422Z  INFO search::searcher::searcher: Searchlight starting, local_storage_path: /convex/data/tmp/.tmppQguyK max_size: 524.3 MB
backend-1    | 2025-04-21T16:34:04.402241Z  INFO database::database: Bootstrapping indexes...
backend-1    | 2025-04-21T16:34:04.411470Z  INFO indexing::backend_in_memory_indexes: Loading 73 enabled indexes
backend-1    | 2025-04-21T16:34:04.414225Z  INFO database::database: Bootstrapping table metadata...
backend-1    | 2025-04-21T16:34:04.417261Z  INFO database::subscription: Starting subscriptions worker
backend-1    | 2025-04-21T16:34:04.435212Z  INFO indexing::backend_in_memory_indexes: Loading 73 enabled indexes
backend-1    | 2025-04-21T16:34:04.443551Z  INFO database::committer: Loaded indexes into memory
backend-1    | 2025-04-21T16:34:04.445402Z  INFO application: files storage path: "/convex/data/storage/files"
backend-1    | 2025-04-21T16:34:04.445727Z  INFO application: modules storage path: "/convex/data/storage/modules"
backend-1    | 2025-04-21T16:34:04.445738Z  INFO application: search storage path: "/convex/data/storage/search"
backend-1    | 2025-04-21T16:34:04.445746Z  INFO application: exports storage path: "/convex/data/storage/exports"
backend-1    | 2025-04-21T16:34:04.445753Z  INFO application: snapshot_imports storage path: "/convex/data/storage/snapshot_imports"
backend-1    | 2025-04-21T16:34:04.445757Z  INFO database::database: Set search storage to LocalDirStorage { dir: "/convex/data/storage/search" }
backend-1    | 2025-04-21T16:34:04.445760Z  INFO application: Local { dir: "/convex/data/storage" } storage is configured.
backend-1    | 2025-04-21T16:34:04.445773Z  WARN cmd_util::env: Invalid value  for ACTIONS_USER_TIMEOUT_SECS, falling back to 600: ParseIntError { kind: Empty }
backend-1    | 2025-04-21T16:34:04.464413Z  INFO node_executor::local: Using local node executor. Source: /convex/data/tmp/.tmpLoULst/local.cjs
backend-1    | 2025-04-21T16:34:04.667478Z  INFO database::committer: All clients have gone away, shutting down committer...
backend-1    | 2025-04-21T16:34:04.668133Z  INFO search::fragmented_segment: Prefetcher shutting down!
backend-1    | 2025-04-21T16:34:04.668622Z ERROR common::errors: Caught error (RUST_BACKTRACE=1 RUST_LOG=info,common::errors=debug for full trace): No ports free
backend-1    | Error: No ports free

Same issue reported by another person in discord: https://discord.com/channels/1019350475847499849/1356355212255695101

I did a bit of debugging, looks like the culprit is portpicker crate, which was last updated 4 years ago.
Error is coming from this line

let port = portpicker::pick_unused_port().context("No ports free")?;

Which is added in this commit 6be386a on March 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant