Matrix - synapse

Thank you very much for your support.

I will change those things,

Michel-André

1 Like

@mrmarkuz how then can one have the server be domain.tld and its user user:domain.tld
intead of matrix.domain.tld and user:matrix.domain.tld

if the software was installed on the sub domain, i want the matrix server to just be the domain and not the subdomain

With delegation, I didn’t test yet. I guess you need to start from scratch because the user domain changes.

Yes, I would want to start from scratch and test it.
Just not sure which of the components to adjust. So that am not back to square 1

Create /var/www/html/.well-known/matrix/server as explained in the delegation docs.

so i create a json file on the main domain on https://<server_name>/.well-known/matrix/server

with the details
{
“m.server”: “<synapse.server.name>[:]”
}
and the server being the url or my matrix server as it is right now. is that correct?

Yes, I think so.
Maybe you need to restart httpd or synapse.

I guess you need a port like 443 in the well-known server file.

i think they stated it cant work on a server already running, it needs to be a new server.

ill attempt both way, to do that on the same server, and also on a new server and see if it works.

Also i have seen a DNS record method using SRV records.

i think that much better especially if the main domain is not yet hosted.

You don’t need SRV, well-known delegation should be enough.

yes, i understand it should be enought in this case, if you have the domain hosted on a server.

what about if the main domain is not hested on any sever or ip.

i think that where an alternative SRV method would come in.

I thought to put example.org in homeserver.yaml and the matrix.example.org to the server file.

i think that will query example.org and if it finds nothing it will fail

I understand it like another server searches example.org and finds the server json that redirects to matrix.example.org. So I assume both example.org and matrix.example.org need to be resolvable by DNS.

1 Like

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