Skip Navigation
2 comments
  • [ISSUE]: Just noticed, that uploading pictures does not seem to work properly any more. Interestingly enough, automatically generated thumbnails, as for example here are still working.

    Error message in interface looks like this:

     
        
    {"data":{"errror":"unknown","message":"Request error: error sending request for url (http://localhost:8080/image): error trying to connect: tcp connect error: connection refused (os error 111)"},"state":"success"}
    
      

    journalctl view of the logs shows this on trying to upload an image:

     
        
    2025-03-20T15:56:54.924172Z  WARN Error encountered while processing the incoming HTTP request: lemmy_server::root_span_builder: Unknown: Request error: error sending request for url (http://localhost:8080/image): error trying to connect: tcp connect error: Connection refused (os error 111)
        0: lemmy_server::root_span_builder::HTTP request
                with http.method=POST http.scheme="http" http.host=lemmy.abnormalbeings.space http.target=/pictrs/image otel.kind="server" request_id=51441e08-3151-4215-9358-64d1dbd87981 http.status_code=400 otel.status_code="OK"
                             at src/root_span_builder.rs:16
    
    
      

    Will start a journey to fix now, mostly leaving this so maybe it will help someone in the future while searching online

    • So, the underlying issue was:

      For some reason, during the upgrade process, I managed to fuck up pict-rs working properly with lemmy. Note that I updated from scratch, not with docker or something similar.

      What happened was, that pict-rs simply wasn't running and being started any more alongside lemmy

      My solution, which seems a bit hacky and improvised, admittedly, was to add a pict-rs service to systemd with the following config:

       
          
      [Unit]
      Description=pict-rs service
      After=network.target
      
      [Service]
      User=lemmy
      ExecStart=/usr/bin/pict-rs run -a 127.0.0.1:8080 filesystem -p /opt/lemmy/pictrs/files sled -p /opt/lemmy/pictrs/sled-repo
      #Environment=LEMMY_CONFIG_LOCATION=/opt/lemmy/lemmy-server/lemmy.hjson
      #Environment=PICTRS_ADDR=127.0.0.1:8080
      #Environment=RUST_LOG="info"
      Restart=on-failure
      WorkingDirectory=/opt/lemmy/pictrs
      
      # Hardening
      ProtectSystem=yes
      PrivateTmp=true
      MemoryDenyWriteExecute=true
      NoNewPrivileges=true
      
      [Install]
      WantedBy=multi-user.target
      
      
        

      So, basically a copy of the lemmy.service, with pict-rs being started. If soemone has better solutions, or can tell me why I may have broken some security or smth, feel free to speak up. If this ended up helping you, from the future, with a similar problem, I am happy to hear that!