matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.67k stars 664 forks source link

After Deployed in docker ,Got this TLS handshake error from 172.28.0.1:58774: remote error: tls: unknown certificate #2080

Closed resulraveendran closed 2 years ago

resulraveendran commented 2 years ago

I deployed matrix-org using docker. First, we clone the repository "dendrite" , switch to the v0.5.1 branch then inside that we set up the configurations like dendrite.YAML configuration file,matrix_key.pem server key, as generated using cmd/generate-keys, server.crt certificate file, server.key private key file for the above certificate. After that, I run the docker-compose.deps.yml,docker-compose.polylith.yml and run the docker-compose.monolith.yml file which runs in the 8008 port . But when I try to access in the browser using "http://localhost:8008" I got 404 error. When I check-in docker logs I got "TLS handshake error from 172.28.0.1:58774: remote error: tls: unknown certificate".Is there any way to resolve this

spaetz commented 2 years ago

Apparently, the certificate you configured is not a properly accepted and known one?!

resulraveendran commented 2 years ago

Hi, I register a certificate for my domain and download the key. Then we replace the matrix.pem with new key.But when I restart the container I got "level=fatal msg="Invalid config file: keyBlock is nil \"/etc/dendrite/matrix_key.pem\"" error

kegsay commented 2 years ago

matrix_key.pem server key, as generated using cmd/generate-keys, server.crt certificate file, server.key private key file for the above certificate.

You can't use self-signed certificates for federation to work. Browsers won't trust TLS certs that are self-signed either.

I got "level=fatal msg="Invalid config file: keyBlock is nil "/etc/dendrite/matrix_key.pem"" error

The format of keys and certificates varies. Compare the output of keys from cmd/generate-keys to the ones you downloaded from your CA and ensure they match. Either way, this is a support Q not a Dendrite issue, please use #dendrite:matrix.org for help.