bluesky-social / ozone

web interface for labeling content in atproto / Bluesky
https://atproto.com
Other
323 stars 27 forks source link

UI bugs when using alternative port #76

Open baatl opened 8 months ago

baatl commented 8 months ago

requests for the logo image in the UI all fail with an internal server error. from the server logs:

 ⨯ upstream image response failed for /img/logo-colorful.png TypeError: fetch failed
    at node:internal/deps/undici/undici:12345:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/usr/src/ozone/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async /usr/src/ozone/node_modules/next/dist/server/next-server.js:592:35
    at async imageOptimizer (/usr/src/ozone/node_modules/next/dist/server/image-optimizer.js:576:13)
    at async cacheEntry.imageResponseCache.get.incrementalCache (/usr/src/ozone/node_modules/next/dist/server/next-server.js:176:65)
    at async /usr/src/ozone/node_modules/next/dist/server/response-cache/index.js:93:36
    at async /usr/src/ozone/node_modules/next/dist/lib/batcher.js:41:32 {
  cause: AggregateError
      at internalConnectMultiple (node:net:1114:18)
      at afterConnectMultiple (node:net:1667:5)
      at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
    code: 'ECONNREFUSED',
    [errors]: [ [Error], [Error] ]
  }
}
baatl commented 7 months ago

One possible quirk that comes to mind as a potential cause behind this: our Ozone instances (because mastod.one's server is set up to host multiple labelers) are on ports 3001 and 3002 instead of port 3000. If anything in the code is hard-coded to hit port 3000 instead of OZONE_PORT, that request would fail.

bnewbold commented 7 months ago

I don't think we've encountered or can reproduce this, so more details about the deployment/setup would be helpful.

baatl commented 7 months ago

The deployment is mostly as described in HOSTING.md (Ubuntu 22.04, Docker Compose), with minor modifications to accommodate the multiple Ozone instances (the containers are named ozone-$LABELER with separate ports and environment files, the Caddyfile proxies multiple hosts, postgres runs with a special init script to create multiple databases).

usounds commented 7 months ago

I'm experiencing the same issue. Since I'm already using port 3000 on the same server, I'm specifying a different port. OZONE_PORT=3100

image image
baatl commented 7 months ago

Another indicant that this is tied to something hardcoding port 3000 behind the scenes: running an Ozone instance on port 3000 fixed this on our other Ozone instances.