gin*_*ina 1 terminal redis redis-server server
运行 redis 服务器时,它显示地址已在使用 这是堆栈跟踪:
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
Run Code Online (Sandbox Code Playgroud)
问题表明该端口已被另一个进程使用或在另一个窗口中打开。
更改redis服务器端口
redis-server --port 6360
将启动一个监听 6360 端口的 Redis 服务器。
redis-cli -p 6360
- 现在使用它让你的客户端监听这个端口。
希望这有助于解决您的问题