starrocks配置supervisor

98 阅读12分钟

一、背景

给starrocks的be和fe配置supervisor实现服务的故障后自动拉起的功能。


supervisorctl status starrocks_be
supervisorctl restart starrocks_fe



二、清单




三、口袋ent4集群WBS

  1. 确认主机信息


172.16.24.88
172.16.24.89
172.16.24.104
172.20.245.23
  1. 确认每个主机的fe和be的路径


172.16.24.88    FE,BE
/mnt/diska/StarRocks-2.3.12/fe
/mnt/diska/StarRocks-2.3.12/be

172.16.24.89    FE,BE
/mnt/diska/StarRocks-2.3.12/fe
/mnt/diska/StarRocks-2.3.12/be

172.16.24.104   BE
/mnt/diska/StarRocks-2.3.12/be


172.20.245.23   FE,BE
/mnt/diska/StarRocks-2.0.0-GA/fe
/mnt/diska/StarRocks-2.0.0-GA/be
  1. 确认启停命令

  2. 安装supervisor

 # 安装 supervisor
yum install -y supervisor
  1. 配置supervisor

 # 配置文件
vim /etc/supervisord.conf
# 其中有2个参数需要调整, 以下是默认值,但默认值会偏小,需要在后面加 000
# 其余参数不变
minfds=1024
minprocs=200

# 修改为
minfds=1024000
minprocs=200000
  1. 配置开机启动supervisor

# 
systemctl daemon-reload 

systemctl start supervisord

systemctl enable supervisord
  1. 配置ini文件

(done)172.20.245.23

be服务的ini文件

# 172.20.245.23
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/StarRocks-2.0.0-GA/be
command=sh /mnt/diska/StarRocks-2.0.0-GA/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe服务的ini文件

# 172.20.245.23
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/mnt/diska/StarRocks-2.0.0-GA/fe
command=sh /mnt/diska/StarRocks-2.0.0-GA/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.16.24.88

be ini文件

# 172.16.24.88
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/StarRocks-2.3.12/be
command=sh /mnt/diska/StarRocks-2.3.12/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

#  172.16.24.88
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/mnt/diska/StarRocks-2.3.12/fe
command=sh /mnt/diska/StarRocks-2.3.12/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.16.24.89

be ini文件

172.16.24.89
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/StarRocks-2.3.12/be
command=sh /mnt/diska/StarRocks-2.3.12/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

# 172.16.24.89
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/mnt/diska/StarRocks-2.3.12/fe
command=sh /mnt/diska/StarRocks-2.3.12/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.16.24.104

be ini文件

172.16.24.104
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/StarRocks-2.3.12/be
command=sh /mnt/diska/StarRocks-2.3.12/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log
  1. 约时间

变更前,启动supervisord服务

  1. 关闭原来的fe

sh stop_fe.sh 
  1. 通过supervisor方式启动fe

# 载入最新的配置文件,停止原有的进程并按照新的配置启动
supervisorctl reload
# 重启配置文件修改过的程序,配置没有改动的进程不会收到影响而重启
supervisorctl update 

supervisorctl start starrocks_fe

supervisorctl status starrocks_fe
supervisorctl restart starrocks_fe
  1. 等待集群恢复正常

监控

  1. 滚动重启接下来的fe节点

  2. 开始操作be节点

  3. 关闭原来的be进程

sh stop_be.sh
  1. 通过supervisor方式启动be

# 载入最新的配置文件,停止原有的进程并按照新的配置启动
supervisorctl reload
# 重启配置文件修改过的程序,配置没有改动的进程不会收到影响而重启
supervisorctl update 

supervisorctl start starrocks_be

supervisorctl status starrocks_be
supervisorctl restart starrocks_be
  1. 滚动重启其他的be节点

  2. 观察服务状态

监控

  1. 完成




四、口袋ent3集群WBS

  1. 确认主机信息
172.25.33.38
172.25.33.36
172.25.33.37
172.25.214.32
172.25.214.33
172.25.214.34
172.25.214.62
172.25.214.63
172.25.214.73
172.25.214.128
172.25.214.127
172.25.214.118
172.25.214.121
172.25.214.119
  1. 确认每个主机的fe和be的路径
172.25.33.38     FE

172.25.33.36     FE

172.25.33.37     FE

172.25.214.32     FE,BE

172.25.214.33     FE,BE

172.25.214.34     FE,BE

172.25.214.62     BE

172.25.214.63     BE

172.25.214.73     BE

172.25.214.128     BE

172.25.214.127     BE

172.25.214.118     BE

