-
Notifications
You must be signed in to change notification settings - Fork 36
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
Steps to install #14
Comments
Also looking for an answer to this! |
Late to the party but could be useful to others finding this issue: It seems it will pick up credentials that have previously been saved with the AWS CLI tool. I installed it in the same virtual env I use for synapse and authenticated with the tokens for the synapse-specific IAM I made in the AWS console. For system-installed Synapse I'm not sure what the process would be. Edit: And also the steps outlined in the boto3 docs which I realised are actually linked in the readme of this project. Edit 2: Also for Synapse to find the tool I just installed this project via pip while I had the virtual env for synapse active. |
Steps to install would be great. |
I think you've installed the storage provider for Python 2 while Synapse uses Python 3. I bumped into the same issue. Install |
@rkfg thanks for that. I'm probably a step closer now. |
You should check the logs then (like |
I checked for logs, @rkfg i don't find a daemon.log but this is from my homeserver.log This seems to be the issues, but i don't know what to make of it.
|
Does your Synapse work fine without this S3 backend? Post the full log, this part only says it's got SIGTERM and terminates but it's not clear why. |
Yes, synapse works fine without the s3 backend. As soon as I change out the storage provider lines in the homeserver.yaml and restart, clients can't connect, the status indicates that it continues to attempt restarting. The full log is 300k lines, so I was trying to only post from the timestamp I restarted, to when I restarted with no s3 backend. How much of the log should i provide? |
Just zip it up and attach here. Or post more lines because the first line in your snippet says that Synapse received SIGTERM (which is an external event like stopping the systemd unit) and the rest looks like cleaning up from that. I don't see anything related to its startup. |
I don't see anything unusual there. Can you produce a clean startup log by removing whatever log files you already have and starting Synapse with S3 enabled? |
Steps I tried to grab a better log:
|
This is a weird error, I don't have it. Does it happen when Synapse works without S3? Is the only difference between those configs you swap S3 being enabled and not? Also, post that config (without passwords and such of course). Maybe the problem is there. |
Yes, I get the Failed to insert client IP while synapse is working properly without S3. Everything else is identical.
|
Here's mine:
I suppose you have |
Does this mean anything useful? As the matrix-synapse user, I went in to python3 help, and found the module "s3_storage_provider". But when I give the command for help on that module, i see the below message.
|
Could be a path problem then. Where's your Synapse installed to (path)? I use the official apt repository, it was a bit tricky to install this S3 module because they provide their own python and libraries with Synapse. |
I used this guide when installing, so I used apt to install. https://www.natrius.eu/dokuwiki/doku.php?id=digital:server:matrixsynapse |
Are you using |
What about the install process in docker? |
I also really wanna know this, as I handle a personal synapse server right now, and after adding a whatsapp bridge, the media store started bloating significantly, i'd want to move that to b2, and do the same with other synapse servers in the future |
After I looked at the readme real quick, i noticed the only "installation" step:
This means that doing something like mounting or placing it in the "/data" folder (if that's the working directory of synapse while running) would be enough to "install" it, though i think i'd be ignoring circumstances and dependencies at that point |
@ShadowJonathan @CaptainYukinoshitaHachiman I had this question too. I think the best option is to build and image based on the official matrix/synapse image and install the synapse-s3-storage-provider during the image build. Doing a It should be almost as simple as either cloning or copying the repository into the image, entering the folder and doing a Eg. Cloning
E.g COPY
In practice you may need to also install some missing libraries / dependencies in order for pip to be able to install Here's a Dockerfile i've been using to test an Openstack Swift Storage provider I am trying to build based off the AWS S3 storage provider.
Note I had to install a lot of extras (mostly for the openstacksdk). Unsure about dependencies for boto3 and botocore sorry. Further installing extra depencies, I'd also recommend uninstalling as many of the dependencies as you can at the end of the build process to reduce the weight of the image and reduce the number of unnecessary binaries included. |
I was able to get this working by building my own image. FROM matrixdotorg/synapse:latest
RUN apt -y update \
&& apt -y upgrade \
&& apt -y install g++ libffi-dev git python3-dev python3-pip \
&& pip install --upgrade pip \
&& git clone https://github.com/iokiwi/synapse-swift-storage-provider.git \
&& cd /synapse-swift-storage-provider \
&& pip install . \
&& pip3 install git+https://github.com/matrix-org/synapse-s3-storage-provider.git and my media_storage_providers:
- module: s3_storage_provider.S3StorageProviderBackend
store_local: True
store_remote: True
store_synchronous: True
config:
bucket: my.bucketname.com
region_name: us-east-1
access_key_id: key-id-here
secret_access_key: key-here You may need to adjust the |
Why is this module not included in the .deb package yet? |
Hi! In case you have missed, this package was published to pip registry on May 18, 2021 So now you could install it by simply running This means, that starting from now you don't need to install git via
|
For those using Yunohost to install this module, I would like to add the following steps which had worked for me:
|
Co-authored-by: reivilibre <oliverw@matrix.org>
Ok for those who face the same issue - I copied all the necessary folders from /usr/local/lib/python3.9 to /opt/venvs/matrix-synapse/lib/python3.9 manually and all worked! |
If you use command |
This works for the DO app. Thanks! |
Sorry if this is a stupid question!
I'm on Debian 9 and did
pip install git+https://github.com/matrix-org/synapse-s3-storage-provider.git
I add the following configuration to /etc/matrix-synapse/homeserver.yaml
Then I did a
systemctl restart matrix-synapse
In syslog I see
Tow questions:
How do I have to install synapse-s3-storage-provider so Matrix can find/use it?
How/Where do I configure my S3 credentials?
The text was updated successfully, but these errors were encountered: