MatthewL246 / pretendo-docker

An unofficial Docker Compose setup for self-hosting a Pretendo Network server.
https://matthewl246.github.io/pretendo-docker/
GNU Affero General Public License v3.0
54 stars 9 forks source link

Error #166

Open ttdu08of opened 3 weeks ago

ttdu08of commented 3 weeks ago

Hello, I have an error when starting the script... Can you please help ? image

MatthewL246 commented 3 weeks ago

invalid header field value for "Authorization"

The setup script randomly generates the secret key for MinIO, so I wonder if an invalid key is being generated. Can you please follow these steps to share the keys here safely?

# Stop the server
docker compose down

# Back up the current MinIO secrets
mkdir -p backups && cp environment/minio.local.env backups/minio-backup.env

# Regenerate the secrets and invalidate the old ones
./scripts/setup-environment.sh

# Display the MinIO secret key
cat backups/minio-backup.env

Then, please send the old secret key (the line starting with MINIO_ROOT_PASSWORD=) here.

ttdu08of commented 3 weeks ago

image

MatthewL246 commented 3 weeks ago

It looks like the key is fine, but the script output gives me another idea about what might be going wrong. By default, when you use Git in Windows to clone a repo, it converts the line endings in files from LF (Linux-style) to CRLF (Windows-style), which can break Bash scripts. This is why I recommend cloning the repo inside your WSL distro in the Tips for Windows Users section of the server setup guide.

Can you try re-cloning the repo inside your WSL home directory?

ttdu08of commented 3 weeks ago

I did it using the ubuntu application, I didn't use GIT or WSL.

MatthewL246 commented 3 weeks ago

Interesting. What's your Git version?

git --version

ttdu08of commented 3 weeks ago

My git version is 2.43.0

MatthewL246 commented 3 weeks ago

What are the line endings of the scripts?

file ./scripts/*
file ./scripts/internal/*
ttdu08of commented 3 weeks ago

Which script? On the CMD?

MatthewL246 commented 3 weeks ago

The script files in the repo - just run those two commands and send the output here.

ttdu08of commented 3 weeks ago

./setup.sh and docker compose up -d --build ?

MatthewL246 commented 3 weeks ago
file ./scripts/*
file ./scripts/internal/*
ttdu08of commented 3 weeks ago
exit@DESKTOP-DPBURID:/mnt/c/Users/Théo/Desktop/pretendo-docker$ file ./scripts/*
./scripts/README.md:                   ASCII text, with CRLF line terminators
./scripts/backup.sh:                   Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/compile-custom-inkay.sh:     Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/create-cemu-online-files.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/create-juxt-community.sh:    Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/full-reset.sh:               Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/get-boss-keys.sh:            Bourne-Again shell script, ASCII text executable
./scripts/internal:                    directory
./scripts/make-pnid-dev.sh:            Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/patch-sssl-certificate.sh:   Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/restore.sh:                  Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/run-in-container:            directory
./scripts/setup-environment.sh:        Bourne-Again shell script, ASCII text executable
./scripts/setup-submodule-patches.sh:  Bourne-Again shell script, ASCII text executable
./scripts/upload-3ds-files.sh:         Bourne-Again shell script, ASCII text executable, with CRLF line terminators
exit@DESKTOP-DPBURID:/mnt/c/Users/Théo/Desktop/pretendo-docker$ file ./scripts/internal/*
./scripts/internal/firstrun-minio-container.sh:        Bourne-Again shell script, ASCII text executable
./scripts/internal/firstrun-mongodb-container.sh:      Bourne-Again shell script, ASCII text executable
./scripts/internal/firstrun-postgres-container.sh:     Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/internal/framework.sh:                       Bourne-Again shell script, ASCII text executable
./scripts/internal/migrations.sh:                      Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/internal/update-account-servers-database.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/internal/update-miiverse-endpoints.sh:       Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/internal/update-postgres-password.sh:        Bourne-Again shell script, ASCII text executable, with CRLF line terminators
exit@DESKTOP-DPBURID:/mnt/c/Users/Théo/Desktop/pretendo-docker$
ttdu08of commented 3 weeks ago

What should I do now?

MatthewL246 commented 3 weeks ago

That is definitely the problem: half of your scripts have CRLF line endings, so those scripts won't work. That is also very strange - I have no idea why half of them would (apparently) randomly have different line endings.

You should be able to rectify the issue by converting them all to LF line endings with the following commands.

sudo apt install dos2unix
find scripts -type f -print0 | xargs -0 dos2unix
ttdu08of commented 3 weeks ago

What next?

MatthewL246 commented 3 weeks ago

Re-run the setup script, it should be fixed if I'm right about the cause of the error.

ttdu08of commented 3 weeks ago

It makes the same error, (I run it with the Ubuntu app)

MatthewL246 commented 3 weeks ago

Can you check if the scripts all have the correct line endings now? Run this and send the output here.

file ./scripts/*
file ./scripts/internal/*
file ./scripts/run-in-container/*
ttdu08of commented 3 weeks ago
./scripts/README.md:                   ASCII text
./scripts/backup.sh:                   Bourne-Again shell script, ASCII text executable
./scripts/compile-custom-inkay.sh:     Bourne-Again shell script, ASCII text executable
./scripts/create-cemu-online-files.sh: Bourne-Again shell script, ASCII text executable
./scripts/create-juxt-community.sh:    Bourne-Again shell script, ASCII text executable
./scripts/full-reset.sh:               Bourne-Again shell script, ASCII text executable
./scripts/get-boss-keys.sh:            Bourne-Again shell script, ASCII text executable
./scripts/internal:                    directory
./scripts/make-pnid-dev.sh:            Bourne-Again shell script, ASCII text executable
./scripts/patch-sssl-certificate.sh:   Bourne-Again shell script, ASCII text executable
./scripts/restore.sh:                  Bourne-Again shell script, ASCII text executable
./scripts/run-in-container:            directory
./scripts/setup-environment.sh:        Bourne-Again shell script, ASCII text executable
./scripts/setup-submodule-patches.sh:  Bourne-Again shell script, ASCII text executable
./scripts/upload-3ds-files.sh:         Bourne-Again shell script, ASCII text executable
./scripts/internal/firstrun-minio-container.sh:        Bourne-Again shell script, ASCII text executable
./scripts/internal/firstrun-mongodb-container.sh:      Bourne-Again shell script, ASCII text executable
./scripts/internal/firstrun-postgres-container.sh:     Bourne-Again shell script, ASCII text executable
./scripts/internal/framework.sh:                       Bourne-Again shell script, ASCII text executable
./scripts/internal/migrations.sh:                      Bourne-Again shell script, ASCII text executable
./scripts/internal/update-account-servers-database.sh: Bourne-Again shell script, ASCII text executable
./scripts/internal/update-miiverse-endpoints.sh:       Bourne-Again shell script, ASCII text executable
./scripts/internal/update-postgres-password.sh:        Bourne-Again shell script, ASCII text executable
./scripts/run-in-container/create-account-dat.js:                JavaScript source, ASCII text
./scripts/run-in-container/create-juxt-community.js:             JavaScript source, ASCII text
./scripts/run-in-container/friends-nex-go-rewrite-migration.sql: ASCII text
./scripts/run-in-container/make-pnid-dev.js:                     JavaScript source, ASCII text
./scripts/run-in-container/minio-init.sh:                        POSIX shell script, ASCII text executable
./scripts/run-in-container/mongodb-init.js:                      ASCII text
./scripts/run-in-container/postgres-init.sh:                     POSIX shell script, ASCII text executable
./scripts/run-in-container/update-account-servers-database.js:   JavaScript source, ASCII text
./scripts/run-in-container/update-miiverse-endpoints.js:         JavaScript source, ASCII text
ttdu08of commented 3 weeks ago

What should I do ?

MatthewL246 commented 3 weeks ago

I am not sure what the problem is at this point, since fixing the line endings didn't solve it.

ttdu08of commented 3 weeks ago

Oh right, I wanted to try again with WSL but the problem is that I can't do the “cd” command if you don't mind, can you help me via Anydesk please? Thank you for your help

MatthewL246 commented 3 weeks ago

Oh right, I wanted to try again with WSL but the problem is that I can't do the “cd” command

I'm not sure what you mean here. The Ubuntu app is itself WSL: Ubuntu is a Linux distro that runs in the Windows Subsystem for Linux.

can you help me via Anydesk please?

I'm sorry, but I don't have the time to provide 1-on-1 support for issues via remote desktop/video chat.

ttdu08of commented 3 weeks ago

Oh right, since I have two applications, one Ubuntu and one WSL