Bitcoin Forum
June 07, 2024, 06:35:43 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Prevent Bitcoin connect to tor servers  (Read 115 times)
liorko87 (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 6


View Profile
February 25, 2021, 12:24:56 PM
 #1

I'm running two private bitcoin on my local machine for tests.
At one of the nodes I received this error:

Code:
Unable to bind to 127.0.0.1:18334 on this computer. Bitcoin Core is probably already running.

This port is the default for tor connections. I want to prevent from my bitcoin to use tor connections and dismiss this error.
I tried to add this option-onlynet="ipv4" to my bitcoin.conf but it didn't solve the issue.

What I'm doing wrong?


ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
February 25, 2021, 12:35:41 PM
 #2

Looks like it's listening to peers through Tor so you would have to disable Bitcoin Core from using Tor at all, not just connecting to clearnet only.

Try listenonion=0?

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
liorko87 (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 6


View Profile
February 25, 2021, 12:42:17 PM
 #3

EDIT:I'm using bitcoin v0.21

I added it to the end of my bitcoin.conf and nothing changed.

bitcoin0.conf file:

Code:

testnet=1

rpcauth=user:very_long_password

server=1
listenonion=0

[test]
bind=127.0.0.1:17001
rpcallowip=127.0.0.1
rpcbind=127.0.0.1
rpcport=18001
txindex=1


bitcoin1.conf file:

Code:

testnet=1

rpcauth=user:very_long_password

server=1
listenonion=0

[test]
bind=127.0.0.1:17002
rpcallowip=127.0.0.1
rpcbind=127.0.0.1
rpcport=18002
txindex=1

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
February 26, 2021, 08:28:19 PM
 #4

Are you running on Windows or Linux (or MacOSX)? Huh

Have you confirmed (ie. with netstat) that it is actually a Bitcoin Core process that is using port 18334 and not some other system process? Huh

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
liorko87 (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 6


View Profile
February 27, 2021, 05:29:52 PM
 #5

I'm working on Ubuntu 20.04 LTS.
I'm running locally two instances of bitcoind on my computer.

In one of the instances, it's written at the log:
Code:
Bound to 127.0.0.1:18334

At the other node it's written:
Code:
Unable to bind to 127.0.0.1:18334 on this computer. Bitcoin Core is probably already running.

At the previous version of bitcoin (v0.20.1) it wasn't an issue at all.
I'm not interested at using Tor connections right now.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
February 27, 2021, 07:11:31 PM
 #6

I'm not interested at using Tor connections right now.
Then it probably isn't an issue... the 2nd instance cannot bind to that port as obviously it is already in used by the 1st instance of Bitcoin Core...

It shouldn't be preventing the 2 instances from talking to other nodes (or each other), so you can just ignore the error.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
liorko87 (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 6


View Profile
February 27, 2021, 07:45:15 PM
 #7

I'm totally understand that if one port is used, then the other cannot used it.
The tor connections cannot prevent the nodes from syncing via TCP?
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
February 27, 2021, 07:52:16 PM
 #8

No. Unless you are using the "onlynet=onion" option which makes all outbound connections via Tor... but that still doesn't affect inbound connections.

So, the nodes should still be able to sync quite happily over ipv4 (and ipv6) connections... regardless of whether or not the node has been able to bind to 18334 for tor. If you're not interesting in tor, just ignore the error.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
NotATether
Legendary
*
Online Online

Activity: 1624
Merit: 6874


bitcoincleanup.com / bitmixlist.org


View Profile WWW
February 28, 2021, 06:57:09 AM
 #9

Just binding to a given port does not mean that it can listen to Tor connections. In particular, if you do not have Tor running on port 9050 (and it sounds like you don't) then Core won't be able to send Tor traffic on port 18334 (which is always bound if you're using the equivalent of -bind=address:port=onion in your configuration file or command line options.

The manpage says:

-bind=<addr>[:<port>][=onion]

Bind to given address and always listen on it (default: 0.0.0.0). Use [host]:port notation for IPv6. Append =onion to tag any incoming connections to that address and port as incoming Tor connections (default: 127.0.0.1:8334=onion, testnet: 127.0.0.1:18334=onion, signet: 127.0.0.1:38334=onion, regtest: 127.0.0.1:18445=onion)

So as you can see, it just flags connections to this IP/ports as Tor connections, but this does not mean it can actually connect to them.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!