I am trying to start a cassandra (not dsc) server on Docker (ubuntu 14.04). When I run service cassandra start (as root), I get

/etc/init.d/cassandra: 82: ulimit: error setting limit (Operation not permitted)

line 82 of that file is

ulimit -l unlimited

I'm not really sure what I need to change it to.

有帮助吗?

解决方案 2

A short intro into ulimit: RESOURCE LIMITS ON UNIX SYSTEMS (ULIMIT). The command this init script is trying to issue is supposed to set the max locked memory limit to, well, unlimited. Should succeed for root. Does whoami print root?

UPD: further research led me to this Google Groups discussion. Hopefully it will clarify things a bit.

其他提示

I would expect you would get that warning but that Cassandra would continue to start up and run correctly. As pointed out in the other answer, Docker restricts certain operations for safety reasons. In this case, the Casssandra init script is trying to allow unlimited locked memory. Assuming you are running with swap disabled (as it is a Cassandra best practice) then you can safely ignore this error.

I run Cassandra in Docker for my development environment and also get this warning, but Cassandra starts and runs just fine. If it is not starting up, check the cassandra log files for another problem.

/etc/init.d/cassandra start/restart/status will not work because init system is not running inside the container so the available option is to restart the container

docker restart "container id or container name"

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top