DEV Community

Michael
Michael

Posted on

Why GBase 8a Services Show CLOSE: A Field Checklist

gcadmin reports the service state of every node in a GBase 8a MPP cluster, and a healthy node reads OPEN. This note groups the common reasons why gclusterd and gbased turn CLOSE in the China-domestically developed GBase 8a MPP database from GBASE. The first split matters: either the service is running fine and only the health check fails, or the service genuinely cannot start.

How the health check works

Service detection has a timeout of 5 seconds by default. If a gbase node does not answer in time, it is marked CLOSE even when the process itself is healthy — the usual culprits are network conditions and host load.

Detection-side issues

Firewall

Most common right after an initial install or a security hardening pass. Each node sees itself as OPEN and its peers as CLOSE: on A, B looks CLOSE; on B, A looks CLOSE. V8 clusters usually also go LOCK, while V95 clusters may leave gcadmin hanging for a long time. Check whether the firewall and selinux are actually off.

Split-brain

Seen on V8, not on V9. It appears when corosync is configured with many nodes (20+) and all management nodes start their services at once; more nodes means a higher chance. A rare network flap can trigger it too. The state flickers between CLOSE and OPEN. Stop every corosync / gcware service and then start them one node at a time — a stop followed by start, not restart.

Degraded network

Faulty NICs, cables or switches make the state come and go, but the bad period usually lasts a long time. ping and scp transfers are slow, and NICs have been observed dropping to 10M or 100M. gcware logs show cfg_connect_timeout. Trace the network fault.

High server load

Heavy load, especially on disk, keeps a node from answering inside the detection window. Usually a few nodes or one batch of similar servers are affected: CPU or disk sits at 100%, disk await exceeds 100 ms (one case passed 5 seconds), and gcware logs show cfg_connect_timeout. Find the load source, try a reboot to rule out the OS, and run fio with services stopped if disk is suspected. RAID cards without cache memory and CPU throttling have both been seen.

Interference from another cluster

A machine that once hosted a cluster service but was never fully uninstalled can start up with a changed IP and disturb the current one. The state flickers constantly with very short intervals; tcpdump on each management node shows packets from an address outside the cluster. Uninstall the interfering cluster or delete its gcware config — /etc/corosync/corosync.conf on V86, or <install_dir>/gcware/conf/gcware.conf on V95.

Services that will not start

Here the process itself is broken, usually after a change to OS parameters, server parameters or the local environment. Repeated restart calls, or even a server reboot, do not bring it back.

Bad server parameters

An unsupported parameter or a wrong value appears in system.log; running gclusterd by hand prints the same error. Common after a patch. Fix the parameter from the error message.

File permissions

Programs must not sit under 777, especially config files, and every executable needs the x bit. system.log flags the offending files and a manual gclusterd run reports permission deny. Set config files to 640 or 600 and add the execute bit where it is missing.

Running as root

V95 refuses to run under the OS root user; a manual gclusterd or gbased says so explicitly. Switch to dbaUser and start from there.

Wrong file ownership

All data files must belong to dbaUser. Recreating that user (delete and recreate) changes its uid and leaves old files owned by a numeric uid that dbaUser cannot access. Fix it with chown -R.

Broken environment variables

The variables normally live in dbaUser's .gbase_profile, sourced from .bash_profile. Security hardening or a client install can corrupt them, leaving paths that do not match. If only some nodes are affected, copy the files from a healthy node; if all are damaged, copy from another cluster and adjust the local directories.

Stale PID file

On startup the process writes its pid into the log directory, for example:

/opt/gnode/log/gbase/gbased.pid
Enter fullscreen mode Exit fullscreen mode

If the file exists and the process it names is still alive under /proc, the service assumes another instance is running. A manual gbased then reports have another program is running, and strace shows the check: look for the pid file, read its content (for example 2363), then test /proc/2363. Removing the pid file resolves it.

Corrupted data files

A crash, power loss or a full disk can leave data files partially written, and startup does not always handle that. Typical cases: physical machines, VMs or cloud hosts without a battery-backed RAID cache losing power; or a disk staying full for minutes. The gcmonit daemon only retries a vanished gcware / corosync process a limited number of times — 10 by default, adjustable in gcmonit.conf — so after the space is freed the process will not come back on its own.

Going forward, read a CLOSE state on a gbase cluster as a symptom, not a verdict: check whether the process is alive and answering first, then work through environment changes before touching data files. Most cases come from something that changed around the cluster, not inside the database.

Top comments (0)