Hello!

I got my Lemmy server up and running locally yesterday yay (I set up some subs and test-posted), but today I must have tinkered with something because now the server only shows “Server error” (check code block 1 below for the server log).

Checking the logs, it seems it can’t “load” the site thumbnail. Curiously if I ask for it in firefox:

http://0.0.0.0:1236/pictrs/image/730840b6-d6ec-4a40-8668-36b89c6c1d33.png

it loads up (code block 2)

Any idea why Lemmy gets this “ECONNREFUSED” error ?

Cheers !

lemmy-ui_1  | FetchError: request to http://0.0.0.0:1236/pictrs/image/730840b6-d6ec-4a40-8668-36b89c6c1d33.png failed, reason: connect ECONNREFUSED 0.0.0.0:1236
lemmy-ui_1  |     at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1505:11)
lemmy-ui_1  |     at ClientRequest.emit (node:events:512:28)
lemmy-ui_1  |     at Socket.socketErrorListener (node:_http_client:495:9)
lemmy-ui_1  |     at Socket.emit (node:events:512:28)
lemmy-ui_1  |     at emitErrorNT (node:internal/streams/destroy:151:8)
lemmy-ui_1  |     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
lemmy-ui_1  |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
lemmy-ui_1  |   type: 'system',
lemmy-ui_1  |   errno: 'ECONNREFUSED',
lemmy-ui_1  |   code: 'ECONNREFUSED'
lemmy-ui_1  | }
proxy_1     | 172.18.0.1 - - [18/Jul/2023:14:31:31 +0000] "GET / HTTP/1.1" 500 12 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"

pictrs_1    | 2023-07-18T14:32:21.858505Z  INFO HTTP request{http.method=GET http.route=/image/original/{filename} http.flavor=1.1 http.scheme=http http.host=pictrs:8080 http.client_ip=172.18.0.7:59168 http.user_agent=Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0 http.target=/image/original/730840b6-d6ec-4a40-8668-36b89c6c1d33.png otel.name=HTTP GET /image/original/{filename} otel.kind="server" request_id=65877368-96ae-4ad9-a928-67a9bc3e3700}: tracing_actix_web::root_span_builder: new
pictrs_1    | 2023-07-18T14:32:21.861635Z  INFO HTTP request{http.method=GET http.route=/image/original/{filename} http.flavor=1.1 http.scheme=http http.host=pictrs:8080 http.client_ip=172.18.0.7:59168 http.user_agent=Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0 http.target=/image/original/730840b6-d6ec-4a40-8668-36b89c6c1d33.png otel.name=HTTP GET /image/original/{filename} otel.kind="server" request_id=65877368-96ae-4ad9-a928-67a9bc3e3700 trace_id=00000000000000000000000000000000 http.status_code=200 otel.status_code="OK"}: tracing_actix_web::root_span_builder: close time.busy=1.43ms time.idle=1.73ms
proxy_1     | 172.18.0.1 - - [18/Jul/2023:14:32:21 +0000] "GET /pictrs/image/730840b6-d6ec-4a40-8668-36b89c6c1d33.png HTTP/1.1" 200 12511 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"
  • ValmondOP
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Thanks, they both work with http instead of https.

    Https on firefox:

    SSL_ERROR_RX_RECORD_TOO_LONG

    curl:

    curl: (35) error:0A00010B:SSL routines::wrong version number

    Can it be so that the lemmy docker server tries to hit up pictrs on ssl?

    • RoundSparrow
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Can it be so that the lemmy docker server tries to hit up pictrs on ssl?

      That’s why I’m trying to get you to just fetch routine stuff that doesn’t involve picts.

      Is the communities fetch giving you the failure with https? Then it’s likely your proxy config, nginx. Server ins’t setup right. I also suggest you try the API test of communities from various points, such as your workstation machine (outside the server), just so we aren’t confused on context of within the docker or something.

      • ValmondOP
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 year ago

        Is the communities fetch giving you the failure with https?

        Yep everything fails with https.

        I’ll try to validate my nginx.conf file and the nginx_internal.conf and see if I can figure what’s wrong, nginx is all new for me …

        At the moment, I’m just trying to make it run locally, but your idea is great and I sure will use it when things start to roll! I mean if I ever get it to work locally :-)

        Edit: https://0.0.0.0/pictrs/image/730840b6-d6ec-4a40-8668-36b89c6c1d33.png now works, but the https://0.0.0.0:1236 does still not

        • RoundSparrow
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          At the moment, I’m just trying to make it run locally, but your idea is great and I sure will use it when things start to roll! I mean if I ever get it to work locally :-)

          Well, it may be failing ONLY locally on the server, that’s why I emphasize to test remotely. As you may be bypassing nginx which does the SSL to non-SSL translation.

          • ValmondOP
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            Seems very reasonable, I checked it out, but it’s the exact same problem (after I forwarded the 443 port too. BTW I haven’t tinkered with the ssl port);

            https://lemmy.mindoki.com shows the server error

            but

            https://lemmy.mindoki.com/pictrs/image/730840b6-d6ec-4a40-8668-36b89c6c1d33.png

            shows the image …

            Also,

            curl “https://lemmy.mindoki.com/api/v3/community/list?sort=Hot&Limit=1

            Works!

            It drives me crazy :-) but I feel even more some ssl problem between the lemmy docker server and pictrs, no?

            • RoundSparrow
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              1 year ago

              ok, based on those test results (which they work for me too)… then your lemmy_server is running, the API engine is responding, giving me the list of communities.

              You could, at this point, try another client - a smartphone client - and see if you can use your server?

              The front-page https://lemmy.mindoki.com not working is the lemmy-ui service not talking to the backend (which is what your logs in the post show). I don’t use Docker, so I’m not very good at figuring out how to get the two to talk together. But if a smartphone client works for you, then you know it’s lemmy-ui that’s your only real issue.

              • ValmondOP
                link
                fedilink
                arrow-up
                2
                ·
                1 year ago

                Ooh, yes it works from another client, excellent advice!

                With:

                https://lemmy.mindoki.com/c/moebius

                I can post, upload images, … Only thing is I can’t see my first posts image I posted yesterday locally (here from my smartphone). A bit like the server can’t get the logo image (again posted yesterday).

                Thank you for all these precious advices, I’m off to bed now but tomorrow is another day hopefully filled with lemmy-ui tweaking :-)

                Cheers & good night!