-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Describe the Issue
- Following self-host.md description but firecrawl-api always exit shortly after been up on event 497 / EADDRINUSE
- eaddrinuse might be misleading, the port 3002 is free.
- changing .env with PORT=3099 and another "docker compose up" lead to same error with EADDRINUSE 3002, but would expect 3099 or no error.
To Reproduce
Steps to reproduce the issue:
- Configure the environment with the given .env from self-host.md
- Run the command "docker compose build" and "docker compose up"
- Observe the error or unexpected output which is:
...
node:events:497
firecrawl-api-1 | api throw er; // Unhandled 'error' event
firecrawl-api-1 | api ^
firecrawl-api-1 | api Error: listen EADDRINUSE: address already in use 0.0.0.0:3002
... - Log output/error message
Expected Behavior
A running firecrawl-api service.
The logfile doesn't contain any version information or ids
Screenshots
./. it's just the log, see above/below
Environment (please complete the following information):
- OS: Debian 12 (bookworm)
- Firecrawl Version:
- Node.js Version:
- Docker Version (if applicable): 20.10.24+dfsg1, build 297e128
- Database Type and Version:
Logs
...
firecrawl-api-1 | api 2025-10-04 10:17:28 info [:]: WebSocket proxy successfully attached to Express app
firecrawl-api-1 | api node:events:497
firecrawl-api-1 | api throw er; // Unhandled 'error' event
firecrawl-api-1 | api ^
firecrawl-api-1 | api Error: listen EADDRINUSE: address already in use 0.0.0.0:3002
firecrawl-api-1 | api at Server.setupListenHandle [as listen2] (node:net:1940:16)
firecrawl-api-1 | api at listenInCluster (node:net:1997:12)
firecrawl-api-1 | api at node:net:2206:7
firecrawl-api-1 | api at wrappedLookupCallback (/app/node_modules/.pnpm/@opentelemetry+instrumentation-dns@0.49.0@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-dns/build/src/instrumentation.js:131:29)
firecrawl-api-1 | api at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
firecrawl-api-1 | api Emitted 'error' event on WebSocketServer instance at:
firecrawl-api-1 | api at Server.emit (node:events:519:28)
firecrawl-api-1 | api at Server.incomingRequest (/app/node_modules/.pnpm/@opentelemetry+instrumentation-http@0.205.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-http/build/src/http.js:327:33)
firecrawl-api-1 | api at emitErrorNT (node:net:1976:8)
firecrawl-api-1 | api at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
firecrawl-api-1 | api code: 'EADDRINUSE',
firecrawl-api-1 | api errno: -98,
firecrawl-api-1 | api syscall: 'listen',
firecrawl-api-1 | api address: '0.0.0.0',
firecrawl-api-1 | api port: 3002
firecrawl-api-1 | api }
firecrawl-api-1 | api Node.js v22.20.0
firecrawl-api-1 | ✗ api 1.7s (1)
firecrawl-api-1 | ✗ Fatal error occurred
firecrawl-api-1 | Error: api failed with exit code 1
firecrawl-api-1 | at ChildProcess. (/app/dist/src/harness.js:210:24)
firecrawl-api-1 | at ChildProcess.emit (node:events:519:28)
firecrawl-api-1 | at maybeClose (node:internal/child_process:1101:16)
firecrawl-api-1 | at Socket. (node:internal/child_process:456:11)
firecrawl-api-1 | at Socket.emit (node:events:519:28)
firecrawl-api-1 | at Pipe. (node:net:346:12)
firecrawl-api-1 exited with code 1
...
Configuration
Provide relevant parts of your configuration files (with sensitive information redacted).
Just the .env from the self-host.md which is this(comments are not included):
PORT=3002
HOST=0.0.0.0
USE_DB_AUTHENTICATION=false
BULL_AUTH_KEY=CHANGEME
Additional Context
- port 3002 and port 5432 is not in use before executing "docker compose up"
- also tried to change the .env and using PORT=3099, the error remains the same even the error says 3002