[GH-ISSUE #1106] DNS resolution spam for registry.npmjs.org #725

Closed
opened 2026-03-02 11:52:12 +03:00 by kerem · 3 comments
Owner

Originally created by @vmpyr on GitHub (Mar 10, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1106

Describe the Bug

Thanks to my pihole setup, I got to know that hoarder sends around 3-4 DNS resolution queries for registy.npmjs.org per second! This is definitely undesirable, since this causes CPU usage issues on my DNS resolver (pihole) and may also overwhelm DNS request limits for some other providers.

I'm not sure what is causing this, but I'm pretty sure its the hoarder container and not the meilisearch or chrome containers. I might try to look into what is actually causing this if I get some time.

Steps to Reproduce

  1. Spin up a hoarder docker container.
  2. Use tcpdump to monitor DNS request traffic.
  3. You'll see the DNS resolution requests being spammed for registy.npmjs.org.

Expected Behaviour

No DNS resolution spam

Screenshots or Additional Context

No response

Device Details

Debian 12 VM running the hoarder docker container

Exact Hoarder Version

0.22.0

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem
Originally created by @vmpyr on GitHub (Mar 10, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1106 ### Describe the Bug Thanks to my pihole setup, I got to know that hoarder sends around 3-4 DNS resolution queries for `registy.npmjs.org` per second! This is definitely undesirable, since this causes CPU usage issues on my DNS resolver (pihole) and may also overwhelm DNS request limits for some other providers. I'm not sure what is causing this, but I'm pretty sure its the hoarder container and not the `meilisearch` or `chrome` containers. I might try to look into what is actually causing this if I get some time. ### Steps to Reproduce 1. Spin up a hoarder docker container. 2. Use `tcpdump` to monitor DNS request traffic. 3. You'll see the DNS resolution requests being spammed for `registy.npmjs.org`. ### Expected Behaviour No DNS resolution spam ### Screenshots or Additional Context _No response_ ### Device Details Debian 12 VM running the hoarder docker container ### Exact Hoarder Version 0.22.0 ### Have you checked the troubleshooting guide? - [x] I have checked the troubleshooting guide and I haven't found a solution to my problem
kerem 2026-03-02 11:52:12 +03:00
Author
Owner

@vmpyr commented on GitHub (Mar 10, 2025):

Going through the container logs:

web-1          | Error: Cannot find matching keyid: {"signatures":[{"sig":"MEUCIQDyfmLzYs4+Vuw7JzxVlrTiIwJRZkzt35fLezmouCyTvQIgHpODPYfD80JbZokwC+LKxJoaGoYkgcFhB4gqt7j0anA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
web-1          |     at verifySignature (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21535:47)
web-1          |     at fetchLatestStableVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21553:5)
web-1          |     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
web-1          |     at async fetchLatestStableVersion2 (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21672:14)
web-1          |     at async Engine.getDefaultVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22298:23)
web-1          |     at async Engine.executePackageManagerRequest (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22396:47)
web-1          |     at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23102:5)
web-1          |
web-1          | Node.js v22.13.1
web-1          | /usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21535
web-1          |   if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({ signatures, keys })}`);

seems some package is not found and hoarder goes into an infinite loop to find it (hence the DNS spam)

<!-- gh-comment-id:2709560446 --> @vmpyr commented on GitHub (Mar 10, 2025): Going through the container logs: ``` web-1 | Error: Cannot find matching keyid: {"signatures":[{"sig":"MEUCIQDyfmLzYs4+Vuw7JzxVlrTiIwJRZkzt35fLezmouCyTvQIgHpODPYfD80JbZokwC+LKxJoaGoYkgcFhB4gqt7j0anA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]} web-1 | at verifySignature (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21535:47) web-1 | at fetchLatestStableVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21553:5) web-1 | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) web-1 | at async fetchLatestStableVersion2 (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21672:14) web-1 | at async Engine.getDefaultVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22298:23) web-1 | at async Engine.executePackageManagerRequest (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22396:47) web-1 | at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23102:5) web-1 | web-1 | Node.js v22.13.1 web-1 | /usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21535 web-1 | if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({ signatures, keys })}`); ``` seems some package is not found and hoarder goes into an infinite loop to find it (hence the DNS spam)
Author
Owner

@MohamedBassem commented on GitHub (Mar 10, 2025):

your hoarder instance is crash looping basically, this is caused by the same issue reported here https://github.com/hoarder-app/hoarder/issues/1015. The fix has not been released in a new version yet, but it's in the nightly build. You can either move to the nightly version, or apply the fix mentioned in the comments.

<!-- gh-comment-id:2709813865 --> @MohamedBassem commented on GitHub (Mar 10, 2025): your hoarder instance is crash looping basically, this is caused by the same issue reported here https://github.com/hoarder-app/hoarder/issues/1015. The fix has not been released in a new version yet, but it's in the nightly build. You can either move to the nightly version, or apply the fix mentioned in the comments.
Author
Owner

@vmpyr commented on GitHub (Mar 10, 2025):

Yes this seems to have fixed it! Thanks a lot for linking to that issue, I didn't find it because I was searching solely for the DNS issue.

<!-- gh-comment-id:2710267329 --> @vmpyr commented on GitHub (Mar 10, 2025): Yes this seems to have fixed it! Thanks a lot for linking to that issue, I didn't find it because I was searching solely for the DNS issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#725
No description provided.