Ola Fashade Samson
Ola Fashade Samson

Reputation: 81

Trying to connect to bitcoin core on Google Compute Engine from an external IP, I was getting "couldn't connect to host error"

I have having issue connecting my bitcoincore from an external ip address (Hostgator to be specific). The Bitcoin core is hosted on Google Compute Engine (Windows Sever 2012).

Here is what i have done

Bitcoin Core Config File

deprecatedrpc=1
dbcache=1000
txindex=1
server=1
rpcuser=myusername
rpcpassword=mypassword
rpcport=8332
rpcallowip = 192.185.35.200

N.B 192.185.35.200 is the dedicated server IP on Hostgator. N.B 35.195.0.35 is the Ip for my VM on Google Compute Engine

I also disabled firewall totally on the windows machine

I specified compute engine firewall rule to allow access for TCP port 8332 and 8333

https://www.yougetsignal.com/tools/open-ports/ shows the 2 port as opened

But still, i can't get JSONRPC to talk to the bitcoincore. What i am getting is "Could't connect to host" . When i make a call to with the EasyBitcoin Library.

<?php

include('easybitcoin.php');

$bitcoin = new Bitcoin('myusername','mypassword','35.195.0.35','8332');

$info = $bitcoin->getinfo();

print_r($info);


?>

What am i missing

Upvotes: -1

Views: 234

Answers (1)

Tux
Tux

Reputation: 2075

Your server in Google Cloud appears to be listening (I was able to reach it on the port), so probably there is some configuration issue either on bitcore or the JSONRPC.

I'm wondering, did you try to change rpcallowip = 192.185.35.200 to rpcallowip=192.185.35.200 ?

Oh, also keep in mind that if you are doing this from a trial account you are violating the TOS and will get your project terminated.

2.2 Customer may not use the Services to engage in mining cryptocurrency;

These terms don't apply if you have a full account, though.

Upvotes: 1

Related Questions