Skip to content

log: frequent pcp: Mapping failed with result NOT_AUTHORIZED (code 2) logs as net:warning #34114

Closed

Description

@0xB10C

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

On my node at home (not a monitoring node), I'm seeing three pcp: Mapping failed with result NOT_AUTHORIZED (code 2) logs every five minutes logged as net:warnings. I think that's too frequent.

...
2025-12-19T10:32:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:32:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:32:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:37:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:37:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:37:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:42:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:42:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:42:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:47:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:47:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:47:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:52:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:52:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:52:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:57:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:57:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T10:57:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T11:00:54Z Flushed fee estimates to fee_estimates.dat.
2025-12-19T11:02:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T11:02:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
2025-12-19T11:02:26Z [net:warning] pcp: Mapping failed with result NOT_AUTHORIZED (code 2)
...

Expected behaviour

Fewer of the pcp warnings.

Steps to reproduce

Run a node behind a router that returns NOT_AUTHORIZED for PCP (?)

Relevant log output

No response

How did you obtain Bitcoin Core

Package manager

What version of Bitcoin Core are you using?

v30.0 (via nixpkgs)

Operating system and version

NixOS

Machine specifications

Machine is behind a home internet router with PCP disabled by default. I'm running the node with txindex=1, addnode, and otherwise default configuration.

Activity

  1. 0xB10C commented on Dec 19, 2025

    @0xB10C
    ContributorAuthor

    My understanding is that this is a different log message from #33301 and bitcoinknots#184. However, I haven't checked if #33311 fixed it too.

    edit: It seems related, but is a different log message.

    LogWarning("pcp: Mapping failed with result %s\n", PCPResultString(result_code));

  2. changed the title [-]bug: log: frequent `pcp: Mapping failed with result NOT_AUTHORIZED (code 2)` logs as `net:warning`[/-] [+]log: frequent `pcp: Mapping failed with result NOT_AUTHORIZED (code 2)` logs as `net:warning`[/+] on Dec 19, 2025
  3. fanquake commented on Dec 19, 2025

    @fanquake
    Member
  4. added a commit that references this issue on Dec 19, 2025
    78e7259
  5. added a commit that references this issue on Jan 22, 2026
    00354e1
  6. added a commit that references this issue on Feb 20, 2026
    96bec21
  7. added a commit that references this issue on Feb 20, 2026
    412725b
  8. added a commit that references this issue on Feb 21, 2026
    a91c11a
  9. added a commit that references this issue on May 8, 2026
    024e536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions