centos7 systemctl 启动 Redis 失败
转自:http://sloger.info/posts/systemd-failed-to-start-redis-in-gentoo
今天启动 Redis 时阻塞很长时间,之后显示启动失败,启动状态如下。
systemd[1]: redis.service start operation timed out. Terminating.
systemd[1]: Failed to start A persistent key-value database.
systemd[1]: Unit redis.service entered failed state.
看了下 service 文件,发现 Systemd 启动命令如下
ExecStart=/usr/sbin/redis-server /etc/redis.conf
手动运行这条命令,发现是正常的,所以猜想是 service 文件的问题,后来发现只需要把 [Service] 部分的 Type=forking
注释掉就行了。
[Service]
# Type=forking
# PIDFile=/var/run/redis/redis.pid
ExecStart=/usr/sbin/redis-server /etc/redis.conf
User=redis
Group=redis
之后重新加载 Service 文件并启动 Redis 服务
sudo systemctl daemon-reload
sudo systemctl start redis
Man pages 对 Systemd 服务启动类型 Type 的解释如下
If set to forking, it is expected that the process configured with ExecStart= will call fork() as part of its start-up. The parent process is expected to exit when start-up is complete and all communication channels are set up. The child continues to run as the main daemon process. This is the behavior of traditional UNIX daemons. If this setting is used, it is recommended to also use the PIDFile= option, so that systemd can identify the main process of the daemon. systemd will proceed with starting follow-up units as soon as the parent process exits.
因为 Redis 配置文件里配置的是
daemonize off
centos7 systemctl 启动 Redis 失败的更多相关文章
- windows启动redis失败
# Warning: no config file specified, using the default config. In order to specify a config file use ...
- Linux启动Redis失败/没有那个文件或目录
没有那个文件或目录问题,可能是你选择的目录不对. 应切换到Redis目录下启动.
- Cassandra3在Centos7下启动失败解决办法
Centos7 安装Cassandra启动过程提示失败,查看结果如下所示: [root@xx ~]# systemctl status cassandra ● cassandra.service - ...
- centos7 启动docker失败
现象:Centos7.3通过yum安装完docker后,启动docker失败 机器的系统版本:CentOS Linux release 7.3.1611 (Core) centos7,执行完安装命令: ...
- centos7 启动docker失败的解决
控制端使用yum install docker安装完成docker后启动docker失败,出现以下信息: Job for docker.service failed because the contr ...
- centos7 vnc 无法systemctl启动
1.centos7 vnc 无法systemctl启动 报错如下:Failed to start Remote desktop service (VNC) 2.解决办法 错误服务脚本名 vncserv ...
- redis 3.2.5单机版安装、使用、systemctl管理Redis启动、停止、开机启动
参照地址 http://www.mamicode.com/info-detail-1488639.html 前提:防火墙安装,然后打开端口,设置开机启动 一.redis源码安装 [root@host- ...
- CentOS7/RHEL7安装Redis步骤详解
CentOS7/RHEL7安装Redis步骤详解 CentOS7/RHEL7安装Redis还是头一次测试安装了,因为centos7升级之后与centos6有比较大的区别了,下面我们就一起来看看Cent ...
- centos7 无法启动网络(service network restart)错误解决办法
centos7 无法启动网络(service network restart)错误解决办法: (以下方法均为网上COPY,同时感谢原博主分享) systemctl status network.ser ...
随机推荐
- Sql2008R2设置远程链接
下边的文章是从百度经验里粘过来的.. 经过测试确实有效..留个备份.. 有个小情况在前边说一下.. 在操作前一定要确定自己的sa用户密码是不是一样..不要以为自己知道的是对的就直接略过某些步骤.. 俗 ...
- tar命令的详细解释
tar命令的详细解释 标签: linuxfileoutputbashinputshell 2010-05-04 12:11 235881人阅读 评论(12) 收藏 举报 分类: linux/unix ...
- 了不起的Node.js读书笔记
原文摘自我的前端博客,欢迎大家来访问 http://www.hacke2.cn 第二章 Js概览 基于GoogleV8引擎 Object.keys(o) 数组方法:遍历forEach.过滤filter ...
- Win7与XP共享互相访问及共享注意事项!
win7共享方法和XP类似,主要需要检查以下操作: 1,首先将Guest账户打开 2,右击文件夹-属性-共享选项-高级共享 3,将共享文件√打上,应用-确定即可! 4,查看自己IP(开始-运行-cmd ...
- R语言 奇怪的NA
> 1+NA [1] NA > NA==1 [1] NA > c(NA,1:50) [1] NA 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
- ggplot2 上篇
title: "ggplot2 上篇" author: "li_volleyball" date: "2016年4月16日" output: ...
- 示波器trigger的使用方法
背景: 下位机有俩个IO口设置为外部中断——边沿触发.低电平有效.因此我需要抓取下降沿波形,但低电平时间很短,手动暂停抓取不仅不科学还费力,那么该如何准确的抓取到呢?最好的办法是使用示波器的trige ...
- wordpress自动清理评论回收站
有时wordpress的垃圾评论实在让人心烦,杂草难除根,footprint吹又生.如果你有心情的话会一个个把垃圾评论放入回收站,但是时间一长,回收站里的东西越堆越多,你可以点击回收站,然后再点一下e ...
- Magic Number(Levenshtein distance算法)
Magic Number Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit ...
- Ubuntu 14 安装并破解SSH工具 SecureCRT
[安装篇] 1.到官网下载:SecureCRT.839.ubuntu13-64.tar.gz https://www.vandyke.com/download/securecrt/download.h ...