Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自动部署组件redis出错 #190

Closed
DaddyXz opened this issue Feb 16, 2022 · 14 comments
Closed

自动部署组件redis出错 #190

DaddyXz opened this issue Feb 16, 2022 · 14 comments

Comments

@DaddyXz
Copy link

DaddyXz commented Feb 16, 2022

执行./elkeidup deploy --package package_community/ --config ./elkeid_server.yaml 命令后

在安装redis的时候报错,环境是在本地一台机器上进行部署

image

@TaeRoen
Copy link
Collaborator

TaeRoen commented Feb 16, 2022

@h253518892 麻烦分别执行下
systemctl status elkeid_redis
journalctl -fu elkeid_redis
ps auxf | grep redis
ss -antp | grep 6379
看下为什么redis安装失败了

@DaddyXz
Copy link
Author

DaddyXz commented Feb 16, 2022

image

@TaeRoen
Copy link
Collaborator

TaeRoen commented Feb 16, 2022

@h253518892 看下 package_community/redis 和 /elkeid/redis 下面有没有 redis-server这个二进制文件。
package_community 文件夹是不是不完整,重新解压一遍看下?

@DaddyXz
Copy link
Author

DaddyXz commented Feb 16, 2022

image
image
文件我看都是有的,我重新拉一下试试

@TaeRoen
Copy link
Collaborator

TaeRoen commented Feb 16, 2022

@h253518892 直接执行 /elkeid/redis/redis-server /elkeid/redis/redis.conf 看下报错吗?

@DaddyXz
Copy link
Author

DaddyXz commented Feb 16, 2022

image

@DaddyXz
Copy link
Author

DaddyXz commented Feb 16, 2022

image

@DaddyXz
Copy link
Author

DaddyXz commented Feb 16, 2022

image

@TaeRoen
Copy link
Collaborator

TaeRoen commented Feb 16, 2022

@h253518892 现在systemctl restart elkeid_redis 试一下呢,看下redis这个服务能否正常?
目前不清楚systemd为什么在/elkeid/redis/redis-server文件正常的情况下依然报文件不存在,把系统信息贴一下吧,我们看下能否复现

@DaddyXz
Copy link
Author

DaddyXz commented Feb 16, 2022

image

系统信息:CentOS Linux release 7.9.2009 (Core)

@samcode123
Copy link

我也碰到这个问题了

@TaeRoen
Copy link
Collaborator

TaeRoen commented Feb 17, 2022

@samcode123
麻烦看下systemctl status elkeid_redis 的错误提示,也是找不到redis-server可执行文件吗?
同时 ls -al /elkeid/redis 看下文件大小及权限。

@samcode123
Copy link

提示eb 17 18:39:54 localhost.localdomain systemd[25820]: Failed at step CHDIR spawning /elkeid/redis/redis-server: No such file or directory

[root@localhost system]# ls -al /elkeid/redis
total 28156
drwxr-xr-x 2 redis redis 297 Feb 17 18:39 .
drwxr-xr-x. 4 root root 53 Feb 17 18:39 ..
-rwxr-xr-x 1 redis redis 286 Feb 17 18:39 install_sentinel.sh
-rwxr-xr-x 1 redis redis 404 Feb 17 18:39 install.sh
-rwxr-xr-x 1 redis redis 4830000 Feb 17 18:39 redis-benchmark
-rwxr-xr-x 1 redis redis 5002840 Feb 17 18:39 redis-cli
-rwxr-xr-x 1 redis redis 1846 Feb 17 18:39 redis.conf
-rwxr-xr-x 1 redis redis 1846 Feb 17 18:39 redis.confn
-rwxr-xr-x 1 redis redis 9478136 Feb 17 18:39 redis-sentinel
-rwxr-xr-x 1 redis redis 512 Feb 17 18:39 redis_sentinel.conf
-rwxr-xr-x 1 redis redis 555 Feb 17 18:39 redis_sentinel.service
-rwxr-xr-x 1 redis redis 9478136 Feb 17 18:39 redis-server
-rwxr-xr-x 1 redis redis 528 Feb 17 18:39 redis.service
-rwxr-xr-x 1 redis redis 231 Feb 17 18:39 uninstall_sentinel.sh
-rwxr-xr-x 1 redis redis 221 Feb 17 18:39 uninstall.sh

@UgOrange
Copy link
Member

UgOrange commented May 9, 2022

如果出现这个问题,可以尝试该临时解决方案:
在安装前修改package目录下redis/redis.service,将如下两行去掉
ProtectHome=yes ProtectSystem=true
重新安装即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants