this post was submitted on 20 Jan 2024
10 points (85.7% liked)

Selfhosted

40006 readers
781 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Hello everyone,

Recently found LinguaCafe and decided to spin it up. There's a provided docker-compose with just volumes to specify to your own taste. Pretty easy right?

I can't make it work. Spent nearly two hours already trying to figure out what I'm missing.

Can someone take a look at my compose file and tell me where I'm stupid?

_____________ EDITS

Progress has been made, I used chmod 777 on the whole app directory and now get the following error : Illuminate\Database\QueryException SQLSTATE[HY000] [1045] Access denied for user 'linguacafe'@'ip adress censored' (using password: YES) (SQL: select count(*) as aggregate from users)


Here's a somewhat anonymized pastebin, I just removed the password and my name from the file. The rest is basically the file provided by the github + my paths. https://pastebin.com/u2cbWm2n

https://github.com/simjanos-dev/LinguaCafe

What happens is, my containers spin up apparently properly. But when I go to :9191, I have this:

https://imgur.com/a/PiazCcP

I did sudo chmod 777 /home/user/Documents/Docker/LinguaCafe/temp -R as instructed by the documentation.

Never had that happen before. Does anyone know? Thanks

all 14 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 9 months ago (1 children)

Reads to me like the container it's running as a user that doesn't have permission to the volume path.

[–] [email protected] 1 points 9 months ago (1 children)

Is there a command to check that?

[–] [email protected] 1 points 9 months ago

I'm not sure if there's a correct way. What I've done in the past is use "ps" to find out what user the processes are running as.

[–] [email protected] 4 points 9 months ago (1 children)

Probably just a permission issue. The doc seems to recommend giving relaxed permission to the temp folder volume:

sudo chmod 777 /your/linguacafe/temp/folder -R

[–] [email protected] 1 points 9 months ago (1 children)

sudo chmod 777 /your/linguacafe/temp/folder -R

I have done that and it doesn't seem to help. Edited main post to reflect that.

[–] [email protected] 1 points 9 months ago

Now you seems to get MySQL permission issue (or wrong database password, but your issue is probably not that). When using docker compose, MySQL won't see access coming from linguacafe's container as coming from localhost, but instead it's coming from a different IP address inside docker subnet. So make sure your MySQL user has proper privilege, e.g. by granting all permissions to 'user'@'%'.

[–] [email protected] 3 points 9 months ago* (last edited 9 months ago)

Did you change the mysql container database name, username and password to something other than the default linguacafe ?

That would break it, as it's using those specific credentials to login to the database. Which would cause Access denied for user ‘linguacafe’@‘ip adress censored’ (using password: YES) (SQL: select count(*) as aggregate from users)

Try with the default, you'll need to wipe the mysql data under /home/user/Documents/Docker/LinguaCafe/database/ after stopping the container first.

    environment:
        MYSQL_DATABASE: linguacafe
        MYSQL_USER: linguacafe
        MYSQL_PASSWORD: linguacafe
        MYSQL_ROOT_PASSWORD: linguacafe
        SERVICE_NAME: linguacafe
[–] [email protected] 2 points 9 months ago (1 children)

You seem to be missing your username in the volume paths, e.g. /home/username/Documents.

[–] [email protected] 1 points 9 months ago* (last edited 9 months ago)

Sorry that's on me. That's one thing I removed from the pastebin file on purpose, it's here in the real one. I copy paste my path to be sure it's correct.

[–] [email protected] 1 points 9 months ago

That error message says it the permissions of the /home/user/Documents/Docker/LinguaCafe/logs directory. You can try changing it full r/w temporarily to test.

[–] [email protected] 1 points 9 months ago* (last edited 9 months ago)

I think I solved the permission issue? See edit in the main post.

[–] [email protected] 1 points 9 months ago

Based on your update you may need to bring the containers down and up to fix the database.

Sometimes when opening LinguaCafe the first time there is an error message about users database table. If this happens, just stop and start your containers again, it should fix the problem.

docker compose down
docker compose up -d
[–] [email protected] 1 points 9 months ago

Hmm, can you have absolute paths like that in docker compose? Ive always used paths relative to the current working dir.