重命名REDISQL模块命令后Redis服务器无法启动

问题描述

我想将 REDIsql.CREATE_STATEMENT 命令重命名为较短的命令,例如 REDIsql.CREATE_STMT。

Redis 在 Ubuntu 20.04.02 上运行

在 Redis.conf 文件中我添加了以下语句

rename-command REDIsql.CREATE_STATEMENT REDIsql.CREATE_STMT

如果失败并显示以下日志,当我重新启动 redis 服务时。

locusr@locusr:~$ sudo systemctl restart redis.service
Job for redis-server.service Failed because the control process exited with error code.
See "systemctl status redis-server.service" and "journalctl -xe" for details.

“systemctl status redis-server.service”的输出

locusr@locusr:~$ sudo systemctl status redis-server.service
● redis-server.service - Advanced key-value store
     Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
     Active: Failed (Result: exit-code) since Fri 2021-02-26 08:25:29 UTC; 32s ago
       Docs: http://redis.io/documentation,man:redis-server(1)
    Process: 1312 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited,status=1/FAILURE)

Feb 26 08:25:29 locusr systemd[1]: redis-server.service: Scheduled restart job,restart counter is at 5.
Feb 26 08:25:29 locusr systemd[1]: Stopped Advanced key-value store.
Feb 26 08:25:29 locusr systemd[1]: redis-server.service: Start request repeated too quickly.
Feb 26 08:25:29 locusr systemd[1]: redis-server.service: Failed with result 'exit-code'.
Feb 26 08:25:29 locusr systemd[1]: Failed to start Advanced key-value store.

“journalctl -xe”的输出

locusr@locusr:~$ journalctl -xe
--
-- The process' exit code is 'exited' and its exit status is 1.
Feb 26 08:25:29 locusr systemd[1]: redis-server.service: Failed with result 'exit-code'.
-- Subject: Unit Failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit redis-server.service has entered the 'Failed' state with result 'exit-code'.
Feb 26 08:25:29 locusr systemd[1]: Failed to start Advanced key-value store.
-- Subject: A start job for unit redis-server.service has Failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit redis-server.service has finished with a failure.
--
-- The job identifier is 1359 and the job result is Failed.
Feb 26 08:25:29 locusr systemd[1]: redis-server.service: Scheduled restart job,restart counter is at 5.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit redis-server.service has been scheduled,as the result for
-- the configured Restart= setting for the unit.
Feb 26 08:25:29 locusr systemd[1]: Stopped Advanced key-value store.
-- Subject: A stop job for unit redis-server.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit redis-server.service has finished.
--
-- The job identifier is 1439 and the job result is done.
Feb 26 08:25:29 locusr systemd[1]: redis-server.service: Start request repeated too quickly.
Feb 26 08:25:29 locusr systemd[1]: redis-server.service: Failed with result 'exit-code'.
-- Subject: Unit Failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit redis-server.service has entered the 'Failed' state with result 'exit-code'.
Feb 26 08:25:29 locusr systemd[1]: Failed to start Advanced key-value store.
-- Subject: A start job for unit redis-server.service has Failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit redis-server.service has finished with a failure.
--
-- The job identifier is 1439 and the job result is Failed.
Feb 26 08:25:41 locusr sudo[1316]:   locusr : TTY=pts/0 ; PWD=/home/locusr ; USER=root ; COMMAND=/usr/bin/systemctl STATUS redis.service
Feb 26 08:25:41 locusr sudo[1316]: pam_unix(sudo:session): session opened for user root by locusr(uid=0)
Feb 26 08:25:41 locusr sudo[1316]: pam_unix(sudo:session): session closed for user root
Feb 26 08:25:53 locusr sudo[1318]:   locusr : TTY=pts/0 ; PWD=/home/locusr ; USER=root ; COMMAND=/usr/bin/systemctl STATUS redis-SERVER.service
Feb 26 08:25:53 locusr sudo[1318]: pam_unix(sudo:session): session opened for user root by locusr(uid=0)
Feb 26 08:25:53 locusr sudo[1318]: pam_unix(sudo:session): session closed for user root
Feb 26 08:26:02 locusr sudo[1320]:   locusr : TTY=pts/0 ; PWD=/home/locusr ; USER=root ; COMMAND=/usr/bin/systemctl status redis-server.service
Feb 26 08:26:02 locusr sudo[1320]: pam_unix(sudo:session): session opened for user root by locusr(uid=0)
Feb 26 08:26:02 locusr sudo[1320]: pam_unix(sudo:session): session closed for user root

我看到 rename-command 语句适用于 Redis 命令(例如 DEL),但不适用于外部模块命令。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)