create table 报错ERROR: Installation node group is not defined in current cluster,如何解决?
为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【GBase版本】:V5_S3.0.0B114
【操作系统】:CentOS Linux release 7.9.2009 (Core)
【CPU】:Intel(R) Xeon(R) Platinum
【问题描述】*: 分布式集群创建成功后,使用gsql postgres gbase成功登录数据库节点,执行create database 成功,在database内创建table时失败,报错:ERROR: Installation node group is not defined in current cluster。
一、检查集群状态正常,如下:
[gbase@peixun082 script]$ ./gha_ctl monitor all -H -l http://172.27.78.82:2379
+----+-------------+--------------+-------+---------+--------+
| No | name | host | port | state | leader |
+----+-------------+--------------+-------+---------+--------+
| 0 | gha_server1 | 172.27.78.82 | 20001 | running | True |
+----+-------------+--------------+-------+---------+--------+
+----+------+--------------+------+---------------------------+---------+---------+
| No | name | host | port | work_dir | state | role |
+----+------+--------------+------+---------------------------+---------+---------+
| 0 | gtm1 | 172.27.78.82 | 6666 | /home/gbase/data/gtm/gtm1 | running | primary |
+----+------+--------------+------+---------------------------+---------+---------+
+----+------+--------------+------+----------------------------+---------+---------+
| No | name | host | port | work_dir | state | role |
+----+------+--------------+------+----------------------------+---------+---------+
| 0 | cn1 | 172.27.78.82 | 5432 | /home/gbase/data/coord/cn1 | running | primary |
+----+------+--------------+------+----------------------------+---------+---------+
+----+-------+-------+--------------+-------+----------------------------+---------+---------+
| No | group | name | host | port | work_dir | state | role |
+----+-------+-------+--------------+-------+----------------------------+---------+---------+
| 0 | dn1 | dn1_1 | 172.27.78.82 | 15432 | /home/gbase/data/dn1/dn1_1 | running | primary |
| 1 | dn2 | dn2_1 | 172.27.78.83 | 20010 | /home/gbase/data/dn2/dn2_1 | running | primary |
+----+-------+-------+--------------+-------+----------------------------+---------+---------+
+----+--------------------------+--------+---------+----------+
| No | url | name | state | isLeader |
+----+--------------------------+--------+---------+----------+
| 0 | http://172.27.78.82:2379 | node_0 | healthy | True |
+----+--------------------------+--------+---------+----------+
二、检查sudoer配置,如下:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
gbase ALL=(ALL) NOPASSWD:ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
评论
--目前临时解决办法:
创建一个nodegroup,如下:
postgres=# select * from pgxc_node where node_type='D';
node_name | node_type | node_port | node_host | node_port1 | node_host1 | hostis_primary | nodeis_primary | nodeis_preferred | node_id | sctp_port | control_port | sctp_port1 | control_port1 | node
is_central | nodeis_active
-----------+-----------+-----------+--------------+------------+--------------+----------------+----------------+------------------+------------+-----------+--------------+------------+---------------+-----
-----------+---------------
dn1 | D | 15432 | 172.27.78.82 | 5432 | 172.27.78.82 | t | t | t | -560021589 | 15435 | 15434 | 0 | 0 | f
| t
dn2 | D | 20010 | 172.27.78.83 | 5432 | 172.27.78.83 | t | f | f | 352366662 | 20013 | 20012 | 0 | 0 | f
| t
(2 rows)
postgres=# create node group default_nodegroup with (dn1,dn2);
CREATE NODE GROUP
postgres=# create table t1(id int);
CREATE TABLE
创建表成功。
热门帖子
- 12025-12-01浏览数:182763
- 22023-05-09浏览数:25057
- 42023-09-25浏览数:18525
- 52020-05-11浏览数:17528