Bitcoin Forum
April 19, 2024, 10:24:45 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / BTCD node.js ERROR:Error: connect ECONNREFUSED on: September 16, 2018, 06:49:06 PM
I am running the golang implementation of bitcoin and trying to query the JSON-RPC API remotely. I am trying with the example demonstrated here but I get an error saying the connection was refused.

I have configured rpcuser and rpcpass in both btcd.conf and btcctl.conf, I have also tried generating new key and cert with the gencerts command
Code:
gencerts -d /home/user/.certsforhosts/ -H 192.168.0.104
but I still get the same error.

What might be wrong with my configuration?

btcd.conf
Code:
datadir=/home/user/blockchain/

rpcuser=user1
rpcpass=pass1
rpclimituser=user2
rpclimitpass=pass2

txindex=1
addrindex=1

rpccert=/home/user/.certsforhosts/rpc.cert
rpckey=/home/user/.certsforhosts/rpc.key

btcctl.conf
Code:
rpcuser=user1
rpcpass=pass1
rpccert=/home/user/.certsforhosts/rpc.cert

my code
Code:
var fs = require('fs');
var WebSocket = require('ws');

var cert = fs.readFileSync('path/to/my/rpc.cert');
var user = "user1";
var password = "pass1";

var ws = new WebSocket('wss://192.168.0.102:8334/ws', {
  headers: {
    'Authorization': 'Basic '+Buffer.from(user+':'+password).toString('base64')
  },
  cert: cert,
  ca: [cert]
});

ws.on('open', function() {
    console.log('CONNECTED');

    ws.send('{"jsonrpc":"1.0","id":"0","method":"notifyblocks","params":[]}');
});
ws.on('message', function(data, flags) {
    console.log(data);
});
ws.on('error', function(derp) {
  console.log('ERROR:' + derp);
})
ws.on('close', function(data) {
  console.log('DISCONNECTED');
})
2  Bitcoin / Development & Technical Discussion / getconnectioncount on: April 14, 2018, 05:14:49 PM
Code:
bitcoin-cli getconnectioncount
Gives me an amount of 86 connections, my node has been running for a couple of months with 100% uptime. educational purposes

Is this a high number of connections? How many does your node have?
I would also like to know if your node is visible on https://bitnodes.earn.com/ or not, mine shows up there around 9/10 times I check.

The same site also says:

Quote
The crawler maintained by Bitnodes connects from these IP addresses: 136.243.139.96, 136.243.139.120, 2a01:4f8:212:3b1f::2

Are these IP addresses usable with the
Code:
-addnode=<ip>
configuration?
3  Bitcoin / Bitcoin Technical Support / Updating full node on: November 14, 2017, 03:52:24 PM
Greetings!

I just started running a full node on raspberry pi 3 in order to help the network.
Everything seems to be working just fine but the problem is that my node version is 0.13.x

When I installed my node I followed this guide https://bitcoin.org/en/full-node#linux-instructions

Code:
sudo apt-get install bitcoin-qt
This command installed the dated version. Is it possible to get the latest version 0.15.1 with GUI for raspberry pi? If so, how?

Is it useless to run a node with dated version?

I have downloaded the ARM Linux 32-bit and it did not come with a bitcoin-qt.

Thank you.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!