Running the Stardog Server
This page discusses running the Stardog Server.
Page Contents
Starting the Server
Unlike the other stardog-admin
subcommands, starting the server may only be run locally (i.e. on the same machine the Stardog Server is will run on).
The simplest way to start the server—running on the default port, detaching to run as a daemon, and writing stardog.log
to the current working directory— is
$ stardog-admin server start
To specify parameters, such as a custom port to bind the server to:
$ stardog-admin server start --port=8080
Stardog binds its server to 0.0.0.0
. You can specify a different network interface for Stardog to bind to using the --bind
property of server start
For more information on the server start
command, please see its man page.
Locking the Home Directory
Stardog server will lock STARDOG_HOME
when it starts to prevent synchronization errors and other nasties if you start more than one Stardog server with the same STARDOG_HOME
. If you need to run more than one Stardog server instance, choose a different STARDOG_HOME
or pass a different value to the --home
option.
Do not manually delete the lock file. Please see the Administrating Stardog 101 section for more information about common pitfalls with the lock file.
Stopping the Server
Stopping the server is simple:
$ stardog-admin server stop
By default, this will stop a server running on localhost
on the default port (5820
. If either of those assumptions does not hold, you can use the --server
option to provide the URL of the server to stop.
For more information on the server stop
command, please see its man page.
Safe Mode to start the server
Safe mode is aimed at helping users overcome initialization errors when starting up the server This feature ensures that the server may start up, even if there is an issue with a component Safe mode should be a temporary fallback only to start servers which no longer start due to a misconfiguration. The safe mode is not supported with the HA Cluster. In a clustered environment you must use the safe mode one a single node. Once you finished making changes on one node, the other nodes may be restarted and sync from the healthy node
The safe mode will do the following:
- Disable additional modules (all of them or selected by user) so the server can start
- All databases are offline, and cannot be queried nor updated
- Allows changing of all mutable database options
- Change Data Source and Virtual-Graph configurations
- Support support user/role/permission changes
- Creating a server backup as a precaution before making further changes, i.e.
stardog-admin server backup
Situations where one would use the Safe Mode include:
- A corrupted database prevents the start of the server
- Misconfigured virtual graph prevents server startup. This could include missing driver jar’s etc
- User info is corrupted and the Server fails to start
Enabling the safe mode
The --safe
option can be added to the stardog-admin server start
command:
$ stardog-admin server start --safe --port=8080
Alternatively you may add a property to the stardog.properties file. Post-usage the safe mode should be disabled again by removing the option.
stardog.safe.mode=true