Kuma installation make localecompile failed

Hi everyone,

I tried to execute installation command for macOs (docker exec -i kuma_web_1 make localecompile) that got the failed message:

msgfmt: error while opening “./af/LC_MESSAGES/django.mo” for writing: Permission denied
Makefile:82: recipe for target ‘localecompile’ failed

I searched the logbot and get the relation url here: https://mozilla.logbot.info/mdndev/20171102

But I couldn’t work success.

Here is a pastebin url that have full error descriptions and my environment settings. (I didn’t use the sudo to execute all commands)
https://pastebin.mozilla.org/9090760

If you need some other resources I didn’t provide it , please tell me.

Thanks.

We discussed this issue in IRC (#mdndev), where is it easier to troubleshoot.

The issue appears to be that there was a mismatch between the code and the docker images. PR 4852 introduced significant changes, and it is important that both the code and the docker images have that change.

Previous to PR 4852, running docker-compose exec web bash -c "whoami && groups" prints www-data www-data for MacOS users. After PR 4852, it should return kuma kuma. There are other permissions changes in the image, that will cause random commands to fail.

I suggested following the Kuma Reset to get the code and image in sync. The Kuma Reset fixes a lot of these issues.

The correct output of make localcompile is long. Only a few representative lines are in the docs for Compile locales

1 Like

Hi jwhitlock,
I have already reset kuma to latest version.

Then I running docker-compose exec web bash -c “whoami && groups”
It prints www-data www-data again.

I running docker-compose exec web bash -c “ls -lart /app”
It prints kuma staff like before.

Do I also need to reset a corrupt database or try to reset kuma again?

It looks like the code was out of date. This fixed it:

git checkout master
git pull
git submodule update --init --recursive
git log --oneline | head -n1

The last line was to confirm that the most recent commit was the same as the one on GitHub: https://github.com/mozilla/kuma/commits/master

Finally, to ensure the new code is used:

docker-compose stop
docker-compose up -d
1 Like

Hi jwhitlock,

Thanks for your help.