【问题标题】:vertica database autostart not runningvertica 数据库自动启动未运行
【发布时间】:2020-06-09 02:18:57
【问题描述】:

我有一个安装了 3 台主机的 vertica 集群。我想在启动主机时自动启动数据库(当所有主机都关闭并且现在我打开它们时)。在 /etc/init.d/ 中的每个主机上,我都添加了脚本 myscript.sh:

sudo -u myuser /opt/vertica/bin/admintools -t start_db -d test

当我手动运行这个脚本时,它可以工作并且数据库正在启动。但是当在操作系统启动时启动脚本时,数据库不会启动。在 adminTools.log 日志中我没有看到启动错误,我只看到 pexpecting vsql 命令...并且 db test 中的所有节点都处于 DOWN 状态

2020-06-08 16:42:08.526 agent/752:0x7f195dffb700 [vsql._just_connect] <INFO> pexpecting vsql command: /opt/vertica/bin/vsql --no-vsqlrc -n  -p 5433 -U myuser -h 192.168.0.5 test -P pager -A
2020-06-08 16:42:08.984 agent/752:0x7f195dffb700 [vsql._just_connect] <INFO> pexpecting vsql command: /opt/vertica/bin/vsql --no-vsqlrc -n  -p 5433 -U myuser -h 192.168.0.6 test -P pager -A
2020-06-08 16:42:09.459 agent/752:0x7f195dffb700 [vsql._just_connect] <INFO> pexpecting vsql command: /opt/vertica/bin/vsql --no-vsqlrc -n  -p 5433 -U myuser -h 192.168.0.7 test -P pager -A
2020-06-08 16:43:05.639 admintools/3701:0x7f456298c740 [adminExec.getCollapsedClusterState] <INFO> All nodes in db test are in state DOWN

这是为什么呢?

【问题讨论】:

  • 什么是操作系统?在 RHEL/Centos 下,vertica rpm 包安装了一个名为 verticad 的 systemd 服务单元,可以启用它。
  • 是的,我的操作系统是 Centos 7

标签: vertica


【解决方案1】:

是的,我的操作系统是 Centos 7

但服务 verticad 不起作用

我跑systemctl start verticad

然后我运行:systemctl status verticad

verticad.service - Vertica server restart oneshot
Loaded: loaded (/etc/systemd/system/verticad.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Thu 2020-06-11 07:19:43 MSK; 38min ago
Process: 650 ExecStart=/opt/vertica/sbin/verticad start (code=exited, status=0/SUCCESS)
Main PID: 650 (code=exited, status=0/SUCCESS)

    Jun 11 07:19:09 verticaserv1 systemd[1]: Starting Vertica server restart oneshot...
    Jun 11 07:19:13 verticaserv1 su[706]: (to mydba) root on none
    Jun 11 07:19:43 verticaserv1 verticad[650]: Vertica: start OK for users: mydba
    Jun 11 07:19:43 verticaserv1 verticad[650]: [  OK  ]
    Jun 11 07:19:43 verticaserv1 systemd[1]: Started Vertica server restart oneshot.

在日志中(/opt/vertica/log/verticad.log 和 /var/log/messages)我只看到:

vertica process is not running
Vertica: start not OK

【讨论】:

  • systemd oneshot 服务在启动后报告为非活动状态是正常的。您的start 命令似乎工作正常,您现在看到您的数据库在admintools 中为UP吗?
猜你喜欢
  • 1970-01-01
  • 2019-11-13
  • 1970-01-01
  • 1970-01-01
  • 2015-03-06
  • 1970-01-01
  • 2023-03-28
  • 2015-12-28
  • 1970-01-01
相关资源
最近更新 更多