Troubleshooting
What the app's messages for an SSL VPN profile mean, what to do about each, and where to look on the server.
Each message below is the one the app showed in the case named beside it, on the iPhone and on Android, against our ocserv test server; see Test results.
Messages while connecting
The app shows these in the Connection Failed alert, and writes them to its log after closing with reason:.
| Message | What it means | What to do |
|---|---|---|
| Authentication failed. Check the username and password. | The server refused the login: a wrong password, a user it does not have, or, on the iPhone, Method Certificate with no certificate imported (ocv-wrong-password, ocv-wrong-user, ocv-cert-missing). | Check the Username and Password. On the server, ocpasswd -c /etc/ocserv/ocpasswd <user> sets the password again. The app does not send a refused password again, so a wrong one ends the attempt at once. |
| The server name could not be found. Check the Server field. | The name in Server did not resolve (ocv-host-unknown). | Check the name for typos, and that it resolves on the phone's network. |
| Cannot connect to the server on this port. Check the Server and Port fields and the network. | Nothing accepted a TCP connection on that port: a wrong Port, ocserv not running, or a firewall on the way (ocv-port-closed). | Check Port (ocserv's tcp-port, 443 by default). On the server, systemctl status ocserv and ss -lntp | grep ocserv. |
| The server did not answer with TLS on this port. Check the Port field. | Another service answers that port, here the server's SSH (ocv-port-other-service). | Use ocserv's port. |
| The server offers only TLS 1.1 or older; the app needs TLS 1.2 or later. | The server's TLS is too old for the app (ocv-server-tls11-only). | Allow TLS 1.2 on the server. ocserv on Ubuntu 24.04 cannot even offer TLS 1.1. |
| The TLS handshake with the server failed. The server may refuse the client certificate, or block this address for a while after wrong passwords. | The server ended the handshake. We saw it for a client certificate from an authority the server does not trust (ocv-cert-rogue-ca), and while ocserv's ban blocked the phone's address (ocv-server-ban). | With Method Certificate, import a certificate signed by the authority in ocserv's ca-cert. Otherwise see Blocked address. |
| The server did not answer as an AnyConnect server. Check the Server Type and the Server field. (or as an F5 BIG-IP server, as a GlobalProtect server) | The server answered, but not as the chosen Server Type: F5 or GlobalProtect chosen for an AnyConnect server (ocv-type-f5-on-anyconnect, ocv-type-gp-on-anyconnect), or an ocserv with camouflage on, which hides itself from anyone without its secret: the profile's Path was empty (ocv-server-camouflage) or held a wrong secret (ocv-path-camouflage-wrong-secret). | Choose the server's type. For an ocserv with camouflage, enter ? and its camouflage_secret in Path. |
| The client certificate could not be read. Re-import it in the profile. | On Android, Method Certificate with no certificate the app can read (ocv-cert-missing). | Import the .p12 file again under Certificate. |
| Could not connect after 2 attempts. (…) | With Auto Reconnect on and Retry Times set, the first connection failed that many times; the reason follows in brackets (ocv-retry-before-connect). | The reason in brackets says what to fix. |
Messages after the VPN was up
These end a VPN that was connected. The app keeps the reason; its log names it after closing with reason:.
| Message | What it means | What to do |
|---|---|---|
| Connection lost (auto reconnect is off). | The connection to the server broke, and Auto Reconnect is off (ocv-life-reset-no-reconnect). | Turn Auto Reconnect on: the app then resumes the same session. |
| The server ended the session (auto reconnect is off). | The server ended the session, for example with occtl disconnect user (ocv-life-server-ends-no-reconnect). | With Auto Reconnect on the app logs in again. |
| Could not reconnect after 2 attempts. | The connection broke, and the server did not answer within the attempts that Retry Times allows (ocv-life-retry-exhausted, with ocserv stopped). | Leave Retry Times empty to keep trying, and check the server. |
| The connection was closed while the device slept. | On Sleep Off closed the connection when the phone slept, and Auto Reconnect is off, so nothing connected it again (ocv-life-sleep-modes). | Use On Sleep Pause or Stay, or turn Auto Reconnect on. |
Blocked address
ocserv counts points for each address that connects, and more for each wrong password. Above max-ban-score it refuses the address until ban-reset-time has passed; the app then reports a failed TLS handshake. On the server:
occtl show ip bans
occtl show ip ban points
occtl unban ip <ADDRESS>
The address is the phone's public address as the server sees it; with several phones behind one office router they share it, and one user's wrong passwords can block the others.
Connected, but slow
- No DTLS. When UDP to the server's
udp-portis blocked, the app carries everything over TLS. It still works (ocv-tls-only-download); on the server,occtl show user <user>shows noDTLS cipherline for such a session. Open UDP 443 for DTLS.
Looking at the server
occtl show status
occtl show users
occtl show user <user>
journalctl -u ocserv --since "10 min ago"
occtl show user shows the session's address, routes, DNS servers, the TLS suite and, under DTLS cipher, whether the data travels over DTLS. The journal shows each login, the reason a session ended, and refused connections.
The app's log
Set Log Level to Expert to see OpenConnect's own progress lines and the routes the server sent, or Debug for the server's headers. The values of the server's cookies are hidden as <elided> at every level, and no level writes the password or TLS secrets. Setting up the app says where the log is.