Manage NebulaGraph Service¶
NebulaGraph supports managing services with scripts.
Manage services with script¶
You can use the
nebula.service script to start, stop, restart, terminate, and check the NebulaGraph services.
nebula.service is stored in the
/usr/local/nebula/scripts directory by default. If you have customized the path, use the actual path in your environment.
$ sudo /usr/local/nebula/scripts/nebula.service [-v] [-c <config_file_path>] <start | stop | restart | kill | status> <metad | graphd | storaged | all>
||Display detailed debugging information.|
||Specify the configuration file path. The default path is
||Start the target services.|
||Stop the target services.|
||Restart the target services.|
||Terminate the target services.|
||Check the status of the target services.|
||Set the Meta Service as the target service.|
||Set the Graph Service as the target service.|
||Set the Storage Service as the target service.|
||Set all the NebulaGraph services as the target services.|
Run the following command to start NebulaGraph.
$ sudo /usr/local/nebula/scripts/nebula.service start all [INFO] Starting nebula-metad... [INFO] Done [INFO] Starting nebula-graphd... [INFO] Done [INFO] Starting nebula-storaged... [INFO] Done
Check the service status¶
Run the following command to check the service status of NebulaGraph.
$ sudo /usr/local/nebula/scripts/nebula.service status all
NebulaGraph is running normally if the following information is returned.
INFO] nebula-metad(33fd35e): Running as 29020, Listening on 9559 [INFO] nebula-graphd(33fd35e): Running as 29095, Listening on 9669 [WARN] nebula-storaged after v3.0.0 will not start service until it is added to cluster. [WARN] See Manage Storage hosts:ADD HOSTS in https://docs.nebula-graph.io/ [INFO] nebula-storaged(33fd35e): Running as 29147, Listening on 9779
After starting NebulaGraph, the port of the
nebula-storagedprocess is shown in red. Because the
nebula-storagedprocess waits for the
nebula-metadto add the current Storage service during the startup process. The Storage works after it receives the ready signal. Starting from NebulaGraph 3.0.0, the Meta service cannot directly read or write data in the Storage service that you add in the configuration file. The configuration file only registers the Storage service to the Meta service. You must run the
ADD HOSTScommand to enable the Meta to read and write data in the Storage service. For more information, see Manage Storage hosts.
- If the returned result is similar to the following one, there is a problem. You may also go to the NebulaGraph community for help.
[INFO] nebula-metad: Running as 25600, Listening on 9559 [INFO] nebula-graphd: Exited [INFO] nebula-storaged: Running as 25646, Listening on 9779
The NebulaGraph services consist of the Meta Service, Graph Service, and Storage Service. The configuration files for all three services are stored in the
/usr/local/nebula/etc/ directory by default. You can check the configuration files according to the returned result to troubleshoot problems.