名称 | 值 |
---|---|
cpu | Intel® Core™ i5-1035G1 CPU @ 1.00GHz |
操作系统 | CentOS Linux release 7.9.2009 (Core) |
内存 | 4G |
逻辑核数 | 3 |
Gbase-8a节点1-IP | 192.168.142.10 |
Gbase-8a节点2-IP | 192.168.142.11 |
Gbase-8a数据库版本 | 8.6.2.43-R33.132743 |
c3这个工具需要各节点免密才可以正常使用,免密步骤大家可以百度一下,这里就不写了,嘿嘿。
[root@xdw0 pkg]# rpm -ivh c3-5.1.2-1.noarch.rpm --force
准备中... ################################# [100%]
正在升级/安装...
1:c3-5.1.2-1 ################################# [100%]
[gbase@xdw0 ~]$ cat /etc/c3.conf
cluster coor {
192.168.142.10:127.0.0.1
dead remove-index-00
192.168.142.10
}
cluster data {
192.168.142.10:127.0.0.1
dead remove-index-00
192.168.142.11
192.168.142.10
}
cluster all {
192.168.142.10:127.0.0.1
dead remove-index-00
192.168.142.11
192.168.142.10
}
[gbase@xdw0 ~]$ gcadmin
CLUSTER STATE: ACTIVE
CLUSTER MODE: NORMAL
=====================================================================
| GBASE COORDINATOR CLUSTER INFORMATION |
=====================================================================
| NodeName | IpAddress |gcware |gcluster |DataState |
---------------------------------------------------------------------
| coordinator1 | 192.168.142.10 | OPEN | OPEN | 0 |
---------------------------------------------------------------------
=================================================================
| GBASE DATA CLUSTER INFORMATION |
=================================================================
|NodeName | IpAddress |gnode |syncserver |DataState |
-----------------------------------------------------------------
| node1 | 192.168.142.10 | OPEN | OPEN | 0 |
-----------------------------------------------------------------
| node2 | 192.168.142.11 | OPEN | OPEN | 0 |
-----------------------------------------------------------------
[gbase@xdw0 ~]$ cexec coor: 'gccli -uroot -pqwer1234 -e"show full processlist"|grep -iv Sleep'
************************* coor *************************
--------- 192.168.142.10---------
Warning: Permanently added '192.168.142.10' (ECDSA) to the list of known hosts.
Id Tid User Host db Command Time State Info
1 32124 event_scheduler localhost NULL Daemon 30160 Waiting for next activation NULL
77 60202 root localhost NULL Query 0 NULL show full processlist
[gbase@xdw0 ~]$ cexec data: 'gncli -uroot -pqwer1234 -e"show full processlist"|grep -iv Sleep'
************************* data *************************
--------- 192.168.142.11---------
Warning: Permanently added '192.168.142.11' (ECDSA) to the list of known hosts.
Id Tid User Host db Command Time State Info
150 34537 root localhost NULL Query 0 NULL show full processlist
--------- 192.168.142.10---------
Warning: Permanently added '192.168.142.10' (ECDSA) to the list of known hosts.
Id Tid User Host db Command Time State Info
59 31544 root localhost NULL Query 0 NULL show full processlist
有时trace文件并不是在当前管理节点生成的(有,但不是完整版),而是在某个数据节点生成的完整版。
通过大小来判断哪个是最完整的日志。
cexec data: 'ls -lrt /opt/gnode/log/gbase/*.trc|tail -n1 '
[gbase@xdw0 ~]$ gcadmin showdistribution
Distribution ID: 5 | State: new | Total segment num: 2
Primary Segment Node IP Segment ID Duplicate Segment node IP
========================================================================================================================
| 192.168.142.11 | 1 | 192.168.142.10 |
------------------------------------------------------------------------------------------------------------------------
| 192.168.142.10 | 2 | 192.168.142.11 |
========================================================================================================================
[gbase@xdw0 ~]$ gcadmin showdistribution node
Distribution ID: 5 | State: new | Total segment num: 2
============================================================================================
|nodes | 192.168.142.11 | 192.168.142.10 |
--------------------------------------------------------------------------------------------
|primary | 1 | 2 |
|segments | | |
--------------------------------------------------------------------------------------------
|duplicate | 2 | 1 |
|segments 1| | |
============================================================================================
[gbase@xdw0 ~]$ gcadmin showdistribution f
<?xml version='1.0' encoding="utf-8"?>
<distributions>
<distribution>
<distribution_id>5</distribution_id>
<distribution_state>new</distribution_state>
<total_segment_num>2</total_segment_num>
<segments>
<segment>
<primarynode ip="192.168.142.11"/>
<duplicatenodes>
<duplicatenode ip="192.168.142.10"/>
</duplicatenodes>
</segment>
<segment>
<primarynode ip="192.168.142.10"/>
<duplicatenodes>
<duplicatenode ip="192.168.142.11"/>
</duplicatenodes>
</segment>
</segments>
</distribution>
</distributions>
[gbase@xdw0 ~]$ gcadmin showlock
+===============================================+
| GCLUSTER LOCK |
+===============================================+
+---------+-----+-------+-----------+------+----+
|Lock name|owner|content|create time|orphan|type|
+---------+-----+-------+-----------+------+----+
Total : 0
[root@xdw0 ~]# service gcware start
Starting GCWARE (gcwexec): [ 确定 ]
Starting GBASED : [ 确定 ]
Starting GCSYNC : [ 确定 ]
Starting GCLUSTERD : [ 确定 ]
Starting GCRECOVER : [ 确定 ]
Starting GCMonit success!
[root@xdw0 ~]# service gcware stop
Stopping GCMonit success!
Signaling GCRECOVER (gcrecover) to terminate: [ 确定 ]
Waiting for gcrecover services to unload:.... [ 确定 ]
Signaling GCSYNC (gc_sync_server) to terminate: [ 确定 ]
Waiting for gc_sync_server services to unload: [ 确定 ]
Signaling GCLUSTERD to terminate: [ 确定 ]
Waiting for gclusterd services to unload:......... [ 确定 ]
Signaling GBASED to terminate: [ 确定 ]
Waiting for gbased services to unload:.... [ 确定 ]
Signaling GCWARE (gcware) to terminate: [ 确定 ]
Waiting for gcware services to unload:.. [ 确定 ]
express.log
[gbase@xdw0 ~]$ cexec data: 'tail -10 /opt/gnode/log/gbase/express.log|grep ERROR '
************************* data *************************
--------- 192.168.142.11---------
Warning: Permanently added '192.168.142.11' (ECDSA) to the list of known hosts.
--------- 192.168.142.10---------
Warning: Permanently added '192.168.142.10' (ECDSA) to the list of known hosts.
system.log
[gbase@xdw0 ~]$ cexec data: 'tail -1000 /opt/gnode/log/gbase/system.log|grep ERROR '
************************* data *************************
--------- 192.168.142.11---------
Warning: Permanently added '192.168.142.11' (ECDSA) to the list of known hosts.
--------- 192.168.142.10---------
Warning: Permanently added '192.168.142.10' (ECDSA) to the list of known hosts.
express.log
[gbase@xdw0 ~]$ cexec coor: 'tail -10 /opt/gcluster/log/gcluster/express.log|grep ERROR '
************************* coor *************************
--------- 192.168.142.10---------
Warning: Permanently added '192.168.142.10' (ECDSA) to the list of known hosts.
2022-08-17 09:00:00.496 [SQLDISP][ERROR][S:2][Q:0]:CAsyncSqlDispatcherArgs have not target node information.
2022-08-17 09:00:00.496 [SQLDISP][ERROR][S:2][Q:0]:Fail to execute a CEventSqlExecutor.
2022-08-17 09:00:01.313 [SQLDISP][ERROR][S:10][Q:40]:Query failed, THD(0x5876800) HOST(::ffff:192.168.142.10:5050->8) reason: (GBA-01EX-700) Gbase general error: (gns_host: ::ffff:192.168.142.10) source table and destination table are not same: src:( localhost:gclusterdb.import_audit_log_errors_n1 ) dst:( ::ffff:192.168.142.11:gclusterdb.import_audit_log_errors_n1 ) column type: [1]type: 1, precision: 256, scale: 0, is_lookup: 0, nulls_mode: 2, internal_size: 256, display_size: 64 -- type: 1, precision: 256, scale: 0, is_lookup: 0, nulls_mode: 2, internal_size: 256, display_size: 85 SQL(SELECT * from `gclusterdb`.`import_audit_log_errors_n1` limit 0 target into server (HOST '::ffff:192.168.142.10,::ffff:192.168.142.11',PORT '5050', USER 'root', PASSWORD '',DATABASE 'gclusterdb',TABLE 'import_audit_log_errors_n1',COMMENT 'table_host 0 0 1, scn 917506, gc_check '))
2022-08-17 09:00:01.457 [INSERT][ERROR][S:10][Q:40]:Commit failed
ERROR NO: 1733ERROR DETAIL: (GBA-01EX-700) Gbase general error: (gns_host: ::ffff:192.168.142.10) source table and destination table are not same: src:( localhost:gclusterdb.import_audit_log_errors_n1 ) dst:( ::ffff:192.168.142.11:gclusterdb.import_audit_log_errors_n1 ) column type: [1]type: 1, precision: 256, scale: 0, is_lookup: 0, nulls_mode: 2, internal_size: 256, display_size: 64 -- type: 1, precision: 256, scale: 0, is_lookup: 0, nulls_mode: 2, internal_size: 256, display_size: 85
system.log
[gbase@xdw0 ~]$ cexec coor: 'tail -10 /opt/gcluster/log/gcluster/system.log|grep ERROR '
************************* coor *************************
--------- 192.168.142.10---------
Warning: Permanently added '192.168.142.10' (ECDSA) to the list of known hosts.
220817 8:58:26 [ERROR] (GBA-03OT-0003) Failed to get mode of gcluster, having error: GC_AIS_ERR_LIBRARY