DEV Community

mmllllzcn
mmllllzcn

Posted on

6 Common GBase Database(GBase 8s) oninit Startup Failures and How to Troubleshoot Them

Running oninit -ivy only to see GBase Database(GBase 8s) fail to start? Before reinstalling the database, check the environment variables, configuration files, port availability, directory permissions, shared memory settings, and disk space.

Here are six common causes of GBase Database(GBase 8s) startup failures and how to investigate them on Linux.

1. Cannot Find the onconfig File

Possible cause: ONCONFIG is unset, references the wrong configuration file, or the file is missing.

Check the environment:

echo "$GBASEDBTDIR"
echo "$ONCONFIG"
ls "$GBASEDBTDIR/etc/onconfig."*
Enter fullscreen mode Exit fullscreen mode

Verify that ONCONFIG matches the intended configuration file and that the file exists in the expected directory. Correct the environment according to your installation before retrying startup.

2. Cannot Bind to the Database Port

Possible cause: The configured port is already in use or the listener configuration is incorrect.

Check the port:

ss -lntp | grep ':9088'
Enter fullscreen mode Exit fullscreen mode

Replace 9088 with the port configured for your instance.

Identify the process before taking action. Do not terminate unrelated services blindly. If a port conflict exists, resolve it or select an available port and update the relevant server and client configurations consistently.

3. Permission Denied

Possible cause: The database operating system account cannot access required configuration, storage, or diagnostic directories.

Inspect directory ownership and permissions:

ls -ld /opt/GBASE/gbase_data
Enter fullscreen mode Exit fullscreen mode

Check the relevant parent directories and files as well. Confirm that the database service account has the permissions required by your installation.

Avoid applying recursive ownership or permission changes to an entire directory tree without understanding its contents. Incorrect changes can introduce additional security and operational problems.

4. Not Enough Shared Memory

Possible cause: Available system resources or shared memory configuration do not meet the instance requirements.

Start by inspecting the system setting:

cat /proc/sys/kernel/shmmax
free -h
Enter fullscreen mode Exit fullscreen mode

Review the actual startup error and compare the current system configuration with the requirements for your GBase Database(GBase 8s) version and workload.

Do not apply arbitrary shared memory values from online examples. The appropriate settings depend on the operating system, database configuration, and available resources.

5. No Space Left on Device

Possible cause: A filesystem used for database storage, temporary files, or diagnostic logs has run out of space.

Check available capacity:

df -h
df -i
Enter fullscreen mode Exit fullscreen mode

Check both disk space and inode availability. Review the relevant storage locations and database logs to identify the affected filesystem.

Free space only after confirming which files can safely be removed. Never delete database storage files or logs blindly to make the startup error disappear.

6. sqlhosts Configuration Problems

Possible cause: The connection configuration file is missing, unreadable, or contains an incorrect server entry.

Check the configured path and contents:

echo "$GBASEDBTSQLHOSTS"
cat "$GBASEDBTSQLHOSTS"
Enter fullscreen mode Exit fullscreen mode

Verify that the file exists, the database account can access it, and the server name, protocol, hostname, and port match the intended connection configuration.

A sqlhosts problem may primarily affect client connectivity rather than instance startup, so use the exact error message to determine whether it is relevant to the current failure.

Quick oninit Diagnostic Script

This basic script checks several common environment and system conditions:

#!/bin/bash

echo "=== GBase Database(GBase 8s) Startup Diagnostics ==="

echo
echo "1. Environment"
echo "GBASEDBTDIR=${GBASEDBTDIR:-unset}"
echo "ONCONFIG=${ONCONFIG:-unset}"
echo "GBASEDBTSQLHOSTS=${GBASEDBTSQLHOSTS:-unset}"

echo
echo "2. Configuration file"
if [[ -n "${GBASEDBTDIR:-}" &&
      -n "${ONCONFIG:-}" &&
      -r "$GBASEDBTDIR/etc/$ONCONFIG" ]]; then
    echo "onconfig file found and readable"
else
    echo "Check ONCONFIG and the configuration path"
fi

echo
echo "3. sqlhosts file"
if [[ -n "${GBASEDBTSQLHOSTS:-}" &&
      -r "$GBASEDBTSQLHOSTS" ]]; then
    echo "sqlhosts file found and readable"
else
    echo "Check sqlhosts path and permissions"
fi

echo
echo "4. Disk space"
df -h

echo
echo "5. Inode availability"
df -i

echo
echo "6. Shared memory setting"
cat /proc/sys/kernel/shmmax 2>/dev/null ||
    echo "Unable to read shmmax"

echo
echo "7. Recent startup logs"
if [[ -n "${GBASEDBTDIR:-}" &&
      -r "$GBASEDBTDIR/tmp/online.log" ]]; then
    tail -30 "$GBASEDBTDIR/tmp/online.log"
else
    echo "Check the diagnostic log location for your installation"
fi
Enter fullscreen mode Exit fullscreen mode

Save the script as check_oninit.sh and run it in the appropriate database environment. The diagnostic log location may differ depending on your installation.

This script identifies potential configuration issues; it does not replace reviewing the actual oninit error messages.

Final Thoughts

Most GBase Database(GBase 8s) startup investigations should begin with the exact error message and the database diagnostic logs. Check the environment and configuration first, then investigate ports, permissions, system resources, and storage.

The key takeaway: Avoid changing multiple settings at once. Identify the failing component, make one controlled change, and verify the result before proceeding.

A systematic troubleshooting process makes GBase Database(GBase 8s) installation and Linux database administration easier to maintain.

Top comments (0)