Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken image #8

Closed
mujx opened this issue Mar 6, 2018 · 17 comments
Closed

Broken image #8

mujx opened this issue Mar 6, 2018 · 17 comments

Comments

@mujx
Copy link

mujx commented Mar 6, 2018

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.

@andreaspeters
Copy link
Member

andreaspeters commented Mar 6, 2018

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
Copy link
Author

mujx commented Mar 6, 2018

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.

@mvgorcum
Copy link

mvgorcum commented Mar 6, 2018

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.

@andreaspeters
Copy link
Member

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

@andreaspeters
Copy link
Member

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

@mujx
Copy link
Author

mujx commented Mar 6, 2018

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

@mvgorcum
Copy link

mvgorcum commented Mar 6, 2018

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
Copy link
Author

mujx commented Mar 6, 2018

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
Copy link
Author

mujx commented Mar 6, 2018

find / -name activate

doens't return anything from inside the container.

@andreaspeters
Copy link
Member

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.

@mvgorcum
Copy link

mvgorcum commented Mar 6, 2018

@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
Copy link
Author

mujx commented Mar 6, 2018

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

@mvgorcum
Copy link

mvgorcum commented Mar 6, 2018

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?

@andreaspeters
Copy link
Member

andreaspeters commented Mar 6, 2018

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
Copy link
Author

mujx commented Mar 6, 2018

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.

@andreaspeters
Copy link
Member

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
Copy link

xobs commented May 30, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants