AVENTER-UG/docker-matrix

Broken image

mujx opened this issue · 17 comments

mujx commented

Running

docker run -v `pwd`/data:/data --rm -e SERVER_NAME=localhost -e REPORT_STATS=no avhost/docker-matrix generate

fails with the following

-=> generate turn config
-=> generate synapse config
/usr/bin/python: No module named synapse.app
-=> configure some settings in homeserver.yaml
awk: cannot open /data/homeserver.tmp (No such file or directory)
-=> configure some settings in localhost.log.config
sed: can't read /data/localhost.log.config: No such file or directory

-=> you have to review the generated configuration file homeserver.yaml

The weird thing is that it worked before until I removed the old image (from two weeks ago) and pulled a new one. This happens on Arch Linux & macOS with the latest docker versions.

have a look in your docker run command. U map the current (pwd) directory into the container. but maybe on the current directory is no data dir with the config files inside? :-) and as production, please ever use a version-tag image (avhost/docker-matrix:v0.26.0), never the latest one .

mujx commented

The command worked fine so far until a removed and fetched a new image. Also it still fails if I remove the volume params and the error /usr/bin/python: No module name synapse.app doesn't seem related to the data directory.

This isn't a production setup, just a local instance for testing.

Note that @mujx is running the generate command, which should create the config files in the mapped volume in the first place. Somehow this fails and results in errors of homeserver.tmp not existing.

ok, thanks for the information. @mujx have u tried the image version v0.26.0?

@mvgorcum ah yeah, didnt saw. I'm curious if it will work without volume mapping.

mujx commented

The generate command works with v0.26.0.

Although in my script I create users with the register_new_matrix_user script which now isn't available in the PATH and I can't run it. Running it with the full path fails with missing deps from python.

docker exec synapse /bin/bash -c 'register_new_matrix_user --admin -u alice -p secret -c /data/homeserver.yaml http://localhost:8008

While it's possible that it fails with the volume map (for instance if docker can't actually write to the volume) that doesn't seem likely to me. The first error we get is /usr/bin/python: No module named synapse.app which seems purely in-container to me.

There's a significant difference in size between v0.26.0 and latest. Before the new synapse version comes out (IIRC that's a couple of weeks away) we should probably verify that it's working.

As for register_new_matrix_user: did you run source ~/.synapse/bin/activate first? See here

mujx commented

I couldn't find a virtualenv inside the container. How the command would look exactly?

edit: Just to make a note that the above command that creates the user worked fine before. So something changed in the meantime.

mujx commented
find / -name activate

doens't return anything from inside the container.

we already have a failure during our building process:

Exception:
Traceback (most recent call last):

the pipeline should stop at that point therefore the image will not be broken.

@mujx have you tried opening an intereactive shell in the container and run register_new_matrix_user from there?

That would be docker exec -it synapse /bin/bash

mujx commented

@mvgorcum Yes, the command I pasted above does the same thing; synctl is also not available.

Both register_new_matrix_user and synctl run fine in my container using the v0.26.0 docker hub image. Are you sure you have the right container?

u both can stop to waste time. :-) synapse didnt build completely because of a operand failure in there source code. lates build of course. v0.26.0 should work perfectly. :-)

mujx commented

My apologies, the v0.26.0 indeed works fine. I only added the tag on the generate command and not on the start. I will stick with tagged versions in the future.

everything fine @mujx , that's why we start to tag the docker images. to be sure that changes from us or the matrix devs would not break all the great matrix instances. :-) fur us is good to know now, that our build pipeline is unusable. :-)

xobs commented

I've noticed that pip install --upgrade --process-dependency-links . doesn't exit when it encounters an error. I'm running into a problem where Pillow doesn't know how to read /etc/ld.so.conf and can't find libz (python-pillow/Pillow#3103), and errors out. The result is a matrix Docker image that doesn't actually contain synapse.app.