Discussion Forum

Cannot start Grakn server - Grakn Core 1.5.7

Hello,

I’m new to Grakn. After installing through sudo apt install grakn-core-all on my Ubuntu 16.04, and start the server by grakn server start, an error returned.

Starting Storage…An error has occurred during boot-up. Please run ‘grakn server status’ or check the logs located under the ‘logs’ directory.
java.nio.file.AccessDeniedException: server/services/cassandra/cassandra.yaml

Grakn Core version is 1.5.7
My Java version is 1.8.0_192

This is the content of the grakn.log file in my /var/log/grakn/ directory

2019-07-18 17:46:56,641 [main] ERROR grakn.core.daemon.GraknDaemon - An error has occurred during boot-up. Please run ‘grakn server status’ or check the logs located under the ‘logs’ directory.
java.lang.RuntimeException: java.nio.file.AccessDeniedException: server/services/cassandra/cassandra.yaml
at grakn.core.daemon.executor.Storage.initialiseConfig(Storage.java:133)
at grakn.core.daemon.executor.Storage.start(Storage.java:194)
at grakn.core.daemon.executor.Storage.startIfNotRunning(Storage.java:147)
at grakn.core.daemon.GraknDaemon.serverStart(GraknDaemon.java:184)
at grakn.core.daemon.GraknDaemon.run(GraknDaemon.java:136)
at grakn.core.daemon.GraknDaemon.main(GraknDaemon.java:72)
Caused by: java.nio.file.AccessDeniedException: server/services/cassandra/cassandra.yaml
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
at java.nio.file.Files.newOutputStream(Files.java:216)
at java.nio.file.Files.write(Files.java:3292)
at grakn.core.daemon.executor.Storage.initialiseConfig(Storage.java:130)
… 5 common frames omitted

I hope someone can help me solve this problem.
Thank you a lot!

For anyone who are facing the same problem.

I raised the issue on Github of Grakn and received the support there.

The solution is to login as root before/when starting the server.
So,

sudo su -
grakn server start

or

sudo grakn server start

will work!

This is an issue when Grakn is installed with sudo.
To stop the server, we will also need to execute the commands as root.

But we don’t need sudo for grakn console. That’s a little bit confusing.

For more information, you can go to the Github issue or the discussion on Stack Overflow