Skip to content

Collector crashes on duplicate address + frontend shows no data #214

@rz1989s

Description

@rz1989s

Issues Found During VPS Migration (2026-02-28)

1. Collector create()upsert() (Fixed on VPS, needs commit)

File: src/server/workers/collector.ts:401

The discoverNodes function uses db.node.create() which crashes with Unique constraint failed on the fields: (address) when a discovered node has an address already in the database.

Quick fix applied on VPS: Changed to db.node.upsert() with where: { address }, create: {...}, update: {...}.

Needs: Commit the fix to the repo and redeploy via CI.

2. Collector not in Docker image

The collector runs as a bind-mount dev container (node:20 + npm install at runtime from /home/pnodepulse/pnode-pulse-src). This is fragile — the original node:20-alpine image lacked Python for usb native module (node-gyp).

Needs: Add collector as a build target in the Dockerfile (or separate Dockerfile) so it deploys via GHCR like the web app. The docker-compose.prod.yml already has the correct config (command: ["node", "-e", "require('./scripts/start-collector.js')"]) but the GHCR image doesn't include the compiled collector script.

3. Frontend shows "No Data Available" despite 23M+ metrics

  • DB has 23,028,956 metrics and 499 active nodes
  • Collector runs successfully (669 nodes, ~101 responding per cycle)
  • Frontend Overview page shows "No Data Available"

Needs: Investigation — likely an API query issue, Redis cache, or frontend state problem.

4. Nginx blue/green port mismatch

Production nginx was pointing to port 7000 (blue) but active container was on 7001 (green). Fixed manually. Deploy workflow should update nginx to match active slot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions