LemmyNet / lemmy-ui

The official web app for lemmy.
https://join-lemmy.org/
GNU Affero General Public License v3.0
879 stars 333 forks source link

Upoload image broken in latest docker images and main branch #403

Closed bigOconstant closed 2 years ago

bigOconstant commented 3 years ago

Found a bug? Please fill out the sections below. 👍

For backend issues, use lemmy

Issue Summary

Using instructions to run lemmy locally found here with docker-compose the image upload feature does not work and the ui complains about missing jwt and so does the backend of lemmy.

Steps to Reproduce

  1. Follow instructions to run lemmy in docker-compose here 2.Log in with default lemmy user
  2. Try to upload picture on default community
  3. Notice UI fails with type error failed to fetch and ui logs say,
lemmy-ui_1  | httpbase: https://lemmy:8536
lemmy-ui_1  | wsUri: wss://lemmy:8536/api/v3/ws
lemmy-ui_1  | No JWT cookie found.
lemmy-ui_1  | http://0.0.0.0:1234

Lemmy logs say,

lemmy_1     | thread 'actix-rt|system:0|arbiter:23' panicked at 'No auth header for picture upload', crates/routes/src/images.rs:52:6

Technical details

Full log output below,

Attaching to lemmybase_lemmy-ui_1, lemmybase_lemmy_1, lemmybase_pictrs_1, lemmybase_postgres_1
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | httpbase: https://lemmy:8536
lemmy-ui_1  | wsUri: wss://lemmy:8536/api/v3/ws
lemmy-ui_1  | No JWT cookie found.
lemmy-ui_1  | http://0.0.0.0:1234
lemmy-ui_1  | Incorrect JWT token, skipping auth so frontend can remove jwt cookie
lemmy-ui_1  | Incorrect JWT token, skipping auth so frontend can remove jwt cookie
lemmy-ui_1  | Incorrect JWT token, skipping auth so frontend can remove jwt cookie
lemmy-ui_1  | 
lemmy-ui_1  | /app/node_modules/node-fetch/lib/index.js:272
lemmy-ui_1  |              return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
lemmy-ui_1  |                                         ^
lemmy-ui_1  | FetchError: invalid json response body at http://lemmy:8536/api/v3/site?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIsImlzcyI6Im15X2RvbWFpbiIsImlhdCI6MTYzMDg5NjI4MH0.tJD464bvaT5CylffCEou_9UtzE1OGcRAIFG-xWhztIA reason: Unexpected token N in JSON at position 0
lemmy-ui_1  |     at /app/node_modules/node-fetch/lib/index.js:272:32
lemmy-ui_1  |     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
lemmy-ui_1  |   type: 'invalid-json'
lemmy-ui_1  | }
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | httpbase: https://lemmy:8536
lemmy-ui_1  | wsUri: wss://lemmy:8536/api/v3/ws
lemmy-ui_1  | No JWT cookie found.
lemmy-ui_1  | http://0.0.0.0:1234
lemmy-ui_1  | 
lemmy-ui_1  | /app/node_modules/node-fetch/lib/index.js:272
lemmy-ui_1  |              return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
lemmy-ui_1  |                                         ^
lemmy-ui_1  | FetchError: invalid json response body at http://lemmy:8536/api/v3/site?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIsImlzcyI6Im15X2RvbWFpbiIsImlhdCI6MTYzMDg5NjI4MH0.tJD464bvaT5CylffCEou_9UtzE1OGcRAIFG-xWhztIA reason: Unexpected token N in JSON at position 0
lemmy-ui_1  |     at /app/node_modules/node-fetch/lib/index.js:272:32
lemmy-ui_1  |     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
lemmy-ui_1  |   type: 'invalid-json'
lemmy-ui_1  | }
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | httpbase: https://lemmy:8536
lemmy-ui_1  | wsUri: wss://lemmy:8536/api/v3/ws
lemmy-ui_1  | No JWT cookie found.
lemmy-ui_1  | http://0.0.0.0:1234
lemmy-ui_1  | 
lemmy-ui_1  | /app/node_modules/node-fetch/lib/index.js:272
lemmy-ui_1  |              return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
lemmy-ui_1  |                                         ^
lemmy-ui_1  | FetchError: invalid json response body at http://lemmy:8536/api/v3/site?auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIsImlzcyI6Im15X2RvbWFpbiIsImlhdCI6MTYzMDg5NjI4MH0.tJD464bvaT5CylffCEou_9UtzE1OGcRAIFG-xWhztIA reason: Unexpected token N in JSON at position 0
lemmy-ui_1  |     at /app/node_modules/node-fetch/lib/index.js:272:32
lemmy-ui_1  |     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
lemmy-ui_1  |   type: 'invalid-json'
lemmy-ui_1  | }
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | Inferno is in development mode.
lemmy-ui_1  | httpbase: https://lemmy:8536
lemmy-ui_1  | wsUri: wss://lemmy:8536/api/v3/ws
lemmy-ui_1  | No JWT cookie found.
lemmy-ui_1  | http://0.0.0.0:1234
lemmy_1     | warning: invalid logging spec 'info"', ignoring it
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] Running user_updates_2020_04_02
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] 0 person rows updated.
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] Running community_updates_2020_04_02
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] 0 community rows updated.
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] Running post_updates_2020_04_03
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] 0 post rows updated.
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] Running comment_updates_2020_04_03
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] 0 comment rows updated.
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] Running private_message_updates_2020_05_05
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] 0 private message rows updated.
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] Running post_thumbnail_url_updates_2020_07_27
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] 0 Post thumbnail_url rows updated.
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::code_migrations] Running apub_columns_2021_02_02
lemmy_1     | Starting http server at 0.0.0.0:8536
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::scheduled_tasks] Updating active site and community aggregates ...
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::scheduled_tasks] Done.
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::scheduled_tasks] Reindexing table  post_aggregates ...
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::scheduled_tasks] Done.
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::scheduled_tasks] Reindexing table  comment_aggregates ...
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::scheduled_tasks] Done.
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::scheduled_tasks] Reindexing table  community_aggregates ...
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::scheduled_tasks] Done.
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::scheduled_tasks] Clearing old activities...
lemmy_1     | [2021-09-06T13:58:51Z INFO  lemmy_server::scheduled_tasks] Done.
lemmy_1     | [2021-09-06T13:59:25Z INFO  lemmy_api_crud::site::read] Admin lemmy created
lemmy_1     | [2021-09-06T13:59:25Z INFO  lemmy_api_crud::site::read] Site lemmy-test created
lemmy_1     | thread 'actix-rt|system:0|arbiter:12' panicked at 'No auth header for picture upload', crates/routes/src/images.rs:52:6
lemmy_1     | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
lemmy_1     | [2021-09-06T14:00:00Z INFO  lemmy_server::scheduled_tasks] Updating active site and community aggregates ...
lemmy_1     | [2021-09-06T14:00:00Z INFO  lemmy_server::scheduled_tasks] Done.
lemmy_1     | [2021-09-06T14:00:00Z INFO  lemmy_server::scheduled_tasks] Reindexing table concurrently post_aggregates ...
lemmy_1     | [2021-09-06T14:00:00Z INFO  lemmy_server::scheduled_tasks] Done.
lemmy_1     | [2021-09-06T14:00:00Z INFO  lemmy_server::scheduled_tasks] Reindexing table concurrently comment_aggregates ...
lemmy_1     | [2021-09-06T14:00:00Z INFO  lemmy_server::scheduled_tasks] Done.
lemmy_1     | [2021-09-06T14:00:00Z INFO  lemmy_server::scheduled_tasks] Reindexing table concurrently community_aggregates ...
lemmy_1     | [2021-09-06T14:00:00Z INFO  lemmy_server::scheduled_tasks] Done.
lemmy_1     | thread 'actix-rt|system:0|arbiter:14' panicked at 'No auth header for picture upload', crates/routes/src/images.rs:52:6
lemmy_1     | thread 'actix-rt|system:0|arbiter:16' panicked at 'No auth header for picture upload', crates/routes/src/images.rs:52:6
lemmy_1     | thread 'actix-rt|system:0|arbiter:17' panicked at 'No auth header for picture upload', crates/routes/src/images.rs:52:6
lemmy_1     | thread 'actix-rt|system:0|arbiter:23' panicked at 'No auth header for picture upload', crates/routes/src/images.rs:52:6
postgres_1  | The files belonging to this database system will be owned by user "postgres".
postgres_1  | This user must also own the server process.
postgres_1  | 
postgres_1  | The database cluster will be initialized with locale "en_US.utf8".
postgres_1  | The default database encoding has accordingly been set to "UTF8".
postgres_1  | The default text search configuration will be set to "english".
postgres_1  | 
postgres_1  | Data page checksums are disabled.
postgres_1  | 
postgres_1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgres_1  | creating subdirectories ... ok
postgres_1  | selecting dynamic shared memory implementation ... posix
postgres_1  | selecting default max_connections ... 100
postgres_1  | selecting default shared_buffers ... 128MB
postgres_1  | selecting default time zone ... UTC
postgres_1  | creating configuration files ... ok
postgres_1  | running bootstrap script ... ok
postgres_1  | sh: locale: not found
postgres_1  | 2021-09-06 13:58:48.980 UTC [31] WARNING:  no usable system locales were found
postgres_1  | performing post-bootstrap initialization ... ok
postgres_1  | initdb: warning: enabling "trust" authentication for local connections
postgres_1  | syncing data to disk ... ok
postgres_1  | 
postgres_1  | 
postgres_1  | Success. You can now start the database server using:
postgres_1  | 
postgres_1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
postgres_1  | 
postgres_1  | You can change this by editing pg_hba.conf or using the option -A, or
postgres_1  | --auth-local and --auth-host, the next time you run initdb.
postgres_1  | waiting for server to start....2021-09-06 13:58:49.306 UTC [36] LOG:  starting PostgreSQL 12.8 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
postgres_1  | 2021-09-06 13:58:49.307 UTC [36] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1  | 2021-09-06 13:58:49.320 UTC [37] LOG:  database system was shut down at 2021-09-06 13:58:49 UTC
postgres_1  | 2021-09-06 13:58:49.323 UTC [36] LOG:  database system is ready to accept connections
postgres_1  |  done
postgres_1  | server started
postgres_1  | CREATE DATABASE
postgres_1  | 
postgres_1  | 
postgres_1  | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
postgres_1  | 
postgres_1  | waiting for server to shut down...2021-09-06 13:58:49.501 UTC [36] LOG:  received fast shutdown request
postgres_1  | .2021-09-06 13:58:49.502 UTC [36] LOG:  aborting any active transactions
postgres_1  | 2021-09-06 13:58:49.502 UTC [36] LOG:  background worker "logical replication launcher" (PID 43) exited with exit code 1
postgres_1  | 2021-09-06 13:58:49.503 UTC [38] LOG:  shutting down
postgres_1  | 2021-09-06 13:58:49.516 UTC [36] LOG:  database system is shut down
postgres_1  |  done
postgres_1  | server stopped
postgres_1  | 
postgres_1  | PostgreSQL init process complete; ready for start up.
postgres_1  | 
postgres_1  | 2021-09-06 13:58:49.611 UTC [1] LOG:  starting PostgreSQL 12.8 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
postgres_1  | 2021-09-06 13:58:49.611 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres_1  | 2021-09-06 13:58:49.611 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres_1  | 2021-09-06 13:58:49.613 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1  | 2021-09-06 13:58:49.624 UTC [50] LOG:  database system was shut down at 2021-09-06 13:58:49 UTC
postgres_1  | 2021-09-06 13:58:49.628 UTC [1] LOG:  database system is ready to accept connections
pictrs_1    | Sep 06 13:58:48.619  INFO actix_server::builder: Starting 24 workers    
pictrs_1    | Sep 06 13:58:48.620  INFO actix_server::builder: Starting "actix-web-service-0.0.0.0:8080" service on 0.0.0.0:8080    
dessalines commented 3 years ago
�[36mlemmy-ui_1  |�[0m No JWT cookie found.
�[36mlemmy-ui_1  |�[0m http://0.0.0.0:1234
�[36mlemmy-ui_1  |�[0m Incorrect JWT token, skipping auth so frontend can remove jwt cookie
�[36mlemmy-ui_1  |�[0m Incorrect JWT token, skipping auth so frontend can remove jwt cookie
�[36mlemmy-ui_1  |�[0m Incorrect JWT token, skipping auth so frontend can remove jwt cookie

Clear your browser cookies for that site. And make sure you don't have browser plugin that might be blocking cookies.

Also make sure you're on 0.12.1 .

bigOconstant commented 3 years ago
�[36mlemmy-ui_1  |�[0m No JWT cookie found.
�[36mlemmy-ui_1  |�[0m http://0.0.0.0:1234
�[36mlemmy-ui_1  |�[0m Incorrect JWT token, skipping auth so frontend can remove jwt cookie
�[36mlemmy-ui_1  |�[0m Incorrect JWT token, skipping auth so frontend can remove jwt cookie
�[36mlemmy-ui_1  |�[0m Incorrect JWT token, skipping auth so frontend can remove jwt cookie

Clear your browser cookies for that site. And make sure you don't have browser plugin that might be blocking cookies.

Also make sure you're on 0.12.1 .

changed docker-compose from

dessalines/lemmy-ui:0.12.0 to dessalines/lemmy-ui:0.12.1

and dessalines/lemmy:0.12.0 to dessalines/lemmy:0.12.1

Opened a private browser session in firefox with no plugins and I still get the same thing.

dessalines commented 3 years ago

You need to have a running nginx for pictures to work at the moment, you do have that set up?

If you're accessing lemmy via :1234 picture uploads won't work.

bigOconstant commented 3 years ago

You need to have a running nginx for pictures to work at the moment, you do have that set up?

If you're accessing lemmy via :1234 picture uploads won't work.

Ah ok, no I didn't set up nginx. I think that should be more clear in the docs though. Why is it that we need nginx to upload pictures?

dessalines commented 3 years ago

We used to require nginx for routing to iframely and pictrs. Now we removed iframely, and we route pictrs requests through lemmy, but we still have to add it to our official API. Once we do this nginx will no longer be necessary for pictures.

In reality it has to do with cross-domain issues... the UI runs on :1234 but the back end is at :8536. Browsers don't mind cross port websocket, but cross-port HTTP is forbidden. You might be able to try one of those access-control-allow / CORS plugins for FF, that might fix it without nginx for now.

bigOconstant commented 3 years ago

We used to require nginx for routing to iframely and pictrs. Now we removed iframely, and we route pictrs requests through lemmy, but we still have to add it to our official API. Once we do this nginx will no longer be necessary for pictures.

In reality it has to do with cross-domain issues... the UI runs on :1234 but the back end is at :8536. Browsers don't mind cross port websocket, but cross-port HTTP is forbidden. You might be able to try one of those access-control-allow / CORS plugins for FF, that might fix it without nginx for now.

interesting. Is most of the api calls going through websockets? I don't see many entries in my network tab. tbh I've never actually used websockets before. So most stuff works because it's going through a websocket, but http request are failing because of cors?

I tried a disable cors addon with no luck. @dessalines would you happen to know how the ui builds the backend url? I'm having a hard time trying to set it. I'm trying to get a reverse proxy with nginx set up but its stuck building it as localhost:8536 when I want it to point to my reverse proxy url.

dessalines commented 3 years ago

Use this: https://github.com/LemmyNet/lemmy/blob/main/ansible/templates/nginx.conf

And edit the vars in the {{ }} as indicated. This all should be in the docker install instructions.

ghost commented 3 years ago

I'm also having this issue on my test instance I set up recently. Its giving me "No JWT cookie found" in lemmy-ui logs. Please let me know if a solution to this is found.

dessalines commented 3 years ago

@thepurplerabbit and you are also running nginx? I believe this is explicitly in the docs: https://join-lemmy.org/docs/en/administration/install_docker.html

harcesz commented 3 years ago

seems we run into the same problem over ansible install, earlier images dont show either

rysiekpl commented 3 years ago

seems we run into the same problem over ansible install, earlier images dont show either

Can confirm. Example here: https://szmer.info/pictrs/image/gwCBW64PfY.jpg?format=webp&thumbnail=96
in a clean browser, not logged in, the result is just the text: images_disabled. Nothing in docker-compose logs -f output.

Non-processed images also fail: https://szmer.info/pictrs/image/gwCBW64PfY.jpg

Uploading images is also broken, uploading an image fails with message in the browser window:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

This instance was running 0.11.3, we upgraded tonight to 0.12.2. No changes in secrets (JWT token in lemmy.hjson, PostgreSQL passwords in docker-compose.yml and lemmy.hjson) - we keep those in local git repositories, so we know if changes happen and when.

The instance was deployed using the Ansible playbook from the official repo, and is using NginX configured by that playbook.

dessalines commented 3 years ago

@rysiekpl That's a different issue, because you didn't follow the upgrade notes.

rysiekpl commented 3 years ago

@rysiekpl That's a different issue, because you didn't follow the upgrade notes.

Do you think maybe it would make sense to add that line to the config.hjson in ansible/templates? It's not there: https://github.com/LemmyNet/lemmy/blob/main/ansible/templates/config.hjson

dessalines commented 3 years ago

Oops, our bad, thx for catching. I'll add that now.

ghost commented 3 years ago

I was able to fix this issue by adding

pictrs_url: "http://pictrs:8080"

To the lemmy.hjson file

dessalines commented 2 years ago

Post your nginx, docker-compose.yml, and lemmy.hjson files. I don't know where the issue is without those.

bigOconstant commented 2 years ago

I am closing this issue because image upload works in docker now because it is configured to go through nginx by default. Instead of going to localhost;1235 go to 0.0.0.0:1236

Mawlz commented 2 years ago

I am having the same issue, as requrested by @dessalines below is the log from the server:

https://pastebin.com/fqyQPjKz

What could the issue be?

Additionally, I have also installed NGINX the app is running on Apache and NGINX for testing purposes:

Apache: https://mawlz.com/ NGINX: https://mawlz.com:8443/

As you can see on both of the web servers it is not working

dessalines commented 2 years ago

@Mawlz Post your nginx, docker-compose.yml, and lemmy.hjson files. I don't know where the issue is without those.

Mawlz commented 2 years ago

@dessalines Apologies for the wait. See here:

docker-compsoe.yml: https://pastebin.com/sa30NDRn

lemmy.hjson: https://www.toptal.com/developers/hastebin/raw/waqanirowo

nginx.conf https://www.toptal.com/developers/hastebin/raw/ireqamupox

dessalines commented 2 years ago

set $proxpass "http://0.0.0.0:1236";

Should be 1235

1236 is only for our dev setups, run in the docker/dev folder, not for deploys.

Mawlz commented 2 years ago

@dessalines

I only changed it to 1236 per the above fix when the issue was closed.

I have now reverted back to 1235

Apache: https://mawlz.com/ NGINX: https://mawlz.com:8443/

The issue persists.

I have changed nothing else

dessalines commented 2 years ago

@Mawlz

mkdir -p volumes/pictrs
sudo chown -R 991:991 volumes/pictrs
sudo docker-compose restart pictrs
Mawlz commented 2 years ago

@dessalines

Yes, this has already been made and it is one of the first steps inside the documentation we followed:

https://join-lemmy.org/docs/en/administration/install_docker.html

I have executed the commands again without the mkdir since the directories are created and there is some content inside of them:

[root@vm2248 [/home/mawlz/lemmy]]# ll total 8 -rw-r--r-- 1 root root 1195 Dec 3 09:00 docker-compose.yml -rw-r--r-- 1 root root 1741 Dec 3 08:59 lemmy.hjson drwxr-xr-x 4 root root 36 Dec 1 17:34 volumes [root@vm2248 [/home/mawlz/lemmy]]# sudo chown -R 991:991 volumes/pictrs [root@vm2248 [/home/mawlz/lemmy]]# sudo docker-compose restart pictrs Restarting lemmy_pictrs_1 ... done [root@vm2248 [/home/mawlz/lemmy]]# cd volumes/ [root@vm2248 [/home/mawlz/lemmy/volumes]]# ll total 4 drwxrwxrwx 4 sssd cpanelphppgadmin 31 Dec 1 17:34 pictrs drwx------ 19 70 root 4096 Dec 1 17:42 postgres c[root@vm2248 [/home/mawlz/lemmy/volumes]]# cd pictrs/ [root@vm2248 [/home/mawlz/lemmy/volumes/pictrs]]# ll total 0 drwxrwxrwx 2 sssd cpanelphppgadmin 6 Dec 1 17:34 files drwxrwxrwx 3 sssd cpanelphppgadmin 21 Dec 1 17:34 sled

What exactly is the UID:GUID 991 since for cPanel servers it seems this is SSSD and cpanel's PHPPostGreAdmin.

If this should be a special user which may be different on your system we can assign it, but 991 is what appears on the ll, for me this step was extremely strange.

bigOconstant commented 2 years ago

Pictrs is run as a non root container. Which is best practice. I assume that number is the id assigned to the user in the pictrs container

dessalines commented 2 years ago

It also says 404 not found to https://mawlz.com/pictrs/image , which tells me you didn't set up your nginx properly.

Mawlz commented 2 years ago

@dessalines

@bigOconstant

I'm not sure this is correct as my system is CentOS 7 with Cpanel and all docker containers are ran by docker who is on the root user, docker containers work in their own environment and the fact that the configuration files are owned by root is not a problem since docker is installed and used by the root user.

As for the directories for pictrs they are owned by 991 which is the user specified in the tutorial, all other directories may be owned by root.

The pictrs/image is giving error 405 which is not 404:

https://mawlz.com:8443/pictrs/image

The correct URL for the NGINX build is with port 8443 on the back. Dessalines I believe you clicked the wrong URL above when you commented it showed 404.

I have changed the UID and GID to mawlz and reran docker, and again the app is not working.

Dessalines, would you by any chance log on to the server and review where this is going wrong?

I can provide the details via a private message on lemmy.ml if you agree

Thanks in advance

dessalines commented 2 years ago

I don't have time to do that, but also lemmy won't work at a non-standard port like that.