172.25.214.121     BE

172.25.214.119     BE
  1. 确认启停命令
  2. 所有节点安装supervisor
  1. 所有节点配置supervisor
  1. 配置ini文件

(done)172.25.33.38

fe ini文件

# 172.25.33.38
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/opt/StarRocks-2.5.21/fe
command=sh /opt/StarRocks-2.5.21/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.25.33.36

fe ini文件

# 172.25.33.36
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/opt/StarRocks-2.5.21/fe
command=sh /opt/StarRocks-2.5.21/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.25.33.37

fe ini文件

# 172.25.33.37
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/opt/StarRocks-2.5.21/fe
command=sh /opt/StarRocks-2.5.21/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.25.214.32

be ini文件

172.25.214.32
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/starrocks/starrocks/be-3903ff6e-08ad-41a8-a836-34728e419329
command=sh /mnt/diska/starrocks/starrocks/be-3903ff6e-08ad-41a8-a836-34728e419329/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

# 172.25.214.32
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/mnt/diska/starrocks/storrocks/fe-42c392c6-3418-4e6f-b0d4-670b737be8f8
command=sh /mnt/diska/starrocks/storrocks/fe-42c392c6-3418-4e6f-b0d4-670b737be8f8/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.25.214.33

be ini文件

172.25.214.33
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/starrocks/starrocks/be-921eb3fa-f0bc-46ac-98d3-0a51ec5d994b
command=sh /mnt/diska/starrocks/starrocks/be-921eb3fa-f0bc-46ac-98d3-0a51ec5d994b/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

# 172.25.214.33
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/mnt/diska/starrocks/storrocks/fe-afce807d-a26a-4b83-bfb6-ec4dabab5279
command=sh /mnt/diska/starrocks/storrocks/fe-afce807d-a26a-4b83-bfb6-ec4dabab5279/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.25.214.34

be ini文件

172.25.214.34
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/starrocks/starrocks/be-55b46eac-3adf-4ed3-9940-a13856b991f2
command=sh /mnt/diska/starrocks/starrocks/be-55b46eac-3adf-4ed3-9940-a13856b991f2/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

# 172.25.214.34
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/mnt/diska/starrocks/storrocks/fe-3f376d4a-69f2-41e8-8537-bd0fc9886fe8
command=sh /mnt/diska/starrocks/storrocks/fe-3f376d4a-69f2-41e8-8537-bd0fc9886fe8/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)1172.25.214.62(注意supervisorctl status)

be ini文件

172.25.214.62
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/starrocks/starrocks/be-3903ff6e-08ad-41a8-a836-34728e419329
command=sh /mnt/diska/starrocks/starrocks/be-3903ff6e-08ad-41a8-a836-34728e419329/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

(done)1172.25.214.63(注意supervisorctl status)

be ini文件

172.25.214.63
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/starrocks/starrocks/be-3903ff6e-08ad-41a8-a836-34728e419329
command=sh /mnt/diska/starrocks/starrocks/be-3903ff6e-08ad-41a8-a836-34728e419329/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

(done)172.25.214.73(注意supervisorctl status)

be ini文件

172.25.214.73
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/data/StarRocks-2.3.18/be
command=sh /data/StarRocks-2.3.18/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

(done)1172.25.214.128(注意supervisorctl status)

be ini文件

172.25.214.128
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/StarRocks-2.5.21/be
command=sh /mnt/diska/StarRocks-2.5.21/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

(done)172.25.214.127(注意supervisorctl status)

be ini文件

172.25.214.127
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/StarRocks-2.5.21/be
command=sh /mnt/diska/StarRocks-2.5.21/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

(done)172.25.214.118(注意supervisorctl status)

be ini文件

172.25.214.118
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/data/StarRocks/be
command=sh /data/StarRocks/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

(done)172.25.214.121(注意supervisorctl status)

be ini文件

172.25.214.121
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/data/StarRocks-2.5.21/be
command=sh /data/StarRocks-2.5.21/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

(done)172.25.214.119(注意supervisorctl status)

be ini文件

172.25.214.119
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/mnt/diska/StarRocks-2.5.21/be
command=sh /mnt/diska/StarRocks-2.5.21/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log
  1. 约时间开始变更

变更前,启动supervisord服务

  1. 关闭原来的fe进程
sh stop_fe.sh
  1. 通过supervisor启动fe
# 载入最新的配置文件,停止原有的进程并按照新的配置启动
supervisorctl reload
# 重启配置文件修改过的程序,配置没有改动的进程不会收到影响而重启
supervisorctl update 

supervisorctl start starrocks_fe

supervisorctl status starrocks_fe
supervisorctl restart starrocks_fe
  1. 滚动重启接下来的fe节点

  2. fe重启完成后,观察fe集群状态

  3. 开始操作be节点

  4. 关闭原来的be进程

sh stop_be.sh
  1. 通过supervisor方式启动be节点
# 载入最新的配置文件,停止原有的进程并按照新的配置启动
supervisorctl reload
# 重启配置文件修改过的程序,配置没有改动的进程不会收到影响而重启
supervisorctl update 

supervisorctl start starrocks_be

supervisorctl status starrocks_be
supervisorctl restart starrocks_be
  1. 观察be集群状态

  2. 滚动重启下一个be节点

  3. 所有be节点完成后,观察be集群

  4. 完成




五、ent4大平层

  1. 确认主机信息
172.21.13.93
172.21.13.94
172.21.13.95
  1. 确认每个主机的fe和be
172.21.13.93  FE,BE
/data/starrocks/fe
/data/starrocks/be

172.21.13.94  FE,BE
/data/StarRocks-3.1.13/fe
/data/starrocks/be

172.21.13.95  FE,BE
/data/StarRocks-3.1.13/fe
/data/starrocks/be
  1. 确认启停命令
  2. 安装supervisor
  3. 配置supervisor
  4. 配置开机启动supervisor
  5. 配置ini文件

(done)172.21.13.93

be ini文件

172.21.13.93
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/data/starrocks/be
command=sh /data/starrocks/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

# 172.21.13.93
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/data/starrocks/fe
command=sh /data/starrocks/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.21.13.94

be ini文件

172.21.13.94
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/data/starrocks/be
command=sh /data/starrocks/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

# 172.21.13.94
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/data/StarRocks-3.1.13/fe
command=sh /data/StarRocks-3.1.13/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.21.13.95

be ini文件

172.21.13.95
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/data/starrocks/be
command=sh /data/starrocks/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

# 172.21.13.95
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/data/StarRocks-3.1.13/fe
command=sh /data/StarRocks-3.1.13/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log
  1. 约时间
  2. 关闭原来的fe
  3. 通过supervisor方式启动fe
  4. 等待集群恢复正常
  5. 滚动重启接下来的be
  6. 滚动重启其他的be节点
  7. 观察服务状态
  8. 完成



六、ent3大平层

  1. 确认主机信息
172.25.113.58
172.25.113.59
172.25.113.60
  1. 确认每个主机的fe和be
172.25.113.58  FE,BE
/data/StarRocks/fe
/data/StarRocks/be

172.25.113.59  FE,BE
/data/StarRocks/fe
/data/StarRocks/be

172.25.113.60  FE,BE
/data/StarRocks/fe
/data/StarRocks/be
  1. 确认启停命令
  2. 安装supervisor
  3. 配置supervisor
  4. 配置开机启动supervisor
  5. 配置ini文件

(done)172.25.113.58

be ini文件

172.25.113.58
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/data/StarRocks/be
command=sh /data/StarRocks/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

# 172.25.113.58
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/data/StarRocks/fe
command=sh /data/StarRocks/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.25.113.59

be ini文件

172.25.113.59
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/data/StarRocks/be
command=sh /data/StarRocks/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

# 172.25.113.59
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/data/StarRocks/fe
command=sh /data/StarRocks/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log

(done)172.25.113.60

be ini文件

172.25.113.60
vi /etc/supervisord.d/starrocks_be.ini

[program:starrocks_be]
process_name=%(program_name)s
directory=/data/StarRocks/be
command=sh /data/StarRocks/be/bin/start_be.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_be.log
stderr_logfile=/var/log/supervisor/starrocks_be.err.log

fe ini文件

# 172.25.113.60
vi /etc/supervisord.d/starrocks_fe.ini

[program:starrocks_fe]
process_name=%(program_name)s
directory=/data/StarRocks/fe
command=sh /data/StarRocks/fe/bin/start_fe.sh
autostart=true
autorestart=true
user=root
numprocs=1
startretries=3
stopasgroup=true
killasgroup=true
startsecs=1
stopwaitsecs=10
stdout_logfile = /var/log/supervisor/starrocks_fe.log
stderr_logfile=/var/log/supervisor/starrocks_fe.err.log
  1. 约时间

  2. 关闭原来的fe

  3. 通过supervisor方式启动fe

  4. 等待集群恢复正常

  5. 滚动重启接下来的be

  6. 滚动重启其他的be节点

  7. 观察服务状态

  8. 完成




七、