I am trying to create a 3-node ScyllaDB using Docker running on Ubuntu Linux 22.04. I am executing docker run commands as a non-root user.
This is from the S101 Scylla DB Essentials Lab Overview and Setup instructions. I have set fs.aio-max-nr to 1048576 in /etc/sysctl.conf and have run sysctl -p /etc/sysctl.conf.
The lab provides docker run syntax to create three nodes (Node_X, Node_Y and Node_Z). I am able to create Node_X and Node_Y, but when creating Node_Z, I get the following error:
FATAL: Exception during startup, aborting: std::runtime_error (Could not setup Async I/O: Resource temporarily unavailable. The most common cause is not enough request capacity in /proc/sys/fs/aio-max-nr. Try increasing that number or reducing the amount of logical CPUs available for your application)
lscpu on my workstation shows:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: GenuineIntel
Model name: Intel(R) Core⢠i5-4570 CPU @ 3.20GHz
CPU family: 6
Model: 60
Thread(s) per core: 1
Core(s) per socket: 4
The workstation has 24GB of memory and I am taking the defaults on Docker for the three containers.
I have set this kernel parameter in /etc/sysctl.conf and have run a sysctl -p
sudo sysctl -p /etc/sysctl.conf
Node_X and Node_Y startup successfully with the following message:
init - Scylla version 5.2.0-0.20230427.429b696bbc1b initialization completed.
I wait for an initialization complete message in Node_X before running Node_Y and then wait for Node_Y to complete initialization before running Node_Z.
When I attempt to start Node_Z it fails with the following message:
FATAL: Exception during startup, aborting: std::runtime_error (Could not setup Async I/O: Resource temporarily unavailable. The most common cause is not enough request capacity in /proc/sys/fs/aio-max-nr. Try increasing that number or reducing the amount of logical CPUs available for your application)
Since I get the same message after increasing fs.aio-max-nr, I decided to try to limit each container to one CPU.
Again, Node_X and Node_Y start successfully and Node_Z fails with the same error.
I read the MacOS issue and it is the same error, but the suggested Kernel parameters mentioned for the MacOS are different than the Ubuntu Kernel parameters.
Ok â I used cloud.scylladb.com to run the exercises in S101: ScyllaDB Essentials. Iâm now working on S110: The Mutant Monitoring System and the lab setup is using docker-compose to create a local cluster. Iâve removed all of my previous containers, run git clone to download all of the required configuration files and code samples, and have re-started Docker desktop and have run docker-compose up -d. I am still encountering the same error starting one of the three nodes in the cluster.
My kernel parameters are:
gjjohnson@M93p:~/scylla-code-samples/mms$ sudo sysctl -p /etc/sysctl.conf
[sudo] password for gjjohnson:
fs.aio-max-nr = 2097152
fs.inotify.max_user_watches = 524288
I tried fs.aio-max-nr with the suggested value and was not able to start all three nodes, so I doubled the value to 2,097,152. There was no documentation on setting fs.inotify.max_user_watches, but in the setup document for for S110: The Mutant Monitoring System, the output from sysctl -p /etc/sysctl.conf shows:
ubuntu $ sysctl -p /etc/sysctl.conf
fs.inotify.max_user_watches = 524288
fs.aio-max-nr = 1048576
So, I set both parameters on my system.
I have 24GB of memory on this workstation and have set the Docker Desktop memory limit to 15GB.
On the node that fails to start, scylla-node3, the error message is:
024-01-24 00:25:27 FATAL: Exception during startup, aborting: std::runtime_error (Could not setup Async I/O: Resource temporarily unavailable. The most common cause is not enough request capacity in /proc/sys/fs/aio-max-nr. Try increasing that number or reducing the amount of logical CPUs available for your application)
2024-01-24 00:25:28 Traceback (most recent call last):
2024-01-24 00:25:28 File â/opt/scylladb/scripts/libexec/scylla-housekeepingâ, line 196, in
2024-01-24 00:25:28 args.func(args)
2024-01-24 00:25:28 File â/opt/scylladb/scripts/libexec/scylla-housekeepingâ, line 122, in check_version
2024-01-24 00:25:28 current_version = sanitize_version(get_api(â/storage_service/scylla_release_versionâ))
2024-01-24 00:25:28 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-24 00:25:28 File â/opt/scylladb/scripts/libexec/scylla-housekeepingâ, line 80, in get_api
2024-01-24 00:25:28 return get_json_from_url(âhttp://â + api_address + path)
2024-01-24 00:25:28 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-24 00:25:28 File â/opt/scylladb/scripts/libexec/scylla-housekeepingâ, line 75, in get_json_from_url
2024-01-24 00:25:28 raise RuntimeError(fâFailed to get â{path}â due to the following error: {retval}')
2024-01-24 00:25:28 RuntimeError: Failed to get âhttp://localhost:10000/storage_service/scylla_release_versionâ due to the following error: <urlopen error [Errno 99] Cannot assign requested address>
2024-01-24 00:25:31 FATAL: Exception during startup, aborting: std::runtime_error (Could not setup Async I/O: Resource temporarily unavailable. The most common cause is not enough request capacity in /proc/sys/fs/aio-max-nr. Try increasing that number or reducing the amount of logical CPUs available for your application)
I would really like to resolve this issue so I can proceed with the rest of this class.
So, for S110: The Mutant Monitoring System lab, the 3-node cluster is built using Docker Compose. Running the updated commands outside of Docker Compose will start the nodes successfully, but they will not be correctly configured for the labs.
I edited my local copy of ~/scylla-code-samples/mms/docker-compose.yml and after deleting the nodes on my cluster, I was able to rebuild them correctly using docker-compose.
I donât guarantee this is the best way to set up docker-compose.yml since I am not a Docker expert, but this does create a working 3-node cluster on my workstation. Thanks to everyone at Scylla for your help with this work-around! GJ Johnson