docs.rancherdesktop.io
docs.rancherdesktop.io copied to clipboard
Bug: Maxfile Descriptor limit error : Running CockroachDB using rancher desktop
I am seeing an error when I am trying to run cockroach DB image using rancher desktop
My host machine details:
Mac, Monterey 12.2.1, intel core i7
My docker-compose file
version: '3.5'
services:
db-node-1:
container_name: db-node-1
image: cockroachdb/cockroach:latest
volumes:
- ./data/db-node-1:/cockroach/cockroach-data
command: start-single-node --insecure
ports:
- '26257:26257'
- '8080:8080'
command: nerdctl compose up
error:
db-node-1_1 |time="2022-05-13T20:33:35Z" level=fatal msg="no running task found: task 9125f9e13d04a92fce2045ae459d4659598eec1ecb28f02c5bfca54818a5f598 not found: not found"
db-node-1 |*
db-node-1 |* WARNING: ALL SECURITY CONTROLS HAVE BEEN DISABLED!
db-node-1 |*
db-node-1 |* This mode is intended for non-production testing only.
db-node-1 |*
db-node-1 |* In this mode:
db-node-1 |* - Your cluster is open to any client that can access any of your IP addresses.
db-node-1 |* - Intruders with access to your machine or network can observe client-server traffic.
db-node-1 |* - Intruders can log in without password and read or write any data in the cluster.
db-node-1 |* - Intruders can consume all your server's resources and cause unavailability.
db-node-1 |*
db-node-1 |*
db-node-1 |* INFO: To start a secure server without mandating TLS for clients,
db-node-1 |* consider --accept-sql-without-tls instead. For other options, see:
db-node-1 |*
db-node-1 |* - https://go.crdb.dev/issue-v/53404/v21.2
db-node-1 |* - https://www.cockroachlabs.com/docs/v21.2/secure-a-cluster.html
db-node-1 |*
db-node-1 |*
db-node-1 |* ERROR: ERROR: failed to start server: failed to create engines: hard open file descriptor limit of 1024 is under the minimum required 1956
db-node-1 |* please see https://www.cockroachlabs.com/docs/v21.2/recommended-production-settings.html for more details
db-node-1 |*
db-node-1 |ERROR: failed to start server: failed to create engines: hard open file descriptor limit of 1024 is under the minimum required 1956
db-node-1 |please see https://www.cockroachlabs.com/docs/v21.2/recommended-production-settings.html for more details
db-node-1 |Failed running "start-single-node"
Please use the "Bug" template to file bug reports, so we have sufficient information about your setup. In this particular case the host operation system would be the most important piece missing here.
@jandubois I have made the changes you asked. let me know if this is good or I need to add more info.
Thank you, if you are on macOS, then https://github.com/rancher-sandbox/rancher-desktop/issues/713#issuecomment-1009377616 contains instructions on how to work around this problem.
I didn't realize this bug was in the docs repo; that's why I asked to use the bugs template, but that only exists in the Rancher Desktop repo itself. I'll leave the issue here in docs, because maybe we should add something in the docs until the time when we make this configurable in the UI.
@jandubois Thank you for your response. I followed the instructions. It didn't work for me. I tried looking into this file /etc/security/limits.d/rancher-desktop.conf but I don't see the folder limits.d under /etc/security.
If anyone comes across this
you can add
services:
db-node-1:
...
ulimits:
nofile:
soft: 2048
hard: 4096
to your compose service