Bitcoin Forum
July 27, 2024, 12:19:19 PM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: AddPortMapping(...) failed with code 501 and other questions  (Read 70 times)
odolvlobo (OP)
Legendary
*
Offline Offline

Activity: 4396
Merit: 3299



View Profile
July 21, 2024, 09:56:57 AM
Merited by LFC_Bitcoin (3), ABCbits (3)
 #1

Several questions related to syncing my node.

Windows 11 with 16 GB ram and HDD with 707 GB free. Bitcoin Core 25.0.

Configuration file:

Code:
# Listen for incoming connections on non-default port.
port=8335                       # because rp-node-1 uses 8333

# Add a node IP address to connect to and attempt to keep the connection open. This option can be set multiple times.
addnode=192.168.1.119:8333      # rp-node-1

# Accept incoming connections from peers.
listen=1

# Accept command line and JSON-RPC commands.
server=1

# Initial block download optimizations
dbcache=2000
blocksonly=1

1. I see this in the Bitcoin Core debug.log every 5 minutes:

Code:
2024-07-21T09:25:40Z UPnP: ExternalIPAddress = 98.---.---.---
2024-07-21T09:25:40Z AddLocal(98.---.---.---:8335,3)
2024-07-21T09:25:40Z AddPortMapping(8335, 8335, 192.168.1.100) failed with code 501 (Action Failed)
2024-07-21T09:25:40Z UPNP_DeletePortMapping() returned: 714

I set the port to 8335 because I have another node on the local net using 8333. The router is forwarding both 8333 and 8335. Do these messages indicate a problem?


2. Syncing is slow (I receive a block every 30 seconds or so). This node uses a HDD, so maybe that is a factor. There are 5 outbound connections and 1 inbound (the other node has addnode=192.168.1.100:8335).

3. I assume that syncing locally would be faster than over the internet. The peer's ping is 0 ms. Is there a way to prioritize the local peer? Currently, there is hardly any data going between the two nodes (received is only 3kB).


Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
DaveF
Legendary
*
Offline Offline

Activity: 3556
Merit: 6431


Crypto Swap Exchange


View Profile WWW
July 21, 2024, 12:55:50 PM
 #2

*I think* the addportmapping & deleteportmapping are both for the UPNP to your router since you said you have the static port maps it fails.

How far along with the sync are you that you are only getting the 1 block per 30 seconds. The HDD will be slow but not that slow.
Can you addnode=the other private IP on the .100 machine and see if both of them have the other listed in the peers.

-Dave


█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
odolvlobo (OP)
Legendary
*
Offline Offline

Activity: 4396
Merit: 3299



View Profile
July 21, 2024, 07:03:10 PM
Last edit: July 21, 2024, 07:33:14 PM by odolvlobo
 #3

How far along with the sync are you that you are only getting the 1 block per 30 seconds. The HDD will be slow but not that slow.

Only 3 weeks behind now (was 6). I guess the slowness may have something to do with the number connections or the performance of the connected nodes. It's up to 8 out and (still) 1 in, and occasionally it is down to about 15 seconds per block. Also, the lack of inbound nodes is strange. I think I have the router configured correctly, but the AddPortMapping error makes me wonder.

Can you addnode=the other private IP on the .100 machine and see if both of them have the other listed in the peers.

I have two local nodes, 100 and 119. Both list each other as connected peers.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
NotATether
Legendary
*
Offline Offline

Activity: 1680
Merit: 7076


In memory of o_e_l_e_o


View Profile WWW
July 22, 2024, 05:08:53 AM
 #4

Can you addnode=the other private IP on the .100 machine and see if both of them have the other listed in the peers.

I have two local nodes, 100 and 119. Both list each other as connected peers.

That makes sense since Bitcoin Core is also listening on your LAN (or WLAN)'s local interface by default.

How far along with the sync are you that you are only getting the 1 block per 30 seconds. The HDD will be slow but not that slow.

Only 3 weeks behind now (was 6). I guess the slowness may have something to do with the number connections or the performance of the connected nodes. It's up to 8 out and (still) 1 in, and occasionally it is down to about 15 seconds per block. Also, the lack of inbound nodes is strange. I think I have the router configured correctly, but the AddPortMapping error makes me wonder.

Can you actually ping the node from the outside world though? Get the IP address you see on bitcoin-cli getnetworkinfo | jq '.localaddresses' (or just get the IPV4 address you see in the localaddresses key) and try to ping it using telnet on some far away computer not connected to your network: telnet <ip> 8333.
odolvlobo (OP)
Legendary
*
Offline Offline

Activity: 4396
Merit: 3299



View Profile
July 22, 2024, 07:16:31 AM
 #5

Can you actually ping the node from the outside world though? Get the IP address you see on bitcoin-cli getnetworkinfo | jq '.localaddresses' (or just get the IPV4 address you see in the localaddresses key) and try to ping it using telnet on some far away computer not connected to your network: telnet <ip> 8333.

I was able to telnet from an outside network to port 8335.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
NotATether
Legendary
*
Offline Offline

Activity: 1680
Merit: 7076


In memory of o_e_l_e_o


View Profile WWW
July 22, 2024, 08:15:41 AM
 #6

I was able to telnet from an outside network to port 8335.

Right, port 8335. Sorry.

What happens if you try to make another node from outside connect to this network?

If you don't have such a node, you can PM me the IP address and I'll try to initiate a connection from my own node.

If that is successful, then I don't think that your node has a listening-for-connections problem.
ranochigo
Legendary
*
Online Online

Activity: 3010
Merit: 4262


Crypto Swap Exchange


View Profile
July 22, 2024, 08:59:13 AM
 #7

The error should be relating to your UPnP setup, which should indicate that UPnP failed when trying to open the specific port. Probably just that your router isn't supporting UPnP, not too big of an issue you just need to open it yourself.

The more important thing would probably to understand how your system resources are looking, how's your I/O performance, RAM usage, CPU usage when you're running Core. Since the IBD is parallelized, I don't think there would be a big benefit with synchronizing locally unless your internet is extremely slow such that it becomes a bottleneck. Something that I also realized recently is that I had no inbound peers connecting to me until I finished IBD, so that might explain your lack of inbound assuming that your port mapping is okay.

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
ABCbits
Legendary
*
Offline Offline

Activity: 2954
Merit: 7706


Crypto Swap Exchange


View Profile
July 22, 2024, 09:00:33 AM
Merited by DaveF (2)
 #8

2. Syncing is slow (I receive a block every 30 seconds or so). This node uses a HDD, so maybe that is a factor. There are 5 outbound connections and 1 inbound (the other node has addnode=192.168.1.100:8335).

I also use HDD to store all data (with higher dbcache value), but never experience such slowness. Have you tried setting higher dbcache value?

3. I assume that syncing locally would be faster than over the internet. The peer's ping is 0 ms. Is there a way to prioritize the local peer? Currently, there is hardly any data going between the two nodes (received is only 3kB).

You could try replacing addnode with connect, which force it only obtain data from other local node.

[1] https://bitcointalk.org/index.php?topic=5407675.0

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!