Code Monkey home page Code Monkey logo

riak's Introduction

Riak - a distributed, decentralised data storage system.

To build riak, Erlang OTP 22 or higher is required.

make rel will build a release which can be run via rel/riak/bin/riak start. Riak is primarily configured via rel/riak/etc/riak.conf

To make a package, install appropriate build tools for your operating system and run make package.

To create a local multi-node build environment use make devclean; make devrel.

To test Riak use Riak Test.

legacy documentation is still generally relevant.

Issues and PRs can be tracked via Riak Github or Riak KV Github.

riak's People

Contributors

andrewjstone avatar argv0 avatar beerriot avatar bsparrow435 avatar cmeiklejohn avatar coderoshi avatar dizzyd avatar engelsanchez avatar evanmcc avatar gcymbalski avatar jaredmorrow avatar jeetkundoug avatar joedevivo avatar jrwest avatar jtuple avatar kellymclaughlin avatar ksauzz avatar kuenishi avatar lucperkins avatar macintux avatar martinsumner avatar massung avatar nickelization avatar russelldb avatar rzezeski avatar seancribbs avatar slfritchie avatar ulfnorell avatar vagabond avatar zeeshanlakhani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

riak's Issues

/var/run/riak is not recreated on demand at startup

On sone systems (at least Fedora 15) /var/run is volatile and goes away at reboot. The /usr/sbin/riak script tries to recreate it if it is missing, but it drops permissions first so it fails.

$ riak start
Attempting to restart script through sudo -u riak
mkdir: cannot create directory `/var/run/riak/': Permission denied
Riak failed to start within 15 seconds,
see the output of 'riak console' for more information.
If you want to wait longer, set the environment variable
WAIT_FOR_ERLANG to the number of seconds to wait.

reip does not change claimant designation after node is renamed

Renaming the claimant node does not change the claimant in the ring file. Steps to reproduce:

new-host-5:bin bsparrow$ ./riak start

new-host-5:bin bsparrow$ ./riak-admin ring_status
================================== Claimant ===================================
Claimant: '[email protected]'
Status: up
Ring Ready: true

============================== Ownership Handoff ==============================
No pending changes.

============================== Unreachable Nodes ==============================
All nodes are up and reachable

new-host-5:bin bsparrow$ ./riak stop
ok

new-host-5:bin bsparrow$ vi ../etc/vm.args #CHANGE NODE NAME

new-host-5:bin bsparrow$ ./riak-admin reip [email protected] [email protected]
Backed up existing ring file to "./data/ring/riak_core_ring.default.20120719173335.BAK"
New ring file written to "./data/ring/riak_core_ring.default.20120719173434"

new-host-5:bin bsparrow$ ./riak start

new-host-5:bin bsparrow$ ./riak-admin status | grep name
1-minute stats for '[email protected]'
nodename : '[email protected]'
ring_members : ['[email protected]']
ring_ownership : <<"[{'[email protected]',64}]">>

new-host-5:bin bsparrow$ ./riak-admin ring_status
================================== Claimant ===================================
Claimant: '[email protected]'
Status: down
Ring Ready: unknown

============================== Ownership Handoff ==============================
No pending changes.

============================== Unreachable Nodes ==============================
The following nodes are unreachable: ['[email protected]']

WARNING: The cluster state will not converge until all nodes
are up. Once the above nodes come back online, convergence
will continue. If the outages are long-term or permanent, you
can either mark the nodes as down (riak-admin down NODE) or
forcibly remove the nodes from the cluster (riak-admin
force-remove NODE) to allow the remaining nodes to settle.

can't join cluster

Heym

I have installed two instances of riak on two vm's on the microsoft azure platform. they are both working correctly and are both accessable. but when I try to join them into a cluster I got the mesage : Node [email protected] is not reachable!.

all ports are open and I can telnet to every given port I know. I realy don't know what to do next.

Missing case clause for nodetool ping

This case clause matches against both net_kernel:hidden_connect_node(TargetNode) and net_adm:ping(TargetNode) being true, or net_adm:ping(TargetNode) being false. It is missing the case of net_kernel:hidden_connect_node(TargetNode) being false and net_adm:ping(TargetNode) being true.

This missing clause will show up as

# riak ping
Attempting to restart script through sudo -u riak
escript: exception error: no case clause matching {false,pong}

on the command line.

Permissions of `etc/riak` are too restrictive on FreeBSD

When starting riak on FreeBSD, it can no longer access the configuration files in /usr/local/etc/riak

# ll
total 28
-rw-------  1 root  wheel  12294 Jul  4 22:31 app.config
-rw-------  1 root  wheel   1009 Jul  4 22:31 cert.pem
-rw-------  1 root  wheel    887 Jul  4 22:31 key.pem
-rw-------  1 root  wheel   1160 Jul  4 22:31 vm.args
# sudo su - riak
$ riak start
egrep: /usr/local/etc/riak/vm.args: Permission denied

Refactor Solaris OS detection for packaging

OpenSolaris is still a primary option in the package/Makefile when it technically doesn't exist anymore. Consider a better way to integrate SmartOS, OmniOS, or OpenIndiana instead.

Riak HTTP API Cross Site Request Forgery

The riak http api for map reduce doesn't check if the content-type is application/json. The javascript http api also lets the user execute arbitrary code on the server. These two coupled together allow a malicious web page to execute arbitrary code on a users machine if they are running the riak http api. I'm not sure if this is a bug or not but there should be a warning that if you are running riak http api then you should be very careful about the sites you visit.

bin/riak start does not like cd->pwd

Not really a big issue. But annoying anyway.

The system I work on does a pwd after a cd <dirname>, causing

RUNNER_SCRIPT_DIR=$(cd ${0%/*} && pwd)

to receive two directory strings separated by white space.

I changed it to

RUNNER_SCRIPT_DIR=$(cd ${0%/*} > /dev/null && pwd)

and it works again.

Inconsistent client behavior with respect to user metadata

When using either the internal Erlang client or the PB client for Erlang, it is possible to define user metadata fields with any name, e.g. 'Foo'. These are stored on the RiakObject with that exact name. When viewing a record with this usermeta parameter through the HTTP interface, the parameter is returned as header named 'Foo' rather than 'X-Riak-Meta-Foo'.

In order to create a record through the HTTP interface with a usermeta parameter named 'Foo', I have to specify it as 'X-Riak-Meta-Foo' in order for it to be saved on the record. If I try specifying it as just 'Foo', the header is not recognized and discarded. When examining a record created this way through the Erlang client, I can see that the usermeta parameter name has been stored on the record as 'X-Riak-Meta-Foo' instead of 'Foo'. It does not seem possible to generate a usermeta parameter with the name 'Foo' through the HTTP interface.

As the same parameter can not be created through all interfaces, I believe it is inconsistent. I was expecting the internal representation of the parameter to be 'Foo', and that the HTTP interface would add the prefix 'X-Riak-Meta-' when displaying it and also strip this prefix before storing the parameter on a record, but that is clearly not the case.

make: git: Command not found

I am installing riak 1.1.4 tar.gz on a VM without git. I am getting:

make: git: Command not found
./rebar get-deps
erlexec: HOME must be set
make: *** [deps] Error 1

My build script is:

RIAK_VERSION=1.1.4
export HOME=/home/vcap

PATH=/var/vcap/packages/erlang/bin:$PATH

tar xzf riak/riak-${RIAK_VERSION}.tar.gz
cd riak-${RIAK_VERSION}

make rel

Do we need to update the copy of rebar for this to work?

The one that is in riak-1.1.4 is from Oct 2010.

# ./rebar -V
rebar version: 2 date: 20111027_031525 vcs: git 9197e70

# git show 9197e70     
commit 9197e70bd7f442576eb76fab4011fa36b8739960
Author: Tuncer Ayaz <[email protected]>
Date:   Wed Oct 26 23:23:07 2011 +0200

riak-1.1.4 tar.gz is filled with vsn.git files in the deps, but I think ./rebar get-deps is still trying to run git commands?

Related to #117?

riak 1.2 is not starting on mac os x lion

I compiled both from source as well as from the zipped version by basho.

Erlang R15B (erts-5.9) [source] [smp:4:4] [async-threads:64] [hipe] [kernel-poll:true]

21:00:14.839 [info] Application lager started on node '[email protected]'
21:00:14.875 [error] CRASH REPORT Process <0.59.0> with 0 neighbours exited with reason: no such process or port in call to gen_server:call(riak_core_stat_cache, {register,riak_api,{riak_api_stat,produce_stats,[]},5}) in application_master:init/4 line 138
{"Kernel pid terminated",application_controller,"{application_start_failure,riak_api,{bad_return,{{riak_api_app,start,[normal,[]]},{'EXIT',{noproc,{gen_server,call,[riak_core_stat_cache,{register,riak_api,{riak_api_stat,produce_stats,[]},5}]}}}}}}"}

Crash dump was written to: ./log/erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,riak_api,{bad_return,{{riak_api_app,start,[normal,[]]},{'EXIT',{noproc,{gen_server,call,[riak_core_stat_cache,{register,ria

`riak attach` fails on some versions of SmartOS

On certain versions of SmartOS, sudo is at version 1.7.6 and has problems with sudo -i. Testing on five separate machines, only one had the issue, but a patch should be created to remove -i from all runner scripts.

no such file or directory: 'c_src/system/lib/libsnappy.a'

I am trying to install on a Mac OSX Lion, all updates done, Erlang R15B01 (erts-5.9.1), Xcode current.

I clone Riak, and when I attempt to build with "make rel" or "make all" both give me the same error:

clang: error: no such file or directory: 'c_src/system/lib/libsnappy.a'
ERROR: cc c_src/eleveldb.o -L/lib -L/lib -L/lib -bundle -flat_namespace -undefined suppress -L/usr/local/Cellar/erlang/R15B01/lib/erlang/lib/erl_interface-3.7.7/lib -lerl_interface -lei c_src/leveldb/libleveldb.a c_src/system/lib/libsnappy.a -lstdc++ -o priv/eleveldb.so failed with error: 1 and output:
clang: error: no such file or directory: 'c_src/system/lib/libsnappy.a'

Stats for JS MapReduce

It would really useful to see some stats about the JS VM when running MapReduce jobs (like average number of VM used, average memory consumption for map and reduce phases, etc). This would be useful for perfect tuning.

Let's ship libumem as our default memory allocator for Riak!

libumem has proven itself under massive customer load on SmartOS for months now. It's support for efficient concurrent allocation on multi-core/cpu systems is excellent, it's debugging features handy, and it's stability is qed. Too bad it only runs on Solaris...

Enter "portable libumem" (https://labs.omniti.com/labs/portableumem) a project sponsored by our friends at OmniTI. A nice port of libumem to Linux, *BSD, OSX and even Windows. But wait, this version of umem doesn't have the fixes we've recently added in Joyent's SmartOS...

Enter https://github.com/gburd/libumem which is portable umem + the fixes from the latest SmartOS tree (yay!).

This is an enhancement request for us to ship Riak with libumem included as the default allocator. If we do this we'll want to set the following two environment variables in our startup bash script:

LD_PRELOAD=/path/to/libumem.so.1
UMEM_OPTIONS=allocator=best

Debian builds for riak

Right now, binary releases are shipped for a handful of Ubuntu versions, but nothing for Debian.

We'd like to see Squeeze binaries at least for riak (also riak CS).

Master make rel fail with 15B02

uname -a
Darwin Mikes.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64

==> rel (generate)
ERROR: Failed to generate target from spec: "read file info /opt/local/lib/erlang/erts-5.9.2/otp_src/lib/kernel/test/code_SUITE_data/clash/zork-0.8.ez/zork-0.8/ebin/flarp.beam: not a directory"
make: *** [rel] Error 1

FreeBSD package totally broken

Trying to install the generated .tar.gz on FreeBSD gives me this:

$ pkg_info ~apeiron/build/riak/riak-1.2.0pre1.tar.gz
tar: +*: Not found in archive
tar: Error exit delayed from previous errors.
pkg_info: tar extract of /usr/home/apeiron/build/riak/riak-1.2.0pre1.tar.gz failed!
pkg_info: error during unpacking, no info for '/usr/home/apeiron/build/riak/riak-1.2.0pre1.tar.gz' available
$

If I fix this by moving the +* files into the top level directory, I get this:

$ pkg_info ~apeiron/build/riak/riak-1.2.0pre1.tar.gz
pkg_info: unable to open +CONTENTS file
$

Was this package tested at all? It's completely unusable.

`make install' target in the Makefile

