Requirements

  • [X] This is a bug report, and if not, please post to https://lemmy.ml/c/lemmy_support instead.
  • [X] Please check to see if this issue already exists.
  • [X] It’s a single bug. Do not report multiple bugs in one issue.
  • [X] It’s a frontend issue, not a backend issue; Otherwise please create an issue on the backend repo instead.

Summary

Docker setup. After updating to the 0.18.0 images for both lemmy-ui and lemmy backend, the lemmy-ui logs show a pictrs error, and the main site returns a “Server error”.

FetchError: request to https://SITE_URL_REDACTED/pictrs/image/a29da3fc-b6ce-4e59-82b0-1a9c94f8faed.webp failed, reason: connect ECONNREFUSED 127.0.1.1:443
    at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1505:11)
    at ClientRequest.emit (node:events:511:28)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:511:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}

Steps to Reproduce

  1. Update docker-compose.yml to 0.18.0
  2. docker-compose down
  3. docker-compose up
  4. access site

Technical Details

Docker setup. After updating to the 0.18.0 images for both lemmy-ui and lemmy backend, the lemmy-ui logs show a pictrs error, and the main site returns a “Server error”.

FetchError: request to https://SITE_URL_REDACTED/pictrs/image/a29da3fc-b6ce-4e59-82b0-1a9c94f8faed.webp failed, reason: connect ECONNREFUSED 127.0.1.1:443
    at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1505:11)
    at ClientRequest.emit (node:events:511:28)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:511:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}

Lemmy Instance Version

0.18.0

Lemmy Instance URL

No response

  • issue_tracking_bot@lemm.eeOPB
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    UPDATE:

    Issue “fixed” by putting the lemmy-ui container on a network with access to the internet. It looks like lemmy-ui didn’t previously need an internet connection on 0.17.x, but now it needs one. Probably because it used to use the internal docker network to get to pictrs, but now it’s trying to resolve using the real public hostname?

    In OP’s case, it’s going to a local IP instead, but it’s using the wrong port. In both our cases, the URL it uses for pictrs is not calculated correctly for whatever reason.

    The UI could fail to contact pictrs for any variety of reasons, but that shouldn’t be fatal. It should just break images.

    Previous comment text:


    I get a very similar error but it’s not quite the same:

     FetchError: request to https://<my-instance>/pictrs/image/<uuid>.png failed, reason: getaddrinfo EAI_AGAIN <my-instance>
         at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1505:11)
         at ClientRequest.emit (node:events:511:28)
         at TLSSocket.socketErrorListener (node:_http_client:495:9)
         at TLSSocket.emit (node:events:511:28)
         at emitErrorNT (node:internal/streams/destroy:151:8)
         at emitErrorCloseNT (node:internal/streams/destroy:116:3)
         at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
       type: 'system',
       errno: 'EAI_AGAIN',
       code: 'EAI_AGAIN'
     }
    

    Just like OP, I can go to the URL that error is logging and it pulls the image just fine. No browser cache shenanigans, the request is being fully completed.

    My server is now completely inoperable and I can’t downgrade to 0.17.4 due to the database upgrades. Anything I can do to not lose my data?

    Originally posted by ubergeek77 in #1530