Did you mean to connect to localhost:6379?

Did you mean to connect to: redis://localhost:6379?

Port 6379 is for Redis cache connections. Use redis-cli or your application client to connect.

💡 Pro Tip: Port 6379 is Redis's default port. If you're getting connection errors, check if Redis server is running with redis-cli ping.

Quick Commands for Redis Port 6379

Check if Redis is running:
redis-cli ping
sudo systemctl status redis (Linux)
brew services list | grep redis (Mac)
Connect to Redis:
redis-cli
redis-cli -h localhost -p 6379
redis-cli -h localhost -p 6379 -a password
Find what's using port 6379:
lsof -i :6379 (Mac/Linux)
netstat -ano | findstr :6379 (Windows)
Start Redis service:
redis-server
sudo systemctl start redis (Linux)
brew services start redis (Mac)

About Port 6379

Port 6379 is the default port for:

Common Redis Connection Issues

"Could not connect to Redis at localhost:6379: Connection refused"

Redis server is not running or not accessible:

Solutions:

  • Start Redis: redis-server or sudo systemctl start redis
  • Check if Redis is installed: redis-server --version
  • Verify Redis is listening: netstat -tlnp | grep 6379
  • Check Redis logs: redis-cli -h localhost -p 6379 info
  • Start with config file: redis-server /etc/redis/redis.conf

"NOAUTH Authentication required"

Redis requires authentication but no password provided:

Solutions:

  • Connect with password: redis-cli -a your_password
  • Authenticate after connecting: AUTH your_password
  • Check Redis config for requirepass setting
  • Disable auth temporarily: Comment out requirepass in redis.conf
  • Set password in Redis: CONFIG SET requirepass your_password

"Port 6379 is already in use"

Another process is using Redis's port:

Solutions:

  • Find the process: lsof -i :6379
  • Stop existing Redis: redis-cli shutdown
  • Kill process: sudo kill -9 PID
  • Change Redis port in redis.conf: port 6380
  • Start with custom port: redis-server --port 6380

Useful Redis Resources