...is missing. Instead of doing all those manual things in the rpm spec and deb control files, seems like it could all be centralized in the Makefile (make rel; make install) with overridable destination targets (e.g. make DESTDIR=/opt/basho/riak-test install).

Is there consideration for this?

Beams in basho-patches don't take precedence over existing code

The code path "lib/basho-patches" was recently added to Riak's start up using the "-pa" flag:

-pa $RUNNER_LIB_DIR/basho-patches \

-pa $RUNNER_LIB_DIR/basho-patches \

-pa $RUNNER_LIB_DIR/basho-patches \

-pa $RUNNER_LIB_DIR/basho-patches \

-pa $RUNNER_LIB_DIR/basho-patches \

Unfortunately, it does not appear that beams in this directory override existing beams. For example, Riak ships with a patched "etop_txt.beam" but on start up code:clash/0 indicates this version is hidden:

/usr/lib/riak/lib/observer-0.9.10/ebin/etop_txt.beam hides /usr/lib/riak/lib/basho-patches/etop_txt.beam

Also, code:which/1 does not show the patched version:

([email protected])1> code:which(etop_txt).
"/usr/lib/riak/lib/observer-0.9.10/ebin/etop_txt.beam"

Using pkg_add on FreeBSD after installing Riak results in "no origin recorded" warnings

Sample output:
freebsd64_test1# pkg_add -r sudo
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.0-release/Latest/sudo.tbz... Done.
pkg_add: package riak-1.2.0pre1 has no origin recorded
pkg_add: package riak-1.2.0pre1 has no origin recorded
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.0-release/All/libiconv-1.13.1_1.tbz... Done.
pkg_add: package riak-1.2.0pre1 has no origin recorded
pkg_add: package riak-1.2.0pre1 has no origin recorded
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.0-release/All/gettext-0.18.1.1.tbz... Done.
pkg_add: package riak-1.2.0pre1 has no origin recorded
pkg_add: package riak-1.2.0pre1 has no origin recorded
pkg_add: package riak-1.2.0pre1 has no origin recorded

Get/Put FSM counting

The get/put FSM supervision was changed in 1.2-perf and needs to be merged in with master for 1.3.

How stats are reported needs to be changed to work with this. And there are two other issues Jon suggested be worked on:

1.) "at the point it's time to go to read repair https://github.com/basho/riak_kv/blob/master/src/riak_kv_get_fsm.erl#L306 you could check with the get-fsm-process-tracker-thing and abandon the read repair state and go straight to finalize so the process would exit sooner (possibly bonus points for making read repair less likely once a threshold was hit - always read repair while under 1000 (configurable), probability of read repair linearly reduces to 0 as you approach 2000 (configurable). "

2.) "making the default come from the appenv instead of here https://github.com/basho/riak_kv/blob/master/src/riak_kv_get_fsm.erl#L74 is probably smart too."

JS MapReduce crashes after delete

So roughly what I have is a function which queries a range of indexes from one bucket, and moves stuff to a different bucket (by creating new objects and deleting the old).

In testing this it seems if a map-reduce is performed on a bucket immediately after deleting items in the bucket then mapreduce crashes.

The map function is simply function(v){ var data = JSON.parse(v.values[0].data); return [[v.key, data]]; }

which raises

exceptions.Exception: Error running map/reduce job. Error: {"phase":0,"error":"[{<<"lineno">>,466},{<<"message">>,<<"SyntaxError: syntax error">>},{<<"source">>,<<"()">>}]","input":"{ok,{r_object,<<"83c51667a80570be3398d1b3df1d809c">>,<<"f500d39cd4c811e1907de8393525dd84">>,[{r_content,{dict,4,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[[<<"X-Riak-VTag">>,53,56,112,104,89,76,97,100,86,97,83,57,106,56,107,67,56,74,75,49,101,113]],[[<<"index">>]],[[<<"X-Riak-Deleted">>,116,114,117,101]],[[<<"X-Riak-Last-Modified">>|{1343,49536,881595}]],[],[]}}},<<>>}],[{<<35,9,254,249,79,206,43,166>>,{2,63510268736}}],{dict,1,16,16,8,80,...},...},...}"}

The Riak installation has 1 node only running 1.1.2

The MapReduce works any other time, except immediately after deleting items.

==> console.log <==
2012-07-23 15:18:56.999 [error] <0.27369.1> gen_fsm <0.27369.1> in state wait_pipeline_shutdown terminated with reason: {sink_died,shutdown}
2012-07-23 15:18:57.001 [error] <0.301.0>@riak_pipe_vnode:new_worker:766 Pipe worker startup failed:fitting was gone before startup
2012-07-23 15:18:57.002 [error] <0.269.0>@riak_pipe_vnode:new_worker:766 Pipe worker startup failed:fitting was gone before startup
2012-07-23 15:18:57.001 [error] <0.329.0>@riak_pipe_vnode:new_worker:766 Pipe worker startup failed:fitting was gone before startup
2012-07-23 15:18:57.019 [error] <0.27369.1> CRASH REPORT Process <0.27369.1> with 0 neighbours crashed with reason: {sink_died,shutdown}
2012-07-23 15:18:57.087 [error] <0.154.0> Supervisor riak_pipe_builder_sup had child undefined started with {riak_pipe_builder,start_link,undefined} at <0.27369.1> exit with reason {sink_died,shutdown} in context child_terminated

==> crash.log <==
2012-07-23 15:18:56 =ERROR REPORT====
** State machine <0.27369.1> terminating
** Last message in was {'DOWN',#Ref<0.0.0.258924>,process,<0.27367.1>,shutdown}
** When State == wait_pipeline_shutdown
** Data == {state,[{sink,{fitting,<0.27367.1>,#Ref<0.0.0.258911>,{riak_kv_pipe_get,bkey_chash},{riak_kv_pipe_get,bkey_nval}}},{trace,{set,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[error],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}},{log,{sink,{fitting,<0.27185.1>,#Ref<0.0.0.258911>,sink,undefined}}}],{pipe,<0.27369.1>,[{listkeys,{fitting,<0.27370.1>,#Ref<0.0.0.258911>,{chash,key_of},1}}],{fitting,<0.27367.1>,#Ref<0.0.0.258911>,{riak_kv_pipe_get,bkey_chash},{riak_kv_pipe_get,bkey_nval}}},[{{fitting,<0.27370.1>,#Ref<0.0.0.258911>,{chash,key_of},1},#Ref<0.0.0.258927>}],#Ref<0.0.0.258924>}
** Reason for termination =
** {sink_died,shutdown}

==> crash.log <==
2012-07-23 15:18:57 =CRASH REPORT====
crasher:
initial call: riak_pipe_builder:init/1
pid: <0.27369.1>
registered_name: []
exception exit: {sink_died,shutdown}
in function gen_fsm:terminate/7
in call from proc_lib:init_p_do_apply/3
ancestors: [riak_pipe_builder_sup,riak_pipe_sup,<0.151.0>]
messages: [{'DOWN',#Ref<0.0.0.258927>,process,<0.27370.1>,shutdown}]
links: [<0.154.0>]
dictionary: [{eunit,[{module,riak_pipe_builder},{ref,#Ref<0.0.0.258911>},{spec,[{fitting_spec,listkeys,riak_kv_pipe_listkeys,undefined,{chash,key_of},1,64}]},{options,[{sink,{fitting,<0.27367.1>,#Ref<0.0.0.258911>,{riak_kv_pipe_get,bkey_chash},{riak_kv_pipe_get,bkey_nval}}},{trace,{set,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[error],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}},{log,{sink,{fitting,<0.27185.1>,#Ref<0.0.0.258911>,sink,undefined}}}]},{fittings,[{{fitting,<0.27370.1>,#Ref<0.0.0.258911>,{chash,key_of},1},#Ref<0.0.0.258927>}]}]}]
trap_exit: false
status: running
heap_size: 987
stack_size: 24
reductions: 251
neighbours:
2012-07-23 15:18:57 =SUPERVISOR REPORT====
Supervisor: {local,riak_pipe_builder_sup}
Context: child_terminated
Reason: {sink_died,shutdown}
Offender: [{pid,<0.27369.1>},{name,undefined},{mfargs,{riak_pipe_builder,start_link,undefined}},{restart_type,temporary},{shutdown,brutal_kill},{child_type,worker}]

==> error.log <==
2012-07-23 15:18:56.999 [error] <0.27369.1> gen_fsm <0.27369.1> in state wait_pipeline_shutdown terminated with reason: {sink_died,shutdown}
2012-07-23 15:18:57.001 [error] <0.301.0>@riak_pipe_vnode:new_worker:766 Pipe worker startup failed:fitting was gone before startup
2012-07-23 15:18:57.001 [error] <0.329.0>@riak_pipe_vnode:new_worker:766 Pipe worker startup failed:fitting was gone before startup
2012-07-23 15:18:57.002 [error] <0.269.0>@riak_pipe_vnode:new_worker:766 Pipe worker startup failed:fitting was gone before startup
2012-07-23 15:18:57.019 [error] <0.27369.1> CRASH REPORT Process <0.27369.1> with 0 neighbours crashed with reason: {sink_died,shutdown}
2012-07-23 15:18:57.087 [error] <0.154.0> Supervisor riak_pipe_builder_sup had child undefined started with {riak_pipe_builder,start_link,undefined} at <0.27369.1> exit with reason {sink_died,shutdown} in context child_terminated

riak-admin grep for cookie name fails on comments

The current grep is the following:

COOKIE_ARG=`grep '\-setcookie' $RUNNER_ETC_DIR/vm.args`

It needs a ^ at the beginning, like the riak command already has:

COOKIE_ARG=`grep '^\-setcookie' $RUNNER_ETC_DIR/vm.args`

riak-admin incomplete regex for node name

riak script:
NAME_ARG=egrep '^-s?name' $RUNNER_ETC_DIR/vm.args``

riak-admin script:
NAME_ARG=grep '-[s]*name' $RUNNER_ETC_DIR/vm.args``

This doesn't filter out commented node names.

libssl0.9.8 missing

$ uname -a
Linux server-53911 3.0.0-12-virtual #20-Ubuntu SMP Fri Oct 7 18:19:02 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
$ riak version
Attempting to restart script through sudo -u riak
riak (1.0.2 2011-11-17) Debian x86_64

Installed from deb file: dpkg -i riak_1.0.2-1_amd64.deb.

From /var/log/riak/error.log:

2012-02-11 15:46:15.288 [error] <0.322.0> Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library /usr/lib/riak/lib/crypto-2.0.3/priv/lib/crypto: 'libcrypto.so.0.9.8: cannot open shared object file: No such file or directory'"
OpenSSL might not be installed on this system.
2012-02-11 15:46:15.308 [error] <0.311.0> webmachine error: path="/mapred"{error,{error,undef,[{crypto,sha,[<<131,104,3,98,0,0,5,48,98,0,14,225,71,98,0,4,89,11>>]},{riak_kv_mrc_pipe,'reduce2pipe',5},{riak_kv_mrc_pipe,'-mr2pipe_phases/1-lc$^0/1-0-',3},{riak_kv_mrc_pipe,'-mr2pipe_phases/1-lc$^0/1-0-',3},{riak_kv_mrc_pipe,'mr2pipe_phases',1},{riak_kv_mrc_pipe,mapred_stream,1},{riak_kv_wm_mapred,pipe_mapred,2},{webmachine_resource,resource_call,3}]}}

apt-get install libssl0.9.8 solves the error.

Riak failed to start within XX seconds

After a successful compile of riak on my MacBook Pro running OS X 10.7.3 and Erlang R15B01 I'm still facing an odd issue:

make devrel returned without any errors and I do have dev1 to dev4 directories properly created and configured with different port numbers for all instances of riak.

But now launching riak with (for instance) dev1/riak start command leads to the following error message:

"Riak failed to start within 25 seconds,
see the output of 'riak console' for more information.
If you want to wait longer, set the environment variable
WAIT_FOR_ERLANG to the number of seconds to wait.

I did try to expand the value to 25 seconds, but nothing changed.

Meanwhile running ps aux | grep beam return the following information:

spaquet 12006 0.0 0.4 2548648 34360 s002 Ss+ 6:01PM 0:02.19 /Users/spaquet/Downloads/riak-1.1.2/dev/dev1/erts-5.9.1/bin/beam.smp -K true -A 64 -W w -- -root /Users/spaquet/Downloads/riak-1.1.2/dev/dev1 -progname riak -- -home /Users/spaquet -- -boot /Users/spaquet/Downloads/riak-1.1.2/dev/dev1/releases/1.1.2/riak -embedded -config /Users/spaquet/Downloads/riak-1.1.2/dev/dev1/etc/app.config -pa ./lib/basho-patches -name [email protected] -setcookie riak -- console

and running dev1/bin/riak console returns:
18:10:50.464 [info] Wait complete for application riak_pipe (0 seconds)
18:10:50.655 [info] Wait complete for service riak_pipe (0 seconds)
18:10:50.845 [info] Waiting for application riak_kv to start (0 seconds).
18:10:50.848 [info] Application riak_kv started on node '[email protected]'
18:10:50.855 [info] Application merge_index started on node '[email protected]'
18:10:50.857 [info] Application riak_search started on node '[email protected]'
18:10:50.859 [info] Application cluster_info started on node '[email protected]'
18:10:50.860 [info] Application basho_metrics started on node '[email protected]'
18:10:50.864 [info] Application riak_control started on node '[email protected]'
Eshell V5.9.1 (abort with ^G)
([email protected])1> 18:10:50.947 [info] Wait complete for application riak_kv (0 seconds)
18:10:51.081 [info] Wait complete for service riak_kv (0 seconds)

and curl -H "Accept: text/plain" http://127.0.0.1:8091/stats seems to return valuable information too:
{
"vnode_gets": 0,
"vnode_puts": 0,
"vnode_index_reads": 0,
"vnode_index_writes": 0,
"vnode_index_writes_postings": 0,
"vnode_index_deletes": 0,
"vnode_index_deletes_postings": 0,
"read_repairs": 0,
"vnode_gets_total": 0,
"vnode_puts_total": 0,
"vnode_index_reads_total": 0,
"vnode_index_writes_total": 0,
"vnode_index_writes_postings_total": 0,
"vnode_index_deletes_total": 0,
"vnode_index_deletes_postings_total": 0,
"node_gets": 0,
"node_gets_total": 0,
"node_get_fsm_time_mean": 0,
"node_get_fsm_time_median": 0,
"node_get_fsm_time_95": 0,
"node_get_fsm_time_99": 0,
"node_get_fsm_time_100": 0,
"node_puts": 0,
"node_puts_total": 0,
"node_put_fsm_time_mean": 0,
"node_put_fsm_time_median": 0,
"node_put_fsm_time_95": 0,
"node_put_fsm_time_99": 0,
"node_put_fsm_time_100": 0,
"node_get_fsm_siblings_mean": 0,
"node_get_fsm_siblings_median": 0,
"node_get_fsm_siblings_95": 0,
"node_get_fsm_siblings_99": 0,
"node_get_fsm_siblings_100": 0,
"node_get_fsm_objsize_mean": 0,
"node_get_fsm_objsize_median": 0,
"node_get_fsm_objsize_95": 0,
"node_get_fsm_objsize_99": 0,
"node_get_fsm_objsize_100": 0,
"read_repairs_total": 0,
"coord_redirs_total": 0,
"precommit_fail": 0,
"postcommit_fail": 0,
"cpu_nprocs": 98,
"cpu_avg1": 269,
"cpu_avg5": 228,
"cpu_avg15": 233,
"mem_total": 7182888000,
"mem_allocated": 3969688000,
"nodename": "[email protected]",
"connected_nodes": [

],
"sys_driver_version": "2.0",
"sys_global_heaps_size": 0,
"sys_heap_type": "private",
"sys_logical_processors": 8,
"sys_otp_release": "R15B01",
"sys_process_count": 1358,
"sys_smp_support": true,
"sys_system_version": "Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:8:8] [async-threads:64] [hipe] [kernel-poll:true]",
"sys_system_architecture": "i386-apple-darwin11.3.0",
"sys_threads_enabled": true,
"sys_thread_pool_size": 64,
"sys_wordsize": 8,
"ring_members": [
    "[email protected]"
],
"ring_num_partitions": 64,
"ring_ownership": "[{'[email protected]',64}]",
"ring_creation_size": 64,
"storage_backend": "riak_kv_bitcask_backend",
"pbc_connects_total": 0,
"pbc_connects": 0,
"pbc_active": 0,
"riak_control_version": "0.1.0",
"basho_metrics_version": "1.0.0",
"cluster_info_version": "1.2.1",
"riak_search_version": "1.1.2",
"merge_index_version": "1.1.0",
"riak_kv_version": "1.1.2",
"riak_pipe_version": "1.1.2",
"riak_core_version": "1.1.2",
"lager_version": "1.0.0",
"bitcask_version": "1.5.1",
"basho_stats_version": "1.0.2",
"luke_version": "0.2.5",
"webmachine_version": "1.9.1",
"mochiweb_version": "1.5.1",
"inets_version": "5.9",
"erlang_js_version": "1.0.2",
"runtime_tools_version": "1.8.8",
"os_mon_version": "2.2.9",
"riak_sysmon_version": "1.1.2",
"ssl_version": "5.0.1",
"public_key_version": "0.15",
"crypto_version": "2.1",
"sasl_version": "2.2.1",
"stdlib_version": "1.18.1",
"kernel_version": "2.15.1",
"executing_mappers": 0,
"memory_total": 22649744,
"memory_processes": 7045042,
"memory_processes_used": 7044968,
"memory_system": 15604702,
"memory_atom": 429569,
"memory_atom_used": 401428,
"memory_binary": 62672,
"memory_code": 9040161,
"memory_ets": 810896,
"ignored_gossip_total": 0,
"rings_reconciled_total": 0,
"rings_reconciled": 0,
"gossip_received": 0,
"handoff_timeouts": 0,
"converge_delay_min": "undefined",
"converge_delay_max": -1,
"converge_delay_mean": 0,
"converge_delay_last": "undefined",
"rebalance_delay_min": "undefined",
"rebalance_delay_max": -1,
"rebalance_delay_mean": 0,
"rebalance_delay_last": "undefined",
"riak_kv_vnodes_running": 64,
"riak_kv_vnodeq_min": 0,
"riak_kv_vnodeq_median": 0,
"riak_kv_vnodeq_mean": 0,
"riak_kv_vnodeq_max": 0,
"riak_kv_vnodeq_total": 0,
"riak_pipe_vnodes_running": 64,
"riak_pipe_vnodeq_min": 0,
"riak_pipe_vnodeq_median": 0,
"riak_pipe_vnodeq_mean": 0,
"riak_pipe_vnodeq_max": 0,
"riak_pipe_vnodeq_total": 0

}

But in the end dev1/bin/riak-admin status returns the following message:
Node is not running!

To add one comment: I noticed that it is possible to store information in the riak (rel/riak folder) and to retrieve it as explained in the FastTrack.

so it seems that the database is running while some tools do not see it running ...

Any idea ?

Riak 1.2.0rc6 won't start in SmartOS 1.6.3 zone because of a permissions issue

Steps to reproduce

Create a SmartOS zone using the following dataset and login to the zone

f9e4be48-9466-11e1-bc41-9f993f5dff36 smartos 2012-05-02 sdc:sdc:smartos64:1.6.3

Download and install Riak 1.2.0rc6

curl -O http://s3.amazonaws.com/downloads.basho.com/riak/1.2/1.2.0rc6/smartos/11/riak-1.2.0rc6-SmartOS-i386.tgz
pkg_add riak-1.2.0rc6-SmartOS-i386.tgz

Enable riak-epmd and riak services

svcadm enable riak-epmd
svcadm enable riak

Attempt to ping the riak node

riak ping
Attempting to restart script through sudo -H -u riak
cat: /opt/local/lib/riak/releases/start_erl.data: Permission denied
/opt/local/sbin/riak[97]: /opt/local/lib/riak/erts-/bin/escript: not found [No such file or directory]

Workaround

Change permissions on /opt/local/lib/riak/releases/start_erl.data

chown -R riak:riak /opt/local/lib/riak/releases/start_erl.data

Typo in riak_client:stream_list_keys/4

At line 543 in riak_client, the module name appears to be singular build_filter when perhaps it should be plural build_filters.

This report stems from a ticket (1429) so I am posting the report on behalf of the customer who noticed it. I did verify that the typo is present in Riak 1.1.2 release and Github master.

Thank you,

Brian

Update file RELEASE-NOTES.org

Hi. The file RELEASE-NOTES.org only contains release notes until 1.1.2, current is 1.1.4-1. Is this intended or is the GitHub version not in phase with your downloadable packages? In other words: In which url can the actual, current version of Riak be found, other than going through the file list in http://downloads.basho.com/riak/CURRENT/? Thanks, Jesus

"inet_tcp",{{badmatch,{error,duplicate_name}} start/console bug

Howdy,

This just went out on the mailing list, but it was suggest that I should post here as well.

http://markmail.org/message/pjqo5qbdtepbfhit
http://hastebin.com/wucipobiho - Someone else having the same issue

For some reason and I'm not completely sure of the root cause. My uneducated guess is something with epmd. It seems to be a general erlang issue. ejabberd report, rabbitmq report

After riak start no crash is produced, but any command will see "Node is not up / not responding to pings."

However, if you run riak console, the crash snippet from above is produced.

If you kill -9 all riak processes, and then run riak console, then exit, then riak start the issue vanishes.

Is there a safe way we can handle this issue?

Thanks,

  • Rob

riak-admin status fail with Erlang R15B02

I tried to install Riak using the latest Erlang release (R15B02, compiled from source). I can create buckets, keys, execute MapReduce jobs and setup clusters without problem. But when I try to access the node status, I get an error:

==> /opt/src/riak/1.2.0/rel/riak/log/console.log <==
2012-10-10 04:13:07.344 [info] <0.7.0> Application riak_api started on node '[email protected]'
2012-10-10 04:13:07.347 [info] <0.7.0> Application cluster_info started on node '[email protected]'
2012-10-10 04:13:07.350 [info] <0.7.0> Application riak_control started on node '[email protected]'
2012-10-10 04:13:07.351 [info] <0.7.0> Application erlydtl started on node '[email protected]'
2012-10-10 04:13:07.414 [info] <0.403.0>@riak_core:wait_for_application:419 Wait complete for application riak_kv (0 seconds)
2012-10-10 04:13:07.537 [info] <0.273.0>@riak_core:wait_for_service:439 Wait complete for service riak_kv (0 seconds)
2012-10-10 04:13:10.484 [error] emulator Error in process <0.1541.0> on node '[email protected]' with exit value: {badarg,[{erlang,system_info,[global_heaps_size],[]},{riak_kv_stat,system_stats,0,[{file,"src/riak_kv_stat.erl"},{line,421}]},{riak_kv_stat,produce_stats,0,[{file,"src/riak_kv_stat.erl"},{line,320}]},{timer,tc,3,[{file,"timer... 


2012-10-10 04:13:10.484 [error] <0.1540.0>@riak_kv_console:status:173 Status failed error:function_clause

==> /opt/src/riak/1.2.0/rel/riak/log/crash.log <==

2012-10-10 04:13:10 =ERROR REPORT====
Error in process <0.1541.0> on node '[email protected]' with exit value: {badarg,[{erlang,system_info,[global_heaps_size],[]},{riak_kv_stat,system_stats,0,[{file,"src/riak_kv_stat.erl"},{line,421}]},{riak_kv_stat,produce_stats,0,[{file,"src/riak_kv_stat.erl"},{line,320}]},{timer,tc,3,[{file,"timer... 


==> /opt/src/riak/1.2.0/rel/riak/log/erlang.log.1 <==
04:13:07.347 [info] Application cluster_info started on node '[email protected]'
04:13:07.350 [info] Application riak_control started on node '[email protected]'
04:13:07.351 [info] Application erlydtl started on node '[email protected]'
Eshell V5.9.2  (abort with ^G)
([email protected])1> 04:13:07.414 [info] Wait complete for application riak_kv (0 seconds)
04:13:07.537 [info] Wait complete for service riak_kv (0 seconds)
04:13:10.484 [error] Error in process <0.1541.0> on node '[email protected]' with exit value: {badarg,[{erlang,system_info,[global_heaps_size],[]},{riak_kv_stat,system_stats,0,[{file,"src/riak_kv_stat.erl"},{line,421}]},{riak_kv_stat,produce_stats,0,[{file,"src/riak_kv_stat.erl"},{line,320}]},{timer,tc,3,[{file,"timer...  


04:13:10.484 [error] Status failed error:function_clause

==> /opt/src/riak/1.2.0/rel/riak/log/error.log <==

2012-10-10 04:13:10.484 [error] emulator Error in process <0.1541.0> on node '[email protected]' with exit value: {badarg,[{erlang,system_info,[global_heaps_size],[]},{riak_kv_stat,system_stats,0,[{file,"src/riak_kv_stat.erl"},{line,421}]},{riak_kv_stat,produce_stats,0,[{file,"src/riak_kv_stat.erl"},{line,320}]},{timer,tc,3,[{file,"timer... 

The solution was to compile Riak with Erlang R15B01. Environment data:

# uname -a
Linux squeeze64 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64 GNU/Linux

# aptitude show build-essential
Package: build-essential                 
State: installed
Automatically installed: no
Version: 11.5
Priority: optional
Section: devel
Maintainer: Matthias Klose <[email protected]>
Uncompressed Size: 49.2 k
Depends: libc6-dev | libc-dev, gcc (>= 4:4.4.3), g++ (>= 4:4.4.3), make, dpkg-dev (>= 1.13.5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.