Author

Topic: Bitcoind - help please! (Read 245 times)

legendary
Activity: 1624
Merit: 2481
July 31, 2019, 02:05:55 AM
#13
I had a similar issue when I was hosting shitcoin masternodes.

So I added in one extra line in the wallet conf file

Code:
listen=1


You don't need to explicitly set listen=1, since it is enabled by default (if you are not using connect).



Code:
ufw allow ssh/tcp 
ufw allow 11333/tcp

11333 was the port.

I had sudo access.

Without these codes my daemons would not run and would return a connection refused or connection timed out error.

Since OP set up two virtual machines, i doubt he has installed a firewall and restricted the access.
Especially since he was able to access the interface from his 2nd (client-) machine, but no longer from the server itself via loopback.



I still belief the following addition should work:
Code:
rpcbind=127.0.0.1
rpcbind=192.168.1.11

rpcallowip=127.0.0.1
rpcallowip=192.168.1.13   # or 192.168.1.0/24 if you want to be able to access it from the whole local network
hero member
Activity: 1778
Merit: 764
www.V.systems
July 30, 2019, 01:48:11 PM
#12
I had a similar issue when I was hosting shitcoin masternodes.

So I added in one extra line in the wallet conf file

Code:
listen=1

And I also did this in the server main screen:

Code:
ufw allow ssh/tcp 
ufw allow 11333/tcp

11333 was the port.

I had sudo access.

Without these codes my daemons would not run and would return a connection refused or connection timed out error.
legendary
Activity: 1624
Merit: 2481
July 30, 2019, 07:04:07 AM
#11
Alright, never mind.

My proposed solution does not work since 0.18.0:

Code:
rpcbind=127.0.0.1
rpcbind=192.168.1.11

together with:

Code:
rpcallowip=127.0.0.1
rpcallowip=192.168.1.13   # or 192.168.1.0/24 if you want to be able to access it from the whole local network

should work for your setup.
legendary
Activity: 2317
Merit: 2318
July 30, 2019, 06:54:18 AM
#10
Is there a way I can rpcbind to both local and external?

Code:
rpcbind=127.0.0.1
rpcbind=192.168.1.11

You also can bind bitcoind to all IPv4 interfaces:
Code:
rpcbind=0.0.0.0
legendary
Activity: 1624
Merit: 2481
July 30, 2019, 06:48:39 AM
#9
Can you try it without rpcbind and with the following:

Code:
rpcallowip=192.168.1.0/24


This should work. If not, you might find an anomaly in the logs.
Feel free to post them here if you need help inspecting them (using a service like pastebin for example).
newbie
Activity: 6
Merit: 2
July 30, 2019, 06:41:56 AM
#8
Is there a way I can rpcbind to both local and external? or tell bitcoin-cli to use the network ip?

Just don't use the rpcbind statement at all.

With IPs in rpcallow and no rpcbind, your server will listen on all interfaces (including loopback).
This should allow you to connect to it from outside of your network (i.e. in this case from the other VM) and from localhost.

I had that previously but it wouldn't work with just rpcallowip

can you look at my bitcoin.conf above and tell me if you can see the issue?
legendary
Activity: 1624
Merit: 2481
July 30, 2019, 06:37:24 AM
#7
Is there a way I can rpcbind to both local and external? or tell bitcoin-cli to use the network ip?

Just don't use the rpcbind statement at all.

With IPs in rpcallow and no rpcbind, your server will listen on all interfaces (including loopback).
This should allow you to connect to it from outside of your network (i.e. in this case from the other VM) and from localhost.
newbie
Activity: 6
Merit: 2
July 30, 2019, 06:31:30 AM
#6
Thanks for your reply, I thought this - how can I change this?
rpcbind=192.168.1.11 in your bitcoin.conf

At least, that should work... I'm not sitting behind my own desk at the moment, so i can't actually look trough the documentation right now Smiley


One last question, Now when I type into the VM with bitcoind 'bitcoin-cli getinfo' i get the following error:
Code:
root@BitcoinD-VirtualBox:~# bitcoin-cli getinfo
error: Could not connect to the server 127.0.0.1:19915

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.


Is there a way I can rpcbind to both local and external? or tell bitcoin-cli to use the network ip?
newbie
Activity: 6
Merit: 2
July 30, 2019, 05:58:21 AM
#5
Thanks for your reply, I thought this - how can I change this?
rpcbind=192.168.1.11 in your bitcoin.conf

At least, that should work... I'm not sitting behind my own desk at the moment, so i can't actually look trough the documentation right now Smiley

IT WORKS!! You sir a life saver, I'm forever grateful.

Strange how I never came across rpcbind before!
legendary
Activity: 3584
Merit: 5248
https://merel.mobi => buy facemasks with BTC/LTC
July 30, 2019, 05:05:15 AM
#4
Thanks for your reply, I thought this - how can I change this?
rpcbind=192.168.1.11 in your bitcoin.conf

At least, that should work... I'm not sitting behind my own desk at the moment, so i can't actually look trough the documentation right now Smiley
newbie
Activity: 6
Merit: 2
July 30, 2019, 05:03:45 AM
#3
it's listening on the loopback address only...

Thanks for your reply, I thought this - how can I change this?
legendary
Activity: 3584
Merit: 5248
https://merel.mobi => buy facemasks with BTC/LTC
July 30, 2019, 05:03:13 AM
#2
it's listening on the loopback address only...
127.0.0.1:19915 instead of 0.0.0.0:19915
newbie
Activity: 6
Merit: 2
July 30, 2019, 04:54:32 AM
#1
Hi Guys,

Hope you can help me.

I've got two virtual machines setup.

VM#1 is setup as a bitcoin node

VM#2 is the server trying to reach BTC node


VM#1 Bitcoin.conf:
Code:
   server=1
   rpcuser=testuser
   rpcpassword=testpassword
   rpcport=19915
   rpcallowip=192.168.1.13

VM#1 - Shows its listening on port
 https://i.imgur.com/59P100s.png


I did a test through curl to see if I could generate a wallet, This worked (running on the #1 vm itself):
Code:
curl --user testuser:testpassword --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getnewaddress","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:19915


When I use the VMs IP address from VM #2 or even on the vm itself, it shows as connection refused:
Code:
curl --user testuser:testpassword --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getnewaddress","params":[]}' -H 'content-type:text/plain;' http://192.168.1.11:19915

So it works using the loopback/local address 127.0.0.1 but not the machine ip on the network for some reason or there's a setting I haven't did correctly.

Can anyone please shed any light on what could be causing this? it's driving me crazy.


Additional Info:
  - Firewall disabled
  - Running on Oracle VM VirtualBox
  - Network Adapter
           - Bridged Adapter on WIFI card
           - Promiscuous Mode: Allow All
           - Cable Connected: Ticked.



Hope this enough info to help.
Jump to: