● redis.service - redis-server Loaded: loaded (/etc/systemd/system/redis.service; disabled; vendor preset: disabled) Active: failed (Result: start-limit) since Wed 2023-06-07 21:26:26 CST; 47s ago Process: 127407 ExecStart=/usr/local/redis/bin/redis-server /usr/local/redis/bin/redis.conf (code=exited, status=217/USER) Main PID: 127407 (code=exited, status=217/USER) Jun 07 21:26:25 localhost systemd[1]: Unit redis.service entered failed state. Jun 07 21:26:25 localhost systemd[1]: redis.service failed. Jun 07 21:26:26 localhost systemd[1]: redis.service holdoff time over, sche...t. Jun 07 21:26:26 localhost systemd[1]: Stopped redis-server. Jun 07 21:26:26 localhost systemd[1]: start request repeated too quickly fo...ce Jun 07 21:26:26 localhost systemd[1]: Failed to start redis-server. Jun 07 21:26:26 localhost systemd[1]: Unit redis.service entered failed state. Jun 07 21:26:26 localhost systemd[1]: redis.service failed. Hint: Some lines were ellipsized, use -l to show in full.
时间: 2024-03-15 22:42:44 浏览: 173
根据日志信息可以看出,Redis服务启动失败,错误码为217/USER。这个错误码通常是由于Redis用户没有足够的权限或者配置文件路径不正确导致的。建议您检查Redis用户的权限设置以及配置文件路径是否正确。同时,也可以通过查看更详细的日志信息来排查问题,使用命令`journalctl -xe`可以查看系统日志。
相关问题
[root@localhost ~]# systemctl status redis ● redis.service - redis-server Loaded: loaded (/etc/systemd/system/redis.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Wed 2023-06-07 20:44:44 CST; 4min 9s ago Process: 98975 ExecStart=/usr/local/redis/bin/redis-server /usr/local/redis/bin/redis.conf (code=exited, status=1/FAILURE) Jun 07 20:44:44 localhost systemd[1]: Starting redis-server... Jun 07 20:44:44 localhost redis-server[98975]: 98975:C 07 Jun 2023 20:44:44....y Jun 07 20:44:44 localhost systemd[1]: redis.service: control process exited...=1 Jun 07 20:44:44 localhost systemd[1]: Failed to start redis-server. Jun 07 20:44:44 localhost systemd[1]: Unit redis.service entered failed state. Jun 07 20:44:44 localhost systemd[1]: redis.service failed. Hint: Some lines were ellipsized, use -l to show in full.发生什么事了
根据您提供的输出,看起来 Redis 服务启动失败了。错误信息为 `Failed to start redis-server`。
根据错误信息,这可能是由于 Redis 配置文件的问题导致的。建议您查看 Redis 配置文件 `/usr/local/redis/bin/redis.conf` 是否存在,以及是否存在错误的配置。您可以尝试使用以下命令启动 Redis 服务来检查 Redis 服务的启动错误信息:
```
sudo /usr/local/redis/bin/redis-server /usr/local/redis/bin/redis.conf
```
这将在终端上启动 Redis 服务,并输出错误信息。您可以参考错误信息来解决 Redis 启动失败的问题。
ln -s /lib/systemd/system/redis.service /etc/systemd/system/multi-user.target.wants/redis.service
ln -s /lib/systemd/system/redis.service /etc/systemd/system/multi-user.target.wants/redis.service命令的作用是创建一个符号链接,将/lib/systemd/system/redis.service链接到/etc/systemd/system/multi-user.target.wants/目录下的redis.service文件。这样做的目的是将redis.service服务添加到系统启动时要运行的服务列表中。通过创建这个符号链接,当系统启动时,redis服务将被自动启动。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Linux 问题解决 :/lib/systemd/systemd-journald 占用内存过高](https://blog.csdn.net/zhangpeterx/article/details/90666108)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)解决方案](https://blog.csdn.net/xufengduo/article/details/100740129)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文