servergriddb

Not starting griddb server cluster node


I am using Ubuntu 24.04 LTS. When I am trying to start GridDB server it starting the server and showing me this error:

Job for gridstore.service failed because the control process exited with error code. See "systemctl status gridstore.service" and "journalctl -xeu gridstore.service" for details.

I am expecting these results,

{
    "checkpoint": {
        "backupOperation": 0,
        "duplicateLog": 0,
        "endTime": 1681163543250,
        "mode": "NORMAL_CHECKPOINT",
        "normalCheckpointOperation": 747,
        "pendingPartition": 0,
        "periodicCheckpoint": "ACTIVE",
        "requestedCheckpointOperation": 0,
        "startTime": 1681163543246
    },
    "cluster": {
        "activeCount": 1,
        "applyRuleLimitTime": "2023-04-07T22:09:04.281-08:00",
        "autoGoal": "ACTIVE",
        "clusterName": "myCluster",
        "clusterRevisionId": "db3ff2a8-319e-42d3-8cb2-5ecf1657e0ad",
        "clusterRevisionNo": 8975,
        "clusterStatus": "MASTER",
        "currentRule": "Initial",
        "designatedCount": 1,
        "loadBalancer": "ACTIVE",
        "master": {
            "address": "127.0.0.1",
            "port": 10040
        },
        "nodeList": [
            {
                "address": "127.0.0.1",
                "port": 10040
            }
        ],
        "nodeStatus": "ACTIVE",
        "notificationMode": "FIXED_LIST",
        "partitionStatus": "NORMAL",
        "startupTime": "2023-04-07T09:40:58.181-08:00",
        "syncCount": 2
    },

    ...
}

when I run below command to start GridDB server node:

$ sudo systemctl start gridstore

Here are the log files details of the above error.

[LOG details for $ sudo systemctl status gridstore.service command]:

× gridstore.service - GridDB database server. Loaded: loaded (/usr/lib/systemd/system/gridstore.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Wed 2024-05-15 21:47:34 PKT; 1min 17s ago Process: 3260 ExecStart=/usr/griddb/bin/gridstore start (code=exited, status=1/FAILURE)

May 15 21:47:29 JavaWorkstation gridstore[3277]: ValueError: invalid mode: 'rU' May 15 21:47:29 JavaWorkstation gridstore[3260]: Stopping gridstore service: May 15 21:47:31 JavaWorkstation gridstore[3293]: . May 15 21:47:31 JavaWorkstation gridstore[3293]: The node has been left from the GridDB cluster. May 15 21:47:34 JavaWorkstation gridstore[3260]: Stopped. May 15 21:47:34 JavaWorkstation gridstore[3260]: F01002: Startnode error May 15 21:47:34 JavaWorkstation gridstore[3260]: [ FAILED ] May 15 21:47:34 JavaWorkstation systemd[1]: gridstore.service: Control process exited, >code=exited, status=1/FAILURE May 15 21:47:34 JavaWorkstation systemd[1]: gridstore.service: Failed with result 'exit-code'. May 15 21:47:34 JavaWorkstation systemd[1]: Failed to start gridstore.service - GridDB database >server..

[LOG for $ sudo journalctl -xeu gridstore.service command]:

May 15 21:47:29 JavaWorkstation gridstore[3277]: ValueError: invalid mode: 'rU' May 15 21:47:29 JavaWorkstation gridstore[3260]: Stopping gridstore service: May 15 21:47:31 JavaWorkstation gridstore[3293]: . May 15 21:47:31 JavaWorkstation gridstore[3293]: The node has been left from the GridDB cluster. May 15 21:47:34 JavaWorkstation gridstore[3260]: Stopped. May 15 21:47:34 JavaWorkstation gridstore[3260]: F01002: Startnode error May 15 21:47:34 JavaWorkstation gridstore[3260]: [ FAILED ] May 15 21:47:34 JavaWorkstation systemd[1]: gridstore.service: Control process exited, code=exited, status=1/FAILURE ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ An ExecStart= process belonging to unit gridstore.service has exited. ░░ ░░ The process' exit code is 'exited' and its exit status is 1. May 15 21:47:34 JavaWorkstation systemd[1]: gridstore.service: Failed with result 'exit-code'. ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit gridstore.service has entered the 'failed' state with result 'exit-code'. May 15 21:47:34 JavaWorkstation systemd[1]: Failed to start gridstore.service - GridDB database server.. ░░ Subject: A start job for unit gridstore.service has failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit gridstore.service has finished with a failure. ░░ ░░ The job identifier is 1909 and the job result is failed.

Any help will be really appreciated!


Solution

  • It looks like the uppercase U has been deprecated!

    So, I have removed the uppercase U from the line fp = open(path, 'Ur') of the file named util.py located at this directory /usr/griddb-5.5.0/bin/util.py:

    def getpid(path):
        if os.path.exists(path):
            fp = open(path, 'r')
            pid = fp.readline()
            return pid.rstrip()
    

    And it works like a charm! GridDB server node is started successfully!

    Here is the LOG of my running server:

    ● gridstore.service - GridDB database server. Loaded: loaded (/usr/lib/systemd/system/gridstore.service; enabled; preset: enabled) Active: active (running) since Thu 2024-05-16 22:18:06 PKT; 1min 55s ago Process: 206 ExecStart=/usr/griddb/bin/gridstore start (code=exited, status=0/SUCCESS) Main PID: 373 (gsserver) Tasks: 35 (limit: 9487) Memory: 76.5M () CGroup: /system.slice/gridstore.service └─373 /usr/bin/gsserver --conf /var/lib/gridstore/conf

    May 16 22:18:00 JavaWorkstation systemd[1]: Starting gridstore.service - GridDB database server.... May 16 22:18:01 JavaWorkstation gridstore[206]: Starting gridstore service: May 16 22:18:06 JavaWorkstation gridstore[318]: ... May 16 22:18:06 JavaWorkstation gridstore[318]: The GridDB node has been started. May 16 22:18:06 JavaWorkstation gridstore[206]: [ OK ] May 16 22:18:06 JavaWorkstation systemd[1]: Started gridstore.service - GridDB database server..