Error in using Savoir on Ubuntu

+1 vote

>>> from Savoir import Savoir

>>> 

>>> rpcuser='multichainrpc'

>>> rpcpasswd='2Swdfbx8FQJ9mdGmWWxVZL1eGSqxdkPGAU8dWkMf4vUw'

>>> rpchost = 'localhost'

>>> rpcport = '4245'

>>> chainname = 'chain0'

>>> api = Savoir(rpcuser, rpcpasswd, rpchost, rpcport, chainname)

>>> api.getinfo()

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/home/ubuntu/.local/lib/python2.7/site-packages/Savoir/Savoir.py", line 58, in __call__

    r = requests.post(url, data=encoded, headers=self.__headers)

  File "/home/ubuntu/.local/lib/python2.7/site-packages/requests/api.py", line 110, in post

    return request('post', url, data=data, json=json, **kwargs)

  File "/home/ubuntu/.local/lib/python2.7/site-packages/requests/api.py", line 56, in request

    return session.request(method=method, url=url, **kwargs)

  File "/home/ubuntu/.local/lib/python2.7/site-packages/requests/sessions.py", line 488, in request

    resp = self.send(prep, **send_kwargs)

  File "/home/ubuntu/.local/lib/python2.7/site-packages/requests/sessions.py", line 609, in send

    r = adapter.send(request, **kwargs)

  File "/home/ubuntu/.local/lib/python2.7/site-packages/requests/adapters.py", line 473, in send

    raise ConnectionError(err, request=request)

requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))

 

My ports open ports seem to be correct (from netstat --listen):

tcp        0      0 localhost:4244          *:*                     LISTEN     

tcp        0      0 *:4245                  *:*                     LISTEN     

tcp        0      0 *:ssh                   *:*                     LISTEN     

asked Mar 9, 2017 by madhavsharma
reshown Mar 9, 2017 by MultiChain
Hi! I suggest you to double-check the information for the RPC in the params.dat and multichain.conf. Looks like you're trying to connect to the network port instead of the rcp port.

Please log in or register to answer this question.

...