coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: Services Getoutline doesn't work 404 and (unhealthy)

Open romainds-tech opened this issue 1 year ago • 11 comments

Error Message and Logs

I try to install getOutline service but it doesn't work. When I click on the link I got 404 not found : image

I created a basic simple project and install it, 3 services was created with the main unhealthy (screen below) image

Everything seems good in logs : Outline logs

2024-10-17T21:51:37.871462602Z yarn run v1.22.22
2024-10-17T21:51:37.926126299Z $ node ./build/server/index.js
2024-10-17T21:51:43.048074044Z {"label":"lifecycle","level":"info","message":"Note: Restricting process count to 1 due to use of collaborative service"}
2024-10-17T21:51:43.224245820Z {"label":"lifecycle","level":"info","message":"\nIs your team enjoying Outline? Consider supporting future development by sponsoring the project:\n\nhttps://github.com/sponsors/outline\n"}
2024-10-17T21:51:48.027778942Z {"label":"lifecycle","level":"info","message":"Note: Restricting process count to 1 due to use of collaborative service"}
2024-10-17T21:51:48.032993375Z {"label":"lifecycle","level":"info","message":"Starting collaboration service"}
2024-10-17T21:51:48.048345594Z {"label":"lifecycle","level":"info","message":"Starting websockets service"}
2024-10-17T21:51:48.052861558Z {"label":"lifecycle","level":"info","message":"Starting worker service"}
2024-10-17T21:51:48.056787262Z {"label":"lifecycle","level":"info","message":"Starting web service"}
2024-10-17T21:51:48.083077060Z {"label":"lifecycle","level":"info","message":"Listening on http://localhost:3000 / http://outline-vgo0c8og8s8go8c4w0ssw0ck.MYIP.sslip.io"}

Postgres Logs

2024-10-17T21:51:06.687536487Z 
2024-10-17T21:51:06.687568195Z PostgreSQL Database directory appears to contain a database; Skipping initialization
2024-10-17T21:51:06.687572456Z 
2024-10-17T21:51:06.709266658Z 2024-10-17 21:51:06.708 UTC [1] LOG:  starting PostgreSQL 12.20 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit
2024-10-17T21:51:06.709293297Z 2024-10-17 21:51:06.709 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-10-17T21:51:06.709298295Z 2024-10-17 21:51:06.709 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-10-17T21:51:06.722644407Z 2024-10-17 21:51:06.718 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-10-17T21:51:06.739956201Z 2024-10-17 21:51:06.739 UTC [27] LOG:  database system was interrupted; last known up at 2024-10-17 21:50:00 UTC
2024-10-17T21:51:06.891128114Z 2024-10-17 21:51:06.890 UTC [27] LOG:  database system was not properly shut down; automatic recovery in progress
2024-10-17T21:51:06.893526716Z 2024-10-17 21:51:06.893 UTC [27] LOG:  redo starts at 0/16592F0
2024-10-17T21:51:06.953642065Z 2024-10-17 21:51:06.953 UTC [27] LOG:  invalid record length at 0/18583A8: wanted 24, got 0
2024-10-17T21:51:06.953702280Z 2024-10-17 21:51:06.953 UTC [27] LOG:  redo done at 0/1858370
2024-10-17T21:51:06.999861580Z 2024-10-17 21:51:06.998 UTC [1] LOG:  database system is ready to accept connections

Redis Logs

2024-10-17T21:51:06.677745596Z 1:C 17 Oct 2024 21:51:06.677 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
2024-10-17T21:51:06.677796380Z 1:C 17 Oct 2024 21:51:06.677 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2024-10-17T21:51:06.677800864Z 1:C 17 Oct 2024 21:51:06.677 * Redis version=7.4.1, bits=64, commit=00000000, modified=0, pid=1, just started
2024-10-17T21:51:06.677803735Z 1:C 17 Oct 2024 21:51:06.677 * Configuration loaded
2024-10-17T21:51:06.677982576Z 1:M 17 Oct 2024 21:51:06.677 * monotonic clock: POSIX clock_gettime
2024-10-17T21:51:06.679386586Z 1:M 17 Oct 2024 21:51:06.679 * Running mode=standalone, port=6379.
2024-10-17T21:51:06.680623001Z 1:M 17 Oct 2024 21:51:06.679 * Server initialized
2024-10-17T21:51:06.680637839Z 1:M 17 Oct 2024 21:51:06.679 * Ready to accept connections tcp

Steps to Reproduce

  1. Install coolify with : curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
  2. Setup basic project with Getoutline

Example Repository URL

No response

Coolify Version

v4.0.0-beta.360

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04

Additional Information

No response

romainds-tech avatar Oct 17 '24 21:10 romainds-tech

even setting FORCE_HTTPS to false gives the same result

romainds-tech avatar Oct 17 '24 22:10 romainds-tech

I'm having kind of the same issue:

Image

it's deployed but when you get to the page it's stuck here

Image

and the developer console has this error:

Image

I'll reserach more to see if there's anything else.

EDIT: it could be related to this https://github.com/outline/outline/issues/6050

emimontesdeoca avatar Oct 24 '24 11:10 emimontesdeoca

are you using basic auth?

EverStarck avatar Nov 01 '24 21:11 EverStarck

Hey @EverStarck, I'm not using any auth, I just deployed it to Coolify from the list of apps to add and when accessing it's just there, doing nothing:

Image

Is there anything I can give you to check, any logs or configuration?

emimontesdeoca avatar Nov 27 '24 11:11 emimontesdeoca

Hey @EverStarck, I'm not using any auth, I just deployed it to Coolify from the list of apps to add and when accessing it's just there, doing nothing:

Image

Is there anything I can give you to check, any logs or configuration?

are you fetching a js and it throws 401? or in your js are you doing a fetch to another API and that throws the 401?

you can check some other logs on servers > proxy > logs

EverStarck avatar Nov 27 '24 14:11 EverStarck

You need to enable at least one auth method, eg Google Auth. Check the pre-populated env vars in Coolify for your options.

joshajh avatar Jan 29 '25 13:01 joshajh

You need to enable at least one auth method, eg Google Auth. Check the pre-populated env vars in Coolify for your options.

Yes, I found the list with instructions for setup here: https://docs.getoutline.com/s/hosting/doc/authentication-7ViKRmRY5o

jordankilburn avatar Feb 14 '25 15:02 jordankilburn

Thanks!

I'll take and look and let you know!

emimontesdeoca avatar Feb 20 '25 12:02 emimontesdeoca

You need to enable at least one auth method, eg Google Auth. Check the pre-populated env vars in Coolify for your options.

Yes, I found the list with instructions for setup here: https://docs.getoutline.com/s/hosting/doc/authentication-7ViKRmRY5o

Hey, I tried setting up everything, I used Keycloak so far but I'm now getting another error after I successfully login with Keycloak:

Image

The logs are the following:

2025-03-20T16:14:36.442149398Z {"error":"Failed to parse response from https://auth.xxxxxx.xxx/realms/xxxxxx/protocol/openid-connect/userinfo. Expected JSON, got: ","level":"error","message":"Error during authentication","stack":"InternalServerError: Failed to parse response from https://auth.xxxxxx.xxx/realms/xxxxxx/protocol/openid-connect/userinfo. Expected JSON, got: \n at InternalError (/opt/outline/build/server/errors.js:36:34)\n at request (/opt/outline/build/server/utils/passport.js:79:37)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async OAuth2Strategy._verify (/opt/outline/build/plugins/oidc/server/auth/oidc.js:59:23)"}

Looks like something related to the userinfo endpoint is not working correctly but to be honest I don't know what that could be, have this happened before?

I'm using the provided value in the https://auth.xxxxxx.xxx/realms/xxxxxx/.well-known/openid-configuration

"userinfo_endpoint": "https://auth.xxxxxx.xxx/realms/xxxxxx/protocol/openid-connect/userinfo",

Image

emimontesdeoca avatar Mar 20 '25 16:03 emimontesdeoca

Hey; I've found the fix for this (at least for me). The ENV variable SERVICE_BASE64_OUTLINE is incorrectly generated.

You will need to manually run openssl rand -hex 32 and replace it with that string.

I'm not sure how to get this into a coolify fix/PR

nothingrandom avatar Mar 26 '25 18:03 nothingrandom

Further, when you create the service and first successfully auth; you won't be an admin but just a member.

Step-by-Step Elevation Process

1. Access PostgreSQL Database

Open your project's terminal and connect to the PostgreSQL database using the following command:

psql -d $POSTGRES_DATABASE -U $SERVICE_USER_POSTGRES
  • $POSTGRES_DATABASE: Your specific database name
  • $SERVICE_USER_POSTGRES: The PostgreSQL service user

2. Identify Your User

First, list the users to find your specific user details:

SELECT * FROM users LIMIT 10;
  • Carefully identify your unique user ID ($USER_ID)

3. Update User Role to Admin

Execute the following SQL command to change your role:

UPDATE users SET role = 'admin' WHERE id = '$USER_ID';
  • Replace $USER_ID with your actual user ID
  • Ensure you use the exact ID from step 2

4. Verify Role Change

Confirm the role has been successfully updated:

SELECT id, name, role FROM users WHERE id = '$USER_ID';

5. Refresh Your Outline Instance

  • Close and reopen your Outline application
  • You should now have "admin" privileges

nothingrandom avatar Mar 26 '25 19:03 nothingrandom