Amazon web services Redis无法启动:无法创建服务器TCP侦听套接字127.0.0.1:6379:绑定:地址已在使用中
我已在AWS服务器中安装了redis。我遵循了这一点: 当我检查Amazon web services Redis无法启动:无法创建服务器TCP侦听套接字127.0.0.1:6379:绑定:地址已在使用中,amazon-web-services,redis,Amazon Web Services,Redis,我已在AWS服务器中安装了redis。我遵循了这一点: 当我检查/var/log/redis/redis.log时,我看到的是: 5012:C 26 Aug 2020 02:28:25.574 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 5012:C 26 Aug 2020 02:28:25.574 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=5012, ju
/var/log/redis/redis.log
时,我看到的是:
5012:C 26 Aug 2020 02:28:25.574 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5012:C 26 Aug 2020 02:28:25.574 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=5012, just started
5012:C 26 Aug 2020 02:28:25.574 # Configuration loaded
5012:C 26 Aug 2020 02:28:25.574 * supervised by systemd, will signal readiness
5012:M 26 Aug 2020 02:28:25.575 # Could not create server TCP listening socket 127.0.0.1:6379: bind: Address already in use
检查端口后:
$ netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 2812/redis-server *
tcp6 0 0 :::6379 :::* LISTEN 2812/redis-server *
这显示了redis服务器实际使用的端口6379
那么为什么不能从那时开始呢
我是否需要在AWS中添加任何入站/出站规则?请帮忙
更新
ExecStart=/usr/bin/redis server/etc/redis.conf——终端上的受监控系统d
命令返回bash:/etc/redis.conf:权限被拒绝
。似乎需要为/etc/redis.conf
文件授予正确的权限
$ ls -l /etc/redis.conf
-rw-r-----. 1 redis redis 62189 Aug 26 03:04 /etc/redis.conf
那么我需要在这里给予什么许可呢?谁应该拥有这个文件?如果它已经在运行,也许你想重新启动它?
restart
也没有帮助。类似的错误<代码>进程:5063 ExecStart=/usr/bin/redis server/etc/redis.conf--受监控系统D(代码=退出,状态=1/失败)主PID:5063(代码=退出,状态=1/失败)您能停止它吗系统CTL停止redis
?可能某些配置文件不正确,并且失败?命令将运行,但在检查状态后将保持不变。“Active:failed
”这是否意味着它已停止?是。有问题,可能是配置文件?如果它已经在运行,可能您想重新启动它?restart
也没有帮助。类似的错误<代码>进程:5063 ExecStart=/usr/bin/redis server/etc/redis.conf--受监控系统D(代码=退出,状态=1/失败)主PID:5063(代码=退出,状态=1/失败)您能停止它吗系统CTL停止redis
?可能某些配置文件不正确,并且失败?命令将运行,但在检查状态后将保持不变。“Active:failed
”这是否意味着它已停止?是。可能是配置文件出了问题?
$ ls -l /etc/redis.conf
-rw-r-----. 1 redis redis 62189 Aug 26 03:04 /etc/redis.conf