Giter Club home page Giter Club logo

Comments (3)

reivilibre avatar reivilibre commented on September 15, 2024

All user and room avatars are missing entirely, but nothing else? That seems rather odd — avatars aren't really treated any differently (although they are usually thumbnailed server-side).

I can't find them either in my old media store or s3

sounds silly, but how do you mean? What did you do in order to try to 'find' them?


What I'd do: find the URL of one of these pieces of media.
To do so, you might get successful with right clicking it and copying image URL (You should see something like https://example.org/_matrix/media/r0/thumbnail/example.org/abcdef?width=45&height=45&method=crop), or otherwise use /devtools to 'Explore Room State' and look at the 'm.room.avatar(You should see something likemxc://example.org/abcdef`).
That gives you an indication of what file to look for in your media store or s3. If it's for your own server, you would find it in the local media — otherwise in the remote media.

I would look in the Synapse logs for example.org/abcdef to see what's happening to the requests that request the media. Are they failing? Do they give you any messages about the problem? See https://matrix-org.github.io/synapse/latest/usage/administration/request_log.html for a description of the request log format; the 'request ID' will be the same for log lines about the same request, so might be useful in finding out what's happening.

from synapse-s3-storage-provider.

JPinSPACE avatar JPinSPACE commented on September 15, 2024

Good call. I checked the logs and actually wasn't able to find the request I was looking for but I found what seems to be the main issue. The logs are jam-packed with this:

Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]: 2022-12-09 16:00:21,034 - synapse.rest.media.v1.storage_provider - 113 - ERROR - POST-45187 - Error storing file
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]: Traceback (most recent call last):
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/synapse/rest/media/v1/storage_provider.py", line 109, in store
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     return await maybe_awaitable(
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/twisted/python/threadpool.py", line 244, in inContext
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     result = inContext.theWork()  # type: ignore[attr-defined]
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/twisted/python/threadpool.py", line 260, in <lambda>
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     inContext.theWork = lambda: context.call(  # type: ignore[attr-defined]
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/twisted/python/context.py", line 117, in callWithContext
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     return self.currentContext().callWithContext(ctx, func, *args, **kw)
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/twisted/python/context.py", line 82, in callWithContext
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     return func(*args, **kw)
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/s3_storage_provider.py", line 121, in _store_file
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     self._get_s3_client().upload_file(
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/s3_storage_provider.py", line 111, in _get_s3_client
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     self._s3_client = s3 = b3_session.client("s3", **self.api_kwargs)
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/boto3/session.py", line 299, in client
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     return self._session.create_client(
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/botocore/session.py", line 976, in create_client
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     client = client_creator.create_client(
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 155, in create_client
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     client_args = self._get_client_args(
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 485, in _get_client_args
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     return args_creator.get_client_args(
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/botocore/args.py", line 129, in get_client_args
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     endpoint = endpoint_creator.create_endpoint(
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:   File "/usr/local/lib/python3.9/site-packages/botocore/endpoint.py", line 402, in create_endpoint
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]:     raise ValueError("Invalid endpoint: %s" % endpoint_url)
Dec 09 16:00:21 ip-172-31-66-66 matrix-synapse[16816]: ValueError: Invalid endpoint:

I'm confused by it saying it has a bad endpoint, because when I check the documentation it says to just entirely remove the endpoint config line if using S3: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-synapse-s3-storage-provider.md

from synapse-s3-storage-provider.

JPinSPACE avatar JPinSPACE commented on September 15, 2024

Update! This has been resolved. The guide I used erroneously told me to not include an endpoint if I'm using S3. But I got curious and searched for the endpoints for my S3 region, threw it in there, and restarted, and lo and behold everything started working again, including my user avatars. I'll go file an issue with the playbook, thanks.

Here's the guide: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-synapse-s3-storage-provider.md

from synapse-s3-storage-provider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.