Troubleshooting
When a connection fails, the app shows Connection Failed with one of the messages below; when a connection that was up ends, the connection log has the message in a line starting with OpenVPN: closing with reason:. Both apps use the same words.
Where this page comes from
Each message below was produced by a case of Test results, which names the case; the server's side of each comes from the server's log in the same run.
First checks
- Open the connection log: tap the status under the power button. Set Log Level to Expert to see OpenVPN's own lines.
- On the server,
journalctl -u openvpn-server@udp -f(or the name of your server's configuration) shows each connection, and why the server refused one.
The profile
| Message | What it means and what to do |
|---|---|
| Invalid OpenVPN profile: … | OpenVPN cannot read the profile; the rest of the message is OpenVPN's reason, for example option 'remote' must have at least 1 arguments. Import the profile again from the original file. |
| This profile uses an OpenVPN static key (secret), which OpenVPN 3 does not support. Ask for a profile with certificates (TLS mode). | The profile has a secret key instead of certificates. The app's OpenVPN does not have that mode; the server has to give out a profile with certificates, as OpenVPN server does. |
| The profile's private key is protected with a passphrase, which this app cannot enter. … | The <key> block is encrypted. Write the key without a passphrase, for example with openssl pkey -in client.key -out client-plain.key, and put that in the profile. |
| This profile requires a username and password (auth-user-pass). Enter them in the profile editor. | The profile asks for a login and the profile has none. Fill in Username and Password. |
The server
| Message | What it means and what to do |
|---|---|
| The server did not answer. | Nothing came back over UDP within 10 seconds. The usual reasons: the port is wrong or closed by a firewall, the server is not running, or the profile's tls-crypt or tls-auth key is not the server's: the server then drops every packet without a word. Check Server and Port, and that the profile came from this server. |
| The server refused the connection: no OpenVPN server answers on that port. | A TCP profile reached the server, but nothing listens on the port. Check Port, and that the server's TCP configuration runs. |
| The server name … could not be resolved. | The name in Server (or in the profile's remote line) does not exist in DNS. Check its spelling. |
| The server refused the login. Check the username and password. | The server's login check refused the username or the password. |
| The server and this app have no data-channel cipher in common (…). | The server's data-ciphers names none of the app's: AES-GCM, ChaCha20-Poly1305 and AES-CBC. Add AES-256-GCM to the server's data-ciphers. |
| The server's certificate could not be verified with the profile's CA (…). | The <ca> of the profile did not sign the server's certificate: the profile belongs to another server, or the server's certificate was made again with a new CA. Import a profile made by this server. |
| The server stopped answering after the TLS handshake. It may have refused the client certificate (revoked, from another CA or expired); the server's log names the reason. | The server checks the phone's certificate at the end of the TLS handshake and, when it refuses it, says why only in its own log, after which nothing comes back; the app reports this after about 40 seconds. The server's log names the reason, for example VERIFY ERROR: … certificate revoked. Make the phone a new certificate and profile (part 5). |
| The server pushes compression (lz4-v2), which this app does not take: compression inside a VPN can leak data (VORACLE). … | The server sends compress or comp-lzo to the app. Compression inside a VPN lets an attacker learn secrets from the size of the packets, so the app does not use it. Remove compress and comp-lzo from the server's configuration; OpenVPN 2.6 needs neither. |
| The server pushed a setting this app cannot use (…). | Another setting the server sends that the app's OpenVPN refuses; the rest of the message is OpenVPN's reason. |
stunnel
| Message | What it means and what to do |
|---|---|
| The stunnel server's certificate is not trusted for … (another name, expired, or not from a public certificate authority; …). | With CA Certificate on System Trust, the stunnel certificate must come from a public certificate authority and be valid for the name in stunnel SNI (or stunnel Host). A certificate of your own CA needs that CA imported in CA Certificate; a name in SNI the certificate does not have needs SNI empty or changed. |
| The stunnel server's certificate is not signed by the imported CA Certificate, or not issued for …. | With a CA imported, the app accepts only certificates that CA signed, for the SNI name. Import the CA that signed the server's certificate. |
| The stunnel server … refused the connection: nothing listens on that port. | Check stunnel Port (empty means 443) and that stunnel runs: ss -tlnp | grep stunnel. |
| The stunnel server … did not answer., … cannot be reached from this network. | Check stunnel Host and the firewall in front of the server. |
| The stunnel server closed the connection. | stunnel ended the connection: it restarted (certbot does that after renewing the certificate), or OpenVPN behind it is not running: stunnel accepts the TLS connection and closes it when it cannot reach 127.0.0.1:1194. With Auto Reconnect, the app connects again. |
| The TLS handshake with the stunnel server … failed (…) | stunnel and the app did not agree on TLS. The app speaks TLS 1.2 and 1.3; stunnel's sslVersionMin must allow one of them. |
A connection that was up
| Message | What it means and what to do |
|---|---|
| The server restarted the session (auto reconnect is off). | The server restarted, or its administrator ended the session; without Auto Reconnect the VPN ends. With it, the app connects again at once. |
| The server ended the session. | The server told the app to stop (an administrator's client-kill … HALT). The app does not connect again on its own. |
| The server stopped answering (keepalive timeout) (auto reconnect is off). | Nothing came from the server for 60 seconds (the server's keepalive): the network path died. With Auto Reconnect, the app connects again once the server answers. |
| Could not reconnect after 2 attempts. (…) | Retry Times ran out while the server was away; the part in brackets is the last reason. Empty Retry Times keeps trying. |
| The connection was closed while the device slept. | On Sleep is Off and Auto Reconnect is off: the app closed the connection at sleep and did not connect again at wake. Choose Stay or Pause, or turn Auto Reconnect on. |