当前位置:网站首页>Redis6.2 SYSTEMd startup prompt redis service: Failed with result ‘protocol‘.
Redis6.2 SYSTEMd startup prompt redis service: Failed with result ‘protocol‘.
2022-07-24 23:49:00 【Clean night mortal dust】
Problem description
Today we installed redis Latest version 6.2.6( As of the latest version before the release of the article ), Install and enable tls All functions are normal , The configuration file is OK ,systemctl Startup time There's a hint redis.service: Failed with result 'protocol'.

Online system version
[email protected]:/etc/redis/conf# cat /etc/issue
Ubuntu 18.04.5 LTS \n \l
Be puzzled when something happens , Search online
I was quite ignorant , Leng Leng's copy error Go to google , I ordered Several articles on similar issues ,Daemonization of Redis 6.0 #7217、Redis service is not starting, After reading their discussion , I tried one of the methods that felt a little useful .
1. Cancel background operation , The foreground runs to check the error output daemonize yes --> daemonize no
I modified it and ran it again systemctl start redis, Found that it did not report any errors , It runs directly . This makes me even more confused .
2. direct redis-server redis.conf
After running , I can only call good guys directly , I'm even more confused .
you 're right , I run again , No error message , My heart is longing for error tips , But it didn't work as I wished .
solve the problem
I've tried the above method , Also restart, I don't know how many times redis service , It still suggests redis.service: Failed with result 'protocol'. I admit that my mentality is a little broken , But it's not empty , also systemd Of redsi.service file Didn't check , In fact, I don't believe it in my heart redis.service Erroneous , Because my local real machine This is how the configuration runs , No problem .
Local real machine
[Unit]
Description=redis
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=notify
ExecStart=/usr/local/bin/redis-server /etc/redis/conf/redis.conf --supervised systemd
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/usr/local/bin/redis-cli -p 6379 shutdown
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Explain this --supervised systemd , Because in systemd Run under redis, You need to set supervised systemd. It also needs to go through Type=notify stay [Service]section To tell systemd redis Will run in this mode .
This is still my local systemd start-up redis when Always Exit time , To search for articles .Redis not starting with systemctl
Online servers
But it is this that leads to my online server redis It won't start , Now after modification , Has been able to work normally systemd Control start
[Unit]
Description=redis
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
ExecStart=/usr/bin/redis-server /etc/redis/conf/redis.conf
ExecReload=/bin/kill -s HUP $MAINPID
# This is filled in according to the configuration
ExecStop=/usr/bin/redis-cli -p 6379 -a 123456 shutdown
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Although the problem has been solved , But I still don't know why add --supervised systemd It doesn't start successfully .
边栏推荐
- The idea of Google's "Ai awareness" event this month
- Upgrade the jdbc driver to version 8.0.28 and connect to the pit record of MySQL
- Use SQLite provided by the system
- QDir类的使用 以及部分解释
- Upload and download filask files
- 中金证券新客理财产品收益可以达到百分之六?开户怎么开?
- Qt学习-利用数据库单例完成 登录匹配 + 注册 功能实现
- Notes of Teacher Li Hongyi's 2020 in-depth learning series 6
- Notes of Teacher Li Hongyi's 2020 in-depth learning series 3
- 基于Verilog HDL的数字秒表
猜你喜欢

JS ------ Chapter 5 functions and events
Simple message queue implementation nodejs + redis =mq

Xiezhendong: Exploration and practice of digital transformation and upgrading of public transport industry

做一个文艺的测试/开发程序员,慢慢改变自己......

Multithreading & high concurrency (the latest in the whole network: interview questions + map + Notes) the interviewer is calm

Pointrender parsing

Pit record: typeerror:'module'object is not callable

c语言:深度刨析函数栈帧

Development direction and problems of optaplanner

基于TensorFlow和Keras的卷积神经网络实现猫狗数据集分类实验
随机推荐
C语言学习之分支与循环语句
Effect evaluation of generative countermeasure network
ShardingSphere-数据库分库分表简介
Browser cache
Routing policy in republishing
RS note: industry recommendation system YouTube DNN model (recall layer + sorting layer) [2016 youtube]
codeforces round #797 ABCDEFG
Notes of Teacher Li Hongyi's 2020 in-depth learning series 6
LP liquidity pledge mining system development detailed procedure
Mandatory interview questions: 1. shallow copy and deep copy_ Deep copy
把字符串转换成整数与不要二
Convert a string to an integer and don't double it
Use of serial queues
Piziheng embedded: the method of making source code into lib Library under MCU Xpress IDE and its difference with IAR and MDK
JS ------ Chapter II JS logic control
See project code Note 1
SQL result export function. If you click the work order but don't enter it, the interface is always blank and there is no response. What should you do?
Is it safe for Guosen Securities to open a mobile account
[nuxt 3] (x) runtime configuration
C language program environment and preprocessing