Skip to content

Starting riak fails on latest SmartOS #117

@RyanGordon

Description

@RyanGordon

It appears that running the latest available tarball (2.0pre11) for SmartOS fails to start.

[root@qriak1 ~] # /opt/local/sbin/riak start
/opt/local/sbin/riak[189]: [: argument expected
^C[root@qriak1 ~] # /opt/local/sbin/riak console
18:23:53.850 [warning] cuttlefish_util:filter_by_variable_starts_with/2 has been deprecated. use cuttlefish_variable:filter_by_prefix/2
config is OK
-config /var/db/riak/generated.configs/app.2014.03.07.18.23.53.config -args_file /var/db/riak/generated.configs/vm.2014.03.07.18.23.53.args -vm_args /var/db/riak/generated.configs/vm.2014.03.07.18.23.53.args
/opt/local/sbin/riak[359]: [: argument expected
Exec: /opt/local/lib/riak/erts-5.10.3/bin/erlexec -boot /opt/local/lib/riak/releases/2.0.0pre11/riak -config /var/db/riak/generated.configs/app.2014.03.07.18.23.53.config -args_file /var/db/riak/generated.configs/vm.2014.03.07.18.23.53.args -vm_args /var/db/riak/generated.configs/vm.2014.03.07.18.23.53.args -pa /opt/local/lib/riak/lib/basho-patches -- console
Root: /opt/local/lib/riak
Erlang R16B02-basho3 (erts-5.10.3) [source] [64-bit] [smp:24:24] [async-threads:64] [kernel-poll:true] [dtrace]

[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
{"Kernel pid terminated",application_controller,"{application_start_failure,riak_api,{{shutdown,{failed_to_start_child,"https://127.0.0.1:8098\",eaddrinuse}},{riak_api_app,start,[normal,[]]}}}"}

Crash dump was written to: /var/log/riak/erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,riak_api,{{shutdown,{failed_to_start_child,"https://127.0.0.1:8098",eaddrinuse}},{riak_api_app,start,[normal,[]]}}})

This is because the following command doesn't work:

[root@node1 ~] # prctl -n process.max-file-descriptor -t basic -P $$ | awk '/max-file-descriptor/ { print $3 }'
[root@node1 ~] # prctl -n process.max-file-descriptor -t priv -P $$ | awk '/max-file-descriptor/ { print $3 }'
65536
[root@node1 ~] #

The first prctl returns nothing so in the code: "if [ ${ULIMIT_S} -lt ${ULIMIT_H} ]; then" is evaluated as "if [ -lt 65536 ]; then"

https://github.com/basho/node_package/blob/a6b6fefed53588970a3649ab71afc96b264758c2/priv/templates/smartos/runner.patch

Here is what shows up without the -t flag:

[root@node1 ~] # prctl -n process.max-file-descriptor -P $$
process: 25862: -bash
process.max-file-descriptor privileged 65536 - deny -
process.max-file-descriptor system 2147483647 max deny -

Should "-t system" be used in place of "-t basic"?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions