OmniLayer / omnicore

OmniCore staging tree
http://www.omnilayer.org/
MIT License
758 stars 231 forks source link

Not responding to rpc commands #588

Open skinderis opened 6 years ago

skinderis commented 6 years ago

Hi, I am trying to run my docker image with docker-compose up, but external rpc calls are refused. When I run it with docker run, I get results. But when i run docker-compose up, I can't get any result from calling rpc method. I try to curl with -vv flag and it shows:

...
* upload completely sent off: 64 out of 64 bytes
< HTTP/1.1 403 Forbidden
< Date: Tue, 10 Apr 2018 20:51:06 GMT
< Content-Length: 0
< Content-Type: text/html; charset=ISO-8859-1
< 
* Curl_http_done: called premature == 0
* Connection #0 to host 172.25.0.1 left intact

My .conf file:

rpcuser=user
rpcpassword=password
rpcallowip=172.1.2.3/24
rpcport=13544
server=1
port=13543
daemon=0
txindex=1

docker-compose.yml file:

version: '3'
services:
    omnicore:
      image: omnicore-docker
      ports:
       - 13543:13543
       - 13544:13544
      volumes:
       - ~/Desktop/omnicore-docker/omnicore_data:/root/omnicore/data/
      command: ./start.sh
      restart: always
dexX7 commented 6 years ago

Hi there,

I fear I'm not familiar enough to help with Docker.

Your bitcoin.conf looks fine though.

skinderis commented 6 years ago

Solved it by providing ip of the omnicored container, which was 172.25.0.1. I have added 24 mask, which means that ip address can be 172.X.X.X, so 172.1.2.3/24 should work too, but it wasn't.

rpcallowip=172.25.0.1/24

dexX7 commented 6 years ago

Awesome, I'm happy to hear that!