0

I was in riak-shell when ssh lost its connection to the server. After reconnecting, I do the following:

sudo riak-shell

and get:

An instance of riak-shell is already running

So, I restarted the riak node in question. This did not seem to solve the problem. I do not see anything using ps -aux to kill. According to the docs, only one instance can run at a time. That makes sense, but when I run riak-shell from another node and try to connect to any node, I now get the following:

Error: invalid function call : connection_EXT:connect ["riak@<<<ip_address_elided>>>"]
You can connect to a specific node (whether in your riak_shell.config
or not) by typing 'connect "dev1@127.0.0.1";' substituting your
node name for dev1.

You may need to change the Erlang cookie to do this.

See also the 'reconnect' command.
Unhandled message received is {#Ref<0.0.0.135>,disconnected}

riak-shell(3)>

I have not changed the cookies during this process, and the cookie appears to be the same (at least in /etc/riak/riak_shell.config). (I am running the Riak TS AMI on AWS.)

augb
  • 85
  • 7

1 Answers1

5

riak-shell runs in its own Erlang VM - entirely separate from the riak node

(You don't need to run riak-shell from the machine your node is on - it uses the normal riak-erlang-client to talk to riak)

If you you are on a Linux do ps aux | grep riak_shell_app it will give you the process number you need to kill that instance: 08:30:45:~ $ ps aux | grep riak_shell_app vagrant 4671 0.0 0.3 493260 34884 pts/4 Sl+ Aug17 0:03 /home/vagrant/riak_ee/dev/dev1/erts-5.10.3/bin/beam.smp -- -root /home/vagrant/riak_ee/dev/dev1 -progname erl -- -home /home/vagrant -- -boot /home/vagrant/riak_ee/dev/dev1/releases/2.1.1/start_clean -run riak_shell_app boot debug_off /home/vagrant/riak_ee/dev/dev1/bin/../log/riak_shell/riak_shell -noshell -config /home/vagrant/riak_ee/dev/dev1/bin/../etc/riak

I wrote a good chunk of it so let me know how you got on: https://github.com/basho/riak_shell/graphs/contributors

Gordon Guthrie
  • 6,252
  • 2
  • 27
  • 52