⚡ GBase Connection Troubleshooting (8s) + onstat & sqlhosts
Learn GBase 8s connection troubleshooting with a 3-layer sequence. Use onstat command and sqlhosts config to pinpoint network/authorization issues fast.

A Practical Three-Layer Guide to GBase Connection Failures
When a database client says "can't connect," it's tempting to go straight to the network. That instinct is understandable - but it can also waste time. A connection failure is a symptom. The underlying cause might be that the GBase Database instance isn't ready yet, the operating system can't provide the resources the instance needs, or the client simply can't reach (or access) the listener.
For GBase 8s, a practical diagnostic sequence works outward: check the instance, then the machine, then network configuration and authorization. Each layer answers a different question, and what you find early tells you whether later checks are worth your time. This is especially important during an incident: repeated edits to sqlhosts or connection settings can hide the original problem without actually fixing it.
This guide walks through what to check at each layer, how to interpret common outcomes, and how to preserve evidence before you make any corrective changes. The goal isn't to collect more commands - it's to figure out where the failure sits before you start changing things.
Why connection failures need layered diagnosis
A client-side error doesn't say which part of the connection path failed. The failure could be as simple as the database not running, or it could be more specific: the server might be in a state that can't accept normal work, the configured service might not match the listener, or the client might lack authorization.
If you treat everything as "the network," troubleshooting tends to drag out - and you also increase the odds that you introduce a second problem while trying to solve the first.
Here's a simple model with three layers:
| Layer | Question to answer | First check |
|---|---|---|
| Instance state | Is the database running and ready? | onstat - |
| Machine resources | Can the host provide the resources the instance needs? | onstat -g osi |
| Network and authorization | Can this client reach and access the intended instance? | Configuration and connectivity checks |
The order matters. onstat - gives you local instance information, which is useful even when a remote client can't connect. If the instance isn't running - or it's in recovery - changing network settings won't make it ready. And if the operating system can't provide required resources, fixing client configuration won't solve the real startup issue.
Only after local checks point to a running, healthy instance should you spend time on the connection path. At that point, checking names, addresses, ports, authorization, and connection capacity actually answers a meaningful question: "Is there a ready server for the client to reach?"
This model also helps you avoid random, unstructured troubleshooting. Instead of trying a bunch of changes and hoping one works, move through the layers in order. At each step, write down what you observed and decide whether the evidence points there. If it doesn't, leave that configuration alone and keep going.
Layer 1: Check the GBase instance state
Start on the database host with:
onstat -
This gives a local view of the instance status. It doesn't require a successful remote client connection, which makes it a good first check when clients report failures. Also: confirm you're looking at the instance you think you're inspecting, and interpret the status before you touch listener settings or client configuration.
Common statuses mean different things:
- On-Line: The instance is running normally. That's a strong sign to keep going with machine and connection checks, but it doesn't automatically prove that one specific client can connect.
- Quiescent: The instance is in an administrative state. Check whether planned maintenance - or another operational task - explains it, rather than assuming this is an unexpected outage.
- Fast Recovery: The instance is doing recovery work. A connection problem may be a side effect of this state, not a network fault. See what the instance is doing before making unrelated configuration changes.
- Shared memory not initialized: The instance may not have started, or your current environment may be pointing at a different instance than the one you meant to check.
For instance, output like shared memory not initialized for GBASEDBTSERVER 'gbase01' doesn't automatically mean "network issue." First verify whether the instance is actually running and whether GBASEDBTSERVER matches the target you intended. A mismatch between your environment and the instance you meant to inspect can make a healthy service look "missing" from your current command session.
If the instance is not On-Line, pause the connectivity investigation. Confirm the operational context - recovery, planned maintenance, or an ongoing incident - then follow the right instance-startup or incident procedure. Avoid restarting or changing configuration just to see whether the status changes; that can disrupt recovery and erase useful evidence.
If the instance is On-Line, record that result and move outward. It narrows the search, but it doesn't end it. The client could still be using the wrong server name, address, or service - or it might be blocked by authorization or connection limits.
Layer 2: Check machine-level resources
The second layer is the host that runs GBase. Check it when the instance won't start or when the status suggests a startup problem. The point isn't just whether the database parameters "look right." The question is whether the operating system can provide the resources the instance requires.
The diagnostic approach here suggests checking system memory and shared-memory details with:
onstat -g osi | grep -E 'System memory|System free memory|shmmax|shmids'
Because this uses grep, the exact command might need minor adjustment depending on what shell tools are available on your host. The aim is to surface relevant operating-system information - not to treat a single line as a complete resource picture.
What to look for in your environment:
- System memory: total memory on the host
- System free memory: what's actually available right now
shmmax: the maximum shared-memory segment sizeshmids: shared-memory identifiers
If shared-memory or semaphore limits are too low, the instance may fail to start. But don't immediately jump from "a value looks small" to "change a parameter." Capture the output, compare it against the instance's requirements and the host's configuration, and follow your team's GBase and operating-system procedures to determine whether a genuine constraint exists.
This machine-level check is especially useful when the failure started after a host change, a workload increase, or a restart. It helps separate "the instance can't run because the host can't support it" from "the instance is fine but the client can't connect."
When the instance is running normally and nothing suggests a resource issue, move on to the network and authorization layer. If resources do look insufficient, keep the investigation focused on host/instance startup rather than chasing connectivity tweaks. The outcome should be a documented reason to proceed - not just a command that happened to return output.
Preserve evidence and make controlled changes
Diagnosis and correction should be separate. Before you change parameters, edit sqlhosts, or restart services, capture the complete output of the relevant diagnostic commands and note the configuration values you checked. Include the time, the host and instance you examined, and what the client (or environment) reported.
This baseline makes it possible to compare before and after. Without it, the next engineer may only see the state after changes, with no reliable view of what the original failure looked like. In a shared on-call rotation, that creates avoidable uncertainty: a restart might clear a transient condition, while an edit might mask a mismatch that would have explained the incident.
Use a simple sequence:
- Observe: Run the local instance check and capture its output.
- Classify: Decide whether the evidence points to instance state, host resources, or the connection path.
- Record: Save relevant output and write down the configuration values before editing them.
- Change one thing: Make the smallest change supported by the evidence, using the team's normal change process.
- Verify: Re-run the relevant check and compare the result to the baseline.
Changing one thing at a time isn't always practical for every production incident - urgent recovery sometimes requires coordinated actions. But when conditions allow, smaller isolated changes make cause and effect easier to establish. That helps the next time the same failure shows up, and it reduces the chance that an unnecessary change becomes "normal."
And to be clear: the goal isn't to build a huge archive of command output. Capture enough to answer three questions: what the system was doing before the change, what you changed, and whether it fixed the specific failure. That turns a one-off fix into an operational record the next person can actually use.
Conclusion: Diagnose from the instance outward
A GBase Database connection failure doesn't automatically point to the network. Start with onstat -, check machine resources when startup/status evidence calls for it, and then verify sqlhosts, listener details, address, port, authorization, and connection capacity.
Keep diagnosis separate from correction: capture the original evidence, make a targeted change, and verify the result. The fastest fix is often not "another network edit." It's figuring out the right layer before you take action.