TLS connection errors
TLS encrypts a connection and checks that the server is the one you wanted. Novis uses TLS for outbound HTTP calls, mail, IMAP, FTPS, LDAP, databases and the shared cache. In the messages, this host is the computer that runs your Novis program. When a TLS connection fails, the error message has three parts:
- what happened, with the values you can check: the host, the port, the dates or the names;
- who can fix it;
- the fix: a setting with its block, or an action.
Three people can fix a TLS error:
- this host’s
nvs.toml: the person who runs this Novis server changes a setting; - the program: the code that made the call changes an address or an option;
- the server’s operator: the person who runs the remote server changes it.
Every message starts with the name of the method and the host, for example:
Core\Http\Client::get: the TLS connection to `api.example.com` failed.The second sentence says what happened. Each section below starts with one such sentence. The examples use a mail block named
[mail.office]. Your message names your own block, or the option of the call.
A CA this host does not trust
Section titled “A CA this host does not trust”The server's certificate is signed by `Example Corp CA`, a CA this host does not trust.A certificate authority (CA) signs server certificates. Novis trusts the Mozilla list of CAs, which is part of the binary. It does not read the certificate store of the operating system. A company often has its own CA for its internal servers, and Novis does not know that CA.
Who can fix it: this host’s nvs.toml.
The fix: get the CA’s certificate as a PEM file (a text file that starts with
-----BEGIN CERTIFICATE-----). Then use one of these settings:
[mail.office] tls_ca_filenames the file. This block then trusts only that file.[tls.client] rootslists the CAs of every connection.["bundled", "/etc/novis/corp-ca.pem"]trusts the Mozilla list and your file.
A call to Core\Http\Client, Core\Db::open or Core\Ldap::open can name its own CAs in the
tlsCa option. Then roots does not apply to that call, and the program must add the CA to tlsCa.
A self-signed certificate
Section titled “A self-signed certificate”The server sent a self-signed certificate for `mail.example.com`. No CA signed it, so this host doesnot trust it.A self-signed certificate is signed by its own key, not by a CA. Test servers and some devices use
one. A pin is the sha256// hash of the server’s public key. With a pin, Novis accepts only a
server that has that key.
Who can fix it: this host’s nvs.toml, after you check that you trust the server.
The fix: set [mail.office] tls_pin to the sha256// hash of the server’s public key. The host
must also be listed in [capabilities.tls] pin:
[mail.office]host = "mail.example.com"tls = "implicit"tls_pin = "sha256//K5ftMnvMI+j8dOtT7tn5PLOV5+axPc5fyLHBCjL6h3s="
[capabilities.tls]pin = ["mail.example.com"]You can also set tls_ca_file to the certificate’s file. A program’s own call passes the hash in
tlsPin.
A missing intermediate certificate
Section titled “A missing intermediate certificate”The server sent only its own certificate, and this host does not trust its issuer `Example CA R3`.Most CAs do not sign server certificates with their main certificate. They use an intermediate CA certificate. The server must send that certificate together with its own. A browser may still open the site, because browsers download the missing certificate themselves. Novis does not download it.
Who can fix it: the server’s operator.
The fix: the server’s operator configures the full certificate chain. Most servers have a setting
for a “full chain” or “chain” file. If the issuer is a private CA that signs server certificates
directly, set tls_ca_file or [tls.client] roots to its certificate, as in the first section.
A certificate for another name
Section titled “A certificate for another name”The server's certificate is for `mail.example.net`, `smtp.example.net`, and not for `mail.example.com`.A certificate lists the names it is valid for. The address you connected to is not one of them.
Who can fix it: this host’s nvs.toml, or the program.
The fix: connect to one of the names in the message. For a block, change the setting with the
address, such as [mail.office] host. For a program’s own call, change the URL or the host in the
code. A CA setting does not fix this error.
An expired certificate
Section titled “An expired certificate”The server's certificate expired on 2026-11-01 at 00:00 UTC, and this host's clock reads 2026-11-29at 08:15 UTC.Who can fix it: the server’s operator. If this host’s clock is wrong, the person who runs this host.
The fix: the server’s operator renews the certificate. Compare the clock in the message with the real time. If the clock is wrong, correct the clock of this host.
A certificate that is not valid yet
Section titled “A certificate that is not valid yet”The server's certificate is valid only from 2027-01-01 at 00:00 UTC, and this host's clock reads2026-11-29 at 08:15 UTC.Who can fix it: usually the person who runs this host, because its clock is wrong. Otherwise, the server’s operator.
The fix: correct the clock of this host. If the clock is right, the server’s operator installs a certificate that is valid now.
A public key that does not match the pin
Section titled “A public key that does not match the pin”The server's public key is `sha256//AbC…=`, and `[mail.office] tls_pin` names a different key.The pin names one public key, and the server sent another key.
Who can fix it: this host’s nvs.toml, or the program. First ask the server’s operator.
The fix: ask the server’s operator if they changed the key. If they did, confirm the new value with
them. Then set tls_pin, or the call’s tlsPin, to the hash in the message. If they did not change
the key, a different server may be answering in place of the real one. This can be an attack, so do
not change the pin.
A port that does not speak TLS
Section titled “A port that does not speak TLS”Port 587 on `mail.example.com` answered with data that is not TLS.Port 587 on `mail.example.com` closed the connection during the TLS handshake.Port 587 on `mail.example.com` did not finish the TLS handshake in time.The handshake is the first exchange of a TLS connection. These messages usually mean that the port
expects plain text, or a command such as STARTTLS before TLS starts. A timeout can also mean that a
firewall blocks the connection.
Who can fix it: this host’s nvs.toml, or the program.
The fix: use the server’s TLS port. A mail, IMAP or FTPS block has a tls setting, and it must
match the port:
| Setting | Usual ports |
|---|---|
tls = "implicit": TLS from the first byte |
465 for mail, 993 for IMAP, 990 for FTPS |
tls = "starttls" or "explicit": plain text first, then TLS |
587 for mail, 143 for IMAP, 21 for FTPS |
If the port is right and the connection closes, the server may not accept this host’s TLS versions or ciphers. The server’s operator can find the reason in the server’s log.
A server that offers no TLS
Section titled “A server that offers no TLS”The server on port 587 of `mail.example.com` does not offer `STARTTLS`, the command that starts TLS.Some protocols start the connection as plain text, and then ask the server to start TLS. The server answered that it cannot. Novis does not continue without TLS.
Who can fix it: the server’s operator. For mail, IMAP, FTPS and LDAP, this host’s nvs.toml can
also use the server’s TLS port.
The fix: the message names the server setting to turn on. For example:
- mail and IMAP: turn on
STARTTLS, or settls = "implicit"and the TLS port in the block; - LDAP: turn on StartTLS, or use an
ldaps://URL, usually on port 636; - PostgreSQL:
ssl = oninpostgresql.conf, withssl_cert_fileandssl_key_file; - MySQL and MariaDB:
ssl_certandssl_key; - SQL Server: a certificate for the instance, and
Force Encryptionset toYes.
A TLS version the server does not accept
Section titled “A TLS version the server does not accept”The server does not accept TLS 1.2 or 1.3, the versions this host offers.Novis offers TLS 1.2 and TLS 1.3. Older versions are not secure, and Novis does not offer them.
Who can fix it: the server’s operator. If [tls.client] min_version is 1.3, also this host’s
nvs.toml.
The fix: the server’s operator turns on TLS 1.2 or 1.3. If the message names TLS 1.3 only, this
host’s nvs.toml can set [tls.client] min_version to 1.2. That setting applies to every
connection.
No cipher suite in common
Section titled “No cipher suite in common”The server and this host have no cipher suite, key exchange or signature algorithm in common.A cipher suite is the method that encrypts the connection. The server accepts only methods that Novis does not offer, usually old ones.
Who can fix it: the server’s operator.
The fix: the server’s operator turns on a modern cipher suite, such as one with AES-GCM or ChaCha20.
A server that needs a client certificate
Section titled “A server that needs a client certificate”The server asked for a client certificate, and this connection sent none.Some servers accept only clients that show their own certificate.
Who can fix it: the program, for Core\Http\Client. For every other connection, the server’s
operator.
The fix: a Core\Http\Client call passes a client certificate and its key in the identity
option. The other blocks have no setting for a client certificate. So the server’s operator must allow
connections without one.
A certificate the server must replace
Section titled “A certificate the server must replace”The CA that issued the server's certificate has revoked it.The signature on the server's certificate is not valid.The certificate is revoked, damaged, signed with an algorithm Novis does not accept, or made for a use other than a TLS server.
Who can fix it: the server’s operator.
The fix: the server’s operator installs a new, valid certificate.
An error this host did not expect
Section titled “An error this host did not expect”This host did not expect this error: received corrupt message of type Handshake.Novis has no explanation for this error. The message shows the text of the TLS library.
Who can fix it: usually the server’s operator.
The fix: the server’s operator looks for the reason in the server’s log.
TLS errors on this host’s own ports
Section titled “TLS errors on this host’s own ports”Novis also says what went wrong when a client connects to it the wrong way.
The debug viewer (nvs debug) uses TLS. A browser that opens its http:// address gets a short
text that says to open the https:// address. When a browser does not trust the viewer’s certificate, the viewer writes
one line to its error output. The line names [debug] tls_cert_file. At start, the viewer also warns
about a certificate that has expired, expires within 14 days or is not for its address.
The Novis web server does not accept incoming TLS connections. A proxy, such as nginx, receives them
and passes each request to Novis over plain HTTP. When a client starts a TLS connection on a plain
HTTP port, the server answers 400 and logs a warning. The warning names the address and port. The fix is to set the proxy to connect to Novis with http://. The server writes at
most one such warning a minute for each address and port.
Settings
Section titled “Settings”Read every TLS key in Reference: configuration.
[tls.client] has the settings of every outbound connection. Most blocks can also set their own
tls_ca_file and tls_pin.
