Matrix - synapse

Hi @mrmarkuz,

Today, I can join #test:matrix.org. I have to connect twice and the second time, it connected.

This capture is when connected to #synapse:matrix.org, just before I joined #test:matrix.org.

[Thu Sep 09 13:40:49.547146 2021] [proxy_http:error] [pid 12712] (70007)The timeout specified has expired: [client 192.168.1.81:50284] AH01102: error reading status line from remote server 192.168.1.111:443
[Thu Sep 09 13:40:49.547224 2021] [proxy:error] [pid 12712] [client 192.168.1.81:50284] AH00898: Error reading from remote server returned by /_matrix/client/r0/join/#test:matrix.org

At the beginning it was quite slow to respond - about 50-60 seconds.
After about 5 minutes later, it was almost instantly.

Michel-André

EDIT: This morning I had an error about ssp or something like that, in red at the top of the Manager.
I updated NS and it went away.

1 Like

Am glad your server now works

2 Likes

Hi @oneitonitram,

On the first try with Cell phone to connect to chat.micronator-dev.org, I received “Bad Gateway”.
I restarted the VM running my Chat and this time, it connected without problem.

ROOM:
#test-martin:element.tovuti.tk

CONNECTIONS:
@michelandre:chat.micronator-dev.org on Cell phone with client Element
@michelandre:matrix.org on Windows station with Firefox
@michelandre:matrix.org on Windows station with Chrome
@mika:element.tovuti.tk on Windows station with TOR

On the chat.micronator-dev.org connection with Firefox, I search for #test-martin:element.tovuti.tk and it joined without problem.

On the matrix.org connection with Chrome, I search for #test-martin:element.tovuti.tk and it joined without problem.

The first text sent to Cell phone from matrix.org took 15-20 second to be received. After, it was almost instantly.

Thank you very much for letting me use your Chat,

Michel-André

2 Likes

Did you notice where you went wrong, maybe you can share we also know how to avoid

Hi @oneitonitram,

I really don’t know what was wrong as I used the snapshot that didn’t work before and it is working now.

The only possibility is:

The “Bad Gateway” was in the NethServer Manager of the main NS server; the one that redirect all the chat links to LOCAL.

But I would be surprise that this was the cause as I should have seen it before as it was obvious on the top of the Manager page and in red…

Maybe some DNS TTL…

I am verifying my documentation and when that will be finished, I will follow it to create a new chat machine. Maybe I will find something by doing that.

Michel-André

Hi all,

Problem #1

The fact that the server didn’t work yesterday, or the day before, and now it’s working is due to the cache of the requesting server i.e. matrix.org.

Server-Server API | Matrix Specification.

Responses (successful or otherwise) to the /.well-known endpoint should be cached by the requesting server… The recommended sensible default is 24 hours. Servers should additionally impose a maximum cache time for responses: 48 hours is recommended. Errors are recommended to be cached for up to an hour, and servers are encouraged to exponentially back off for repeated failures.

Problem #2

The error message:
There was an error joining the room.

The log file:

Invalid signature for server matrix.org with key ed25519:a_RXGa: Unable to verify signature for matrix.org: <class 'nacl.exceptions.BadSignatureError'> Signature was forged or corrupt

This Signature was forged or corrupt is due to the fact that my main server is canonicalising the packet before relying it to the LOCAL server: i.e. replacing the characters %40 , %3A , etc… with their ASCII equivalent.

DETAILS OF THE PROBLEM:
SOLVED Invalid signature for server matrix.org with key ed25519:a_RXGa: · Issue #10749 · matrix-org/synapse · GitHub.

SOLUTION:
See Nethserver-discourse, Let's Encrypt, and SSL - #27 by michelandre.

Michel-André

i was trying to update synapse, after updating the element web interface and but i am getting the following erro

i ran: pip install --upgrade matrix-synapse

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.python.org/simple/matrix-synapse/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Requirement already up-to-date: matrix-synapse in /opt/synapse/lib/python3.6/site-packages
C

this is the command i wanted to run

virtualenv -p python3.6 /opt/synapse
source /opt/synapse/bin/activate
pip install --upgrade matrix-synapse
systemctl restart matrix-synapse

The update is working here, maybe https://pypi.python.org/ was down or had a certificate issue.

It seems it’s already up to date.

1 Like

Hi @oneitonitram,

Are you in /opt/synapse when you update ?

Michel-André

i came accross this from this article

An alternative to this .well-known delegation would be to use SRV DNS record delegation to accomplish the same thing. I’d create an SRV record for _matrix._tcp.example.org with the data 0 10 8448 matrix.example.org (priority= 0 , weight= 10 , port= 8448 , target= matrix.example.org ) which would again let other Matrix servers know where to send the federation traffic for my server. This approach has an advantage of not needing to make any changes on the example.org web server, but it would require the delegated matrix.example.org server to also return a valid certificate for bowdre.net . Trying to get a Let’s Encrypt certificate for a server name that doesn’t resolve authoritatively in DNS sounds more complicated than I want to get into with this project, so I’ll move forward with my plan to use the .well-known delegation instead.

so, how can one request a letsencrypt to a domain thats not deletgated to that server?
@danb35 would acme dns be useful in this instance in a way?

I’m not sure I entirely understand the question, and I’m not going to read through a 200±post thread to try to figure it out. But if the question is whether acme-dns would help you get a cert for a hostname that doesn’t resolve in public DNS, it could.

that was essentially the question.

let me try to understand how to achieve that.

Hey, it seems that Jitsi is getting some competition from non other than the Matrix protocal itself. and element
Just came accross this

Introducing Native Matrix VoIP with Element Call!

and here is the github repo for the same.
vector-im/element-call (github.com)

well, if it eliminates one more app, then its cool i guess.

1 Like

Updated: the Wikified Entry to include the Latest version of element web.

Updated: the Upgrade entry, and added a new release candidate Entry…
Added: Voice/video chat with TURN server

At a Later Time , i am going to try and install this. (Element Call)
vector-im/element-call (github.com)

A Native Matrix Video Conferencing Solution just like Jitsi.
then see if it will work well with the existing installation of Matrix.

First clone, install, and link matrix-js-sdk

git clone https://github.com/matrix-org/matrix-js-sdk.git
cd matrix-js-sdk
git checkout robertlong/group-call
yarn
yarn link

Next you’ll also need Synapse installed locally and running on port 8008.
Since matrix element would be on the same server, it should not be an issue.

Finally we can set up this project.

git clone https://github.com/vector-im/element-call.git
cd element-call
yarn
yarn link matrix-js-sdk
yarn dev

i dont think ill need to setup anything here.

# Used for determining the homeserver to use for short urls etc.
# VITE_DEFAULT_HOMESERVER=http://localhost:8008

# Used for submitting debug logs to an external rageshake server
# VITE_RAGESHAKE_SUBMIT_URL=http://localhost:9110/api/submit

Ill update what i find out.
I Also came A Matrix Admin GUI

SUBNOTE: I think this should Go into the Wiki, Unless @mrmarkuz Module is ready, then we can have that one there.

On a separate Note, i came accross this:

spantaleev/matrix-docker-ansible-deploy: Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker (github.com)

2 Likes

Hi all,
Just did a (re) new (ed) attempt to install Matrix-Synapse on my VPS.
During install I did not notice any errors, however, I get a 503 when trying to connect to the test json

anyone willing to have a look at the config on the live server? (@mrmarkuz @oneitonitram )
goal is to get WA bridge working so I will be able to use element app on my phone to connect to WA

Here is a link to the install log file: Nextcloud
It mentions a problem with deprecated pyhton v3.6 not being supported

thanks in advance

There’s following message in your posted log:

Synapse requires sqlite 3.22 or above.

It seems synapse is configured to use sqlite but we want postgresql.

Here’s the relevant part of homeserver.yaml to use postgresql:

database:
  name: psycopg2
  args:
    user: synapse
    password: SECRET
    database: synapse
    host: localhost
    port: 55433
    cp_min: 5
    cp_max: 10
log_config: "/opt/synapse/example.org.log.config"
media_store_path: /opt/synapse/media_store
...

It’s still working here with python3.6, I also tried python3.8 but the postgres module psycopg2 didn’t work with it.

2 Likes

I will check the yml config file, but I am almost sure I changed it to use postgresql and set the arguments as mentioned…

edit: a bit under the part where I configured postgresql, there were some lines to use sqlite… :-/

Now I do get the json file when I go to https://server/_matrix/key/v2/server/auto

Anyone implemetned WA bridge for matrix-synapse?

Can you point out what exactly this is/does (URL?) and maybe your drive? TIA

i have faced multiple challenges while trying to deploy Matrix with defined Bridges,
for the matrix itself, no issues, but when it comes to bridges, that’s where some challenges arise.

I am made to understand that some of the bridges are also available as docker installs
i am however unsure as to how the integration aspects is when they are done as docker installs,

I am available and ready to dedicate time, and some resources, to have a fully working matrix server, with all the relevant and supported bridges installed.

this is in lone to unification of chat as currently chat is way fragmented.

I am a member of some 4 different slack channels, some other mattermost channels, and coupled with other areas i have to communication, including whatsap, telegram, skype and so on, its so messed up. considering matrix solves all these using bridges, if anyone is available to re-look our current matrix installation, and have a deployment that makes use of matrix bridges, then why not.

someone here is doing that. with a service Beeper — All your chats in one app. Yes, really.