Scylla Fails to Start Due to Wrong Ownership Problems

In cases where a Scylla node fails to start because there is improper ownership, the following steps will help.

Phenomena

Scylla node fails to start.

In cases where the Scylla node fails to start, check Scylla logs. If you see the following error message: Could not access <PATH>: Permission denied std::system_error (error system:13, Permission denied).

For example:

Jul 01 07:31:48 ip-172-16-12-198 scylla[12189]:  [shard 0] init - Could not access /var/lib/scylla/commitlog: std::system_error (error system:13, Permission denied)
Jul 01 07:31:48 ip-172-16-12-198 scylla[12189]:  [shard 0] init - Could not access /var/lib/scylla/data: std::system_error (error system:13, Permission denied)
Jul 01 07:31:48 ip-172-16-12-198 scylla[12189]:  [shard 0] seastar - Exiting on unhandled exception: std::system_error (error system:13, Permission denied)

Problem

The data directories /var/lib/scylla/data and /var/lib/scylla/commitlog exist but are not owned by the Scylla user.

For example:

[centos@ip-172-16-12-132 scylla]$ ls /var/lib/scylla/data
total 4
drwxr-xr-x 2 root root 4096 Jun 18 09:37 commitlog
drwxr-xr-x 7 root root   97 Jun 18 09:37 data

In this example, the user root is the owner of the directories.

Solution

  1. Change the data directory ownership.
sudo chown scylla:scylla /var/lib/scylla/data
sudo chown scylla:scylla /var/lib/scylla/commitlog
  1. Verify that the change completed successfully
[centos@ip-172-16-12-132 scylla]$ ls /var/lib/scylla/data
total 4
drwxr-xr-x 2 scylla scylla 4096 Jun 18 09:37 commitlog
drwxr-xr-x 7 scylla scylla   97 Jun 18 09:37 data
  1. Start Scylla node.

CentOS, RHEL or Ubuntu 16.04

sudo systemctl start scylla-server

Ubuntu 14.04 or Debian

sudo service scylla-server start
  1. Verify Scylla node is working

CentOS, RHEL or Ubuntu 16.04

sudo systemctl status scylla-server

Ubuntu 14.04 or Debian

sudo service scylla-server status

Troubleshoot