跳转至

seabox restart

seabox restart

重启SeaboxMPP数据库服务

语法

``` bash seabox restart [OPTIONS]

Options: -a, –prompt execute automatically -v, –verbose debug output -c, –core generate core file -h, –help show this help, then exit ```

描述

重启SeaboxMPP数据库服务,支持指定宕机时生成core文件,支持启用多线程模式等

  • 注意:如有注意事项,补充
选项

该命令支持选项说明如下:

Options

命令支持的选项

-a, --prompt
使用该选项时表示自动执行,不再需要用户确认
-v, --verbose
使用该选项时表示程序运行过程中,输出详细的调试信息,便于故障定位
-c, --core
使用该选项时表示在集群宕机时生成core文件
-h, --help
使用该选项时返回seabox restart命令的帮助信息
注解

如有具体的使用限制及注意事项,在这部分列出。

  • 注意: seabox restart命令要求使用SeaboxMPP数据库集群安装用户seabox,或root用户,且需通过以下命令设置正确的环境变量:
source $SDHOME/seaboxmpp_path.sh

其中,$SDHOME为安装SeaboxMPP数据库服务的主目录。

示例

以下是seabox restart --help的执行结果:

[seabox@mpp-test-1 bin]$ seabox restart --help
restart seabox service.

Usage: 
  seabox restart [OPTIONS]

Options:
  -a, --prompt      execute automatically
  -v, --verbose     debug output
  -c, --core        generate core file
  -h, --help        show this help, then exit

以下命令可重启数据库服务

[seabox@sy1 ~]$ seabox restart -a
2022-07-07 03:51:20 UTC [20427] seabox_stop sy1:seabox INFO: gathering information and validating the environment...
2022-07-07 03:51:20 UTC [20427] seabox_stop sy1:seabox INFO: seabox version: 'seaboxsql (SeaboxSQL) 21.1.0.1678'
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: coordinator instance parameters
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    shutdown mode   = smart
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    timeout         = 120
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: coodinator instances that will be shutdown:
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    host   datadir                                 port    status
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy1    /home/seabox/mpp/data/coordinatordd/0   33711   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: executor instances that will be shutdown:
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    host   datadir                                       port    status
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/mirror/0/2   33724   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/mirror/0/3   33722   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/mirror/0/4   33723   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/mirror/0/5   33724   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/primary/0    33712   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/primary/1    33713   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/primary/2    33714   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/primary/3    33712   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/primary/4    33713   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/primary/5    33714   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/mirror/0/0   33722   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/mirror/0/1   33723   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: gtm instances that will be shutdown:
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    Host   Datadir                     Port    Status
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy1    /home/seabox/mpp/data/gtm   33726   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: monitor instances that will be shutdown:
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    Host   Datadir                                          Status
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy1    /home/seabox/mpp/data/coordinatordd/monitor/14   u
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: scdcs instances that will be shutdown:
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: --------------------------------------------
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    Host   Datadir                         ServicePort   InnerPort
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO:    sy1    /home/seabox/mpp/data/scdcs/0   33731         33732
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: stop monitor
2022-07-07 03:51:25 UTC [20427] seabox_stop sy1:seabox INFO: successfully shutdown 1 of 1 monitor instances
.......
2022-07-07 03:51:50 UTC [20427] seabox_stop sy1:seabox INFO: stop audit
2022-07-07 03:51:51 UTC [20427] seabox_stop sy1:seabox INFO: targeting dbid ['1'] for shutdown
2022-07-07 03:51:51 UTC [20427] seabox_stop sy1:seabox INFO: commencing parallel coordinator instance shutdown, please wait...
2022-07-07 03:51:51 UTC [20427] seabox_stop sy1:seabox INFO: stopping coordinators and waiting for user connections to finish ...
..........
2022-07-07 03:52:20 UTC [20427] seabox_stop sy1:seabox INFO: ----------------------------------------------------
2022-07-07 03:52:20 UTC [20427] seabox_stop sy1:seabox INFO:    coordinators stopped successfully      = 1
2022-07-07 03:52:20 UTC [20427] seabox_stop sy1:seabox INFO:    coordinators with errors during stop   = 0
2022-07-07 03:52:20 UTC [20427] seabox_stop sy1:seabox INFO: ----------------------------------------------------
2022-07-07 03:52:20 UTC [20427] seabox_stop sy1:seabox INFO: successfully shutdown 1 of 1 coordinator instances 
2022-07-07 03:52:20 UTC [20427] seabox_stop sy1:seabox INFO: database successfully shutdown with no errors reported

2022-07-07 03:52:20 UTC [20427] seabox_stop sy1:seabox INFO: targeting dbid ['10', '11', '12', '13', '2', '3', '4', '5', '6', '7', '8', '9'] for shutdown
2022-07-07 03:52:20 UTC [20427] seabox_stop sy1:seabox INFO: commencing parallel executor instance begin to shutdown, checkpoint maybe take few minutes, please wait patiently...
2022-07-07 03:52:20 UTC [20427] seabox_stop sy1:seabox INFO: 0.00% of jobs completed
2022-07-07 03:52:44 UTC [20427] seabox_stop sy1:seabox INFO: 100.00% of jobs completed
2022-07-07 03:52:44 UTC [20427] seabox_stop sy1:seabox INFO: ----------------------------------------------------
2022-07-07 03:52:44 UTC [20427] seabox_stop sy1:seabox INFO:    executors stopped successfully      = 12
2022-07-07 03:52:44 UTC [20427] seabox_stop sy1:seabox INFO:    executors with errors during stop   = 0
2022-07-07 03:52:44 UTC [20427] seabox_stop sy1:seabox INFO: ----------------------------------------------------
2022-07-07 03:52:44 UTC [20427] seabox_stop sy1:seabox INFO: successfully shutdown 12 of 12 executor instances 
2022-07-07 03:52:44 UTC [20427] seabox_stop sy1:seabox INFO: database successfully shutdown with no errors reported

2022-07-07 03:52:44 UTC [20427] seabox_stop sy1:seabox INFO: stop gtm
2022-07-07 03:52:44 UTC [20427] seabox_stop sy1:seabox INFO: 0.00% of jobs completed
2022-07-07 03:52:52 UTC [20427] seabox_stop sy1:seabox INFO: 100.00% of jobs completed

2022-07-07 03:52:52 UTC [20427] seabox_stop sy1:seabox INFO: stop scdcs service
2022-07-07 03:52:54 UTC [21409] seabox_start sy1:seabox INFO: start scdcs on: sy1
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: scdcs start successfully on nodes '['sy1']'
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: gathering information and validating the environment...
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: seabox binary version: 'seaboxsql (SeaboxSQL) 21.1.0.1678'
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: cluster instance parameters
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: timeout                  = 600 seconds
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: coordinator instances that will be started
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    Host   Datadir                                 Port
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy1    /home/seabox/mpp/data/coordinatordd/0   33711
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: executor instances that will be started
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    Host   Datadir                                       Port
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/mirror/0/2   33724
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/mirror/0/3   33722
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/mirror/0/4   33723
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/mirror/0/5   33724
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/primary/0    33712
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/primary/1    33713
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy1    /home/seabox/mpp/data/executordd/primary/2    33714
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/primary/3    33712
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/primary/4    33713
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/primary/5    33714
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/mirror/0/0   33722
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy2    /home/seabox/mpp/data/executordd/mirror/0/1   33723
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: gtm instances that will be started:
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    Host   Datadir                     Port
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy1    /home/seabox/mpp/data/gtm   33726
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: monitor instances that will be started:
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    Host   Datadir
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy1    /home/seabox/mpp/data/coordinatordd/monitor/14
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: scdcs instances that will be started:
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: --------------------------------------------
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    Host   Datadir                         ServicePort   InnerPort
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO:    sy1    /home/seabox/mpp/data/scdcs/0   33731         33732
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: start gtm
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: 0.00% of jobs completed
2022-07-07 03:53:02 UTC [21409] seabox_start sy1:seabox INFO: 100.00% of jobs completed
.
2022-07-07 03:53:03 UTC [21409] seabox_start sy1:seabox INFO: gtm start success
2022-07-07 03:53:03 UTC [21409] seabox_start sy1:seabox INFO: commencing parallel executor instance startup, please wait...

2022-07-07 03:53:38 UTC [21409] seabox_start sy1:seabox INFO: process results...
2022-07-07 03:53:38 UTC [21409] seabox_start sy1:seabox INFO: ----------------------------------------------------
2022-07-07 03:53:38 UTC [21409] seabox_start sy1:seabox INFO:    successful executor starts   = 12
2022-07-07 03:53:38 UTC [21409] seabox_start sy1:seabox INFO:    failed executor starts       = 0
2022-07-07 03:53:38 UTC [21409] seabox_start sy1:seabox INFO: ----------------------------------------------------
2022-07-07 03:53:38 UTC [21409] seabox_start sy1:seabox INFO: successfully started 12 of 12 executor instances 
2022-07-07 03:53:38 UTC [21409] seabox_start sy1:seabox INFO: ----------------------------------------------------

2022-07-07 03:54:39 UTC [21409] seabox_start sy1:seabox INFO: process results...
2022-07-07 03:54:39 UTC [21409] seabox_start sy1:seabox INFO: ----------------------------------------------------
2022-07-07 03:54:39 UTC [21409] seabox_start sy1:seabox INFO:    successful coordinator starts   = 1
2022-07-07 03:54:39 UTC [21409] seabox_start sy1:seabox INFO:    failed coordinator starts       = 0
2022-07-07 03:54:39 UTC [21409] seabox_start sy1:seabox INFO: ----------------------------------------------------
2022-07-07 03:54:39 UTC [21409] seabox_start sy1:seabox INFO: successfully started 1 of 1 coordinator instances 
2022-07-07 03:54:39 UTC [21409] seabox_start sy1:seabox INFO: ----------------------------------------------------
2022-07-07 03:54:39 UTC [21409] seabox_start sy1:seabox INFO: start monitor
2022-07-07 03:54:39 UTC [21409] seabox_start sy1:seabox INFO: 0.00% of jobs completed
2022-07-07 03:54:40 UTC [21409] seabox_start sy1:seabox INFO: 100.00% of jobs completed
.
2022-07-07 03:54:41 UTC [21409] seabox_start sy1:seabox INFO: successfully started 1 of 1 monitor instances
相关命令