rsksmart / artifacts

18 stars 57 forks source link

Problem connecting to rsk via 4444 #15

Closed chompomonim closed 6 years ago

chompomonim commented 6 years ago

I'm building and running docker exactly as mentioned in README:

docker ps shows me 1c368e2b9865 mainnet "/usr/bin/supervisord" 2 minutes ago Up 2 minutes 0.0.0.0:4444->4444/tcp, 0.0.0.0:50505->50505/tcp, 5050/tcp testnet-node-01

However I can't connect into it using console :/

$node console.js -server localhost:4444
RSK > web3.eth.blockNumber
Connection could not be established. Please try again.
bcodesido commented 6 years ago

Hi, It's seems to be related to the default configuration of the node where rpc only is listening in localhost. A workaround to this situation could be:

  1. Connect to the container: docker exec -it testnet-node-01 /bin/bash

  2. Install an editor of your preferece, ex vim: apt-get update && apt-get install vim

  3. Edit the node config file and change how rpc is listening in line 197,

    address = "0.0.0.0"

    Also you going to need to enable the host headers, by uncommenting the line 199:

    host = ["localhost", "private.ip", "external.ip", "example.com", "www.example.com"]

We are going to fix this issue in the following versions.

bcodesido commented 6 years ago

This was fixed in the last release