http - Riak - Connection Refused while trying to connect to Riak cluster using Python client library -


i riak newbie. installed riak 2.1.1 source on local machine while following instructions at: https://docs.basho.com/riak/latest/ops/building/installing/mac-osx/

i started 3 nodes , pinged 3 nodes , received 'pong' response.

i joined joined 3 nodes create cluster. checking cluster member status:

dev1/bin/riak-admin member-status ================================= membership ================================== status     ring    pending    node ------------------------------------------------------------------------------- valid      34.4%      --      'dev1@127.0.0.1' valid      32.8%      --      'dev2@127.0.0.1' valid      32.8%      --      'dev3@127.0.0.1' ------------------------------------------------------------------------------- valid:3 / leaving:0 / exiting:0 / joining:0 / down:0 

i looked @ riak.config file in rel/riak/etc/ directory , saw following has been set:

## listener.http.<name> ip address , tcp port riak ## http interface bind. ##  ## default: 127.0.0.1:8098 ##  ## acceptable values: ##   - ip/port pair, e.g. 127.0.0.1:10011 listener.http.internal = 127.0.0.1:8098  ## listener.protobuf.<name> ip address , tcp port riak ## protocol buffers interface bind. ##  ## default: 127.0.0.1:8087 ##  ## acceptable values: ##   - ip/port pair, e.g. 127.0.0.1:10011 listener.protobuf.internal = 127.0.0.1:8087 

i installed riak python client using pip. following riak python client docs @ http://riak-python-client.readthedocs.org/en/2.1.0/client.html.

the following python script:

import riak  client = riak.riakclient(pb_port=8087,protocol='pbc')  print 'finished'  user_bucket = client.bucket('user')  val1 = 1 key1 = user_bucket.new('one', data=val1) key1.store()  print 'finished2' 

however, running python script gives following error:

/library/python/2.7/site-packages/riak/security.py:35: userwarning: found openssl 0.9.8zd 8 jan 2015 version, expected @ least openssl 1.0.1g.  security may not support tls 1.2.   warnings.warn(msg, userwarning) finished traceback (most recent call last):   file "/users/me/documents/project/riakdataloader/src/dataloader.py", line 11, in <module>     **key1.store()**   file "/library/python/2.7/site-packages/riak/riak_object.py", line 286, in store     timeout=timeout)   file "/library/python/2.7/site-packages/riak/client/transport.py", line 196, in wrapper     return self._with_retries(pool, thunk)   file "/library/python/2.7/site-packages/riak/client/transport.py", line 151, in _with_retries     raise e.args[0] socket.error: [errno 61] connection refused 

all nodes running before ran python script.

i tried following command on terminal using http port:

$ curl -xput http://127.0.0.1:8098/buckets/welcome/keys/german  -h 'content-type: text/plain'  -d 'herzlich willkommen' curl: (7) failed connect 127.0.0.1 port 8098: connection refused 

what may cause of connection refused error? have been chasing problem hours. appreciated!

since using several dev nodes config files under dev directory, such dev/dev1/etc/riak.conf. you'll need check there see ports being used protocol buffers listener each node.. configuration under rel directory suitable running single node on machine.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -