Skip to content

Manage Nebula Graph services

You can use the nebula.service script to start, stop, restart, terminate, and check the Nebula Graph services. This topic takes starting, stopping and checking the Nebula Graph services for examples.

nebula.service is stored in the /usr/local/nebula/ directory by default, which is also the default installation path of Nebula Graph. 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>]
Parameter Description
-v Display detailed debugging information.
-c Specify the configuration file path. The default path is /usr/local/nebula/etc/.
start Start the target services.
stop Stop the target services.
restart Restart the target services.
kill Terminate the target services.
status Check the status of the target services.
metad Set the Meta Service as the target service.
graphd Set the Graph Service as the target service.
storaged Set the Storage Service as the target service.
all Set all the Nebula Graph services as the target services.

Start Nebula Graph

In non-container environment

Run the following command to start Nebula Graph.

$ 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

In docker container (deployed with docker-compose)

Run the following command in the nebula-docker-compose/ directory to start Nebula Graph.

nebula-docker-compose]$ docker-compose up -d
Building with native build. Learn about native build in Compose here:
Creating network "nebula-docker-compose_nebula-net" with the default driver
Creating nebula-docker-compose_metad0_1 ... done
Creating nebula-docker-compose_metad2_1 ... done
Creating nebula-docker-compose_metad1_1 ... done
Creating nebula-docker-compose_storaged2_1 ... done
Creating nebula-docker-compose_graphd1_1   ... done
Creating nebula-docker-compose_storaged1_1 ... done
Creating nebula-docker-compose_storaged0_1 ... done
Creating nebula-docker-compose_graphd2_1   ... done
Creating nebula-docker-compose_graphd_1    ... done

Stop Nebula Graph


Don't run kill -9 to forcibly terminate the processes, otherwise, there is a low probability of data loss.

In non-container environment

Run the following command to stop Nebula Graph.

sudo /usr/local/nebula/scripts/nebula.service stop all
[INFO] Stopping nebula-metad...
[INFO] Done
[INFO] Stopping nebula-graphd...
[INFO] Done
[INFO] Stopping nebula-storaged...
[INFO] Done

In docker container (deployed with docker-compose)

Run the following command in the nebula-docker-compose/ directory to stop Nebula Graph.

nebula-docker-compose]$ docker-compose down
Stopping nebula-docker-compose_graphd_1    ... done
Stopping nebula-docker-compose_graphd2_1   ... done
Stopping nebula-docker-compose_storaged0_1 ... done
Stopping nebula-docker-compose_storaged1_1 ... done
Stopping nebula-docker-compose_graphd1_1   ... done
Stopping nebula-docker-compose_storaged2_1 ... done
Stopping nebula-docker-compose_metad1_1    ... done
Stopping nebula-docker-compose_metad2_1    ... done
Stopping nebula-docker-compose_metad0_1    ... done
Removing nebula-docker-compose_graphd_1    ... done
Removing nebula-docker-compose_graphd2_1   ... done
Removing nebula-docker-compose_storaged0_1 ... done
Removing nebula-docker-compose_storaged1_1 ... done
Removing nebula-docker-compose_graphd1_1   ... done
Removing nebula-docker-compose_storaged2_1 ... done
Removing nebula-docker-compose_metad1_1    ... done
Removing nebula-docker-compose_metad2_1    ... done
Removing nebula-docker-compose_metad0_1    ... done
Removing network nebula-docker-compose_nebula-net

If you are using a development or nightly version for testing and have compatibility issues, try to run 'docker-compose down-v' to DELETE all data stored in Nebula Graph and import data again.

Check the service status

In non-container environment

Run the following command to check the service status of Nebula Graph.

$ sudo /usr/local/nebula/scripts/nebula.service status all
  • Nebula Graph is running normally if the following information is returned.
[INFO] nebula-metad: Running as 26601, Listening on 9559
[INFO] nebula-graphd: Running as 26644, Listening on 9669
[INFO] nebula-storaged: Running as 26709, Listening on 9779
  • If the return information is similar to the following one, there is a problem.
[INFO] nebula-metad: Running as 25600, Listening on 9559
[INFO] nebula-graphd: Exited
[INFO] nebula-storaged: Running as 25646, Listening on 9779

The Nebula Graph 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 return information to troubleshoot problems.

You may also go to the Nebula Graph community for help.

In docker container (deployed with docker-compose)

Run the following command in the nebula-docker-compose/ directory to check the service status of Nebula Graph.

nebula-docker-compose]$ docker-compose ps
            Name                             Command                  State                                             Ports
nebula-docker-compose_graphd1_1     /usr/local/nebula/bin/nebu ...   Up (healthy)>19669/tcp,>19670/tcp,>9669/tcp
nebula-docker-compose_graphd2_1     /usr/local/nebula/bin/nebu ...   Up (healthy)>19669/tcp,>19670/tcp,>9669/tcp
nebula-docker-compose_graphd_1      /usr/local/nebula/bin/nebu ...   Up (healthy)>19669/tcp,>19670/tcp,>9669/tcp
nebula-docker-compose_metad0_1      ./bin/nebula-metad --flagf ...   Up (healthy)>19559/tcp,>19560/tcp,>9559/tcp,
nebula-docker-compose_metad1_1      ./bin/nebula-metad --flagf ...   Up (healthy)>19559/tcp,>19560/tcp,>9559/tcp,
nebula-docker-compose_metad2_1      ./bin/nebula-metad --flagf ...   Up (healthy)>19559/tcp,>19560/tcp,>9559/tcp,
nebula-docker-compose_storaged0_1   ./bin/nebula-storaged --fl ...   Up (healthy)>19779/tcp,>19780/tcp, 9777/tcp, 9778/tcp,
                                                                          >9779/tcp, 9780/tcp
nebula-docker-compose_storaged1_1   ./bin/nebula-storaged --fl ...   Up (healthy)>19779/tcp,>19780/tcp, 9777/tcp, 9778/tcp,
                                                                           >9779/tcp, 9780/tcp
nebula-docker-compose_storaged2_1   ./bin/nebula-storaged --fl ...   Up (healthy)>19779/tcp,>19780/tcp, 9777/tcp, 9778/tcp,
                                                                          >9779/tcp, 9780/tcp

To troubleshoot for a specific service:

  1. Confirm the container name in the preceding return information.
  2. Run docker ps to find the CONTAINER ID.
  3. Use the CONTAINER ID to log in the container and troubleshoot.
    nebula-docker-compose]$ docker exec -it 2a6c56c405f5 bash
    [root@2a6c56c405f5 nebula]#

Last update: April 22, 2021
Back to top