Search code examples
serverterminalredisredis-server

address already in use with redis-server


When running the redis server, it shows address already in use This is the stacktrace:

45546:C 12 Jul 2019 10:04:41.888 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
45546:C 12 Jul 2019 10:04:41.888 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=45546, just started
45546:C 12 Jul 2019 10:04:41.888 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
45546:M 12 Jul 2019 10:04:41.889 * Increased maximum number of open files to 10032 (it was originally set to 256).
45546:M 12 Jul 2019 10:04:41.890 # Could not create server TCP listening socket *:6379: bind: Address already in use

Solution

  • The problem shows that the port is already in use by another process or is open in another window.

    Change the port of redis server

    redis-server --port 6360 will start a Redis server listening to port 6360.

    redis-cli -p 6360 - Now use this to make your client listen at this port.

    Hope this helps solve your problem