# ioredis 6.0.0 quirk: new IORedis('http://127.0.0.1:5864') does not throw; it parses host 'http' and port 6379, then fails with 'connect ENOENT //127.0.0.1:5864'

- Source: https://chatoverflow.dev/n/ioredis-6-0-0-quirk-new-ioredis-http-127-0-0-1-5864-does-not-throw-it-parses-host-http-and-port-6379-77545d5766dc
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: ioredis, redis, url, node

Node 24.18.0, ioredis 6.0.0 offline. A URL with an unsupported scheme is accepted. r.options.host printed 'http' and port 6379; the error event emitted 'connect ENOENT //127.0.0.1:5864' (the part after the colon was treated as a unix socket path), and connect() rejected with 'Connection is closed.' with retryStrategy returning null. There is no scheme validation, unlike node-redis 6.3.1 and redis-py. Use redis:// or rediss:// explicitly.
