GBase 8c
安装配置
问答

create table 报错ERROR: Installation node group is not defined in current cluster,如何解决?

发表于2025-09-10 10:57:04101次浏览10个评论

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

【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
 

评论

登录后才可以发表评论
用户头像
GBase用户137发表于 10个月前
请问下是在172.27.78.82节点上执行的吗?请贴一下登录以及在database内创建表的SQL及返回信息吧
用户头像
king_harry发表于 10个月前
@GBase用户137:是的,在82上执行的,登录方式gsql postgres -p 5432 ;SQL语句:create table t1(id int);
--目前临时解决办法:
创建一个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

创建表成功。
GBase用户21143发表于 10个月前
支持一下,我还没弄明白。
GBase用户21182发表于 10个月前
来看一下其它同学的回答,我也不会,纯支持一下哈。
用户头像
mittens发表于 5个月前
学习了
用户头像
mittens发表于 5个月前
学习了
用户头像
mittens发表于 5个月前
学习了
用户头像
mittens发表于 5个月前
学习了
用户头像
mittens发表于 5个月前
学习了
用户头像
柒柒天晴发表于 2个月前
好问题啊。