SXAccessSXAccessDocs
Open dashboard

Troubleshooting the client

Symptoms, the likely cause, and the command that tells them apart.

Start with sxaccess info -d every time. It answers the first questions - is the agent running, does this device reach the SXAccess services, and what does it know about each device it may connect with - and most faults are decided by that output alone. If the agent is not running, the command says so instead of printing anything else.

Reading the detail view

The first line is the answer. The rows under it are the parts that produced it, followed by a Devices: list with one block for each device an access rule connects this one with, and the agent's recent events.

LineWhat it tells you
Connected, Partly connected, Not connectedWhether this device reaches both the management service and Discovery. Partly connected means one of them answers and the other does not, and the row of the one that does not says why
This device, AddressThe device's DNS name and its overlay address
Devices, NetworksHow many of the devices this one may connect with are connected now, for example 3 of 5 connected, and the routed networks it uses
Service, DiscoveryConnected to and the endpoint, or Disconnected with the reason in brackets. Service is the management service at mgmt.sxaccess.com
RelaysEvery STUN, TURN and relay endpoint the management service handed to this device, each marked Reachable or Not reachable
DNS serversEach DNS server that applies to this device, the domains it answers for, and whether it is reachable
InterfaceKernel or Userspace: where the tunnel runs. Only the agent on Linux can use the kernel
Identity, Quantum res., Lazy conn.The identity in use, and whether quantum resistance and on-demand connections are on
Agent, CLIThe version of the running agent and of the sxaccess command. Quote both when you ask for support
Path, per deviceP2P for a direct path, Relayed for one through a relay
Candidates, Round trip, Last handshake, Transferred, Reaches, per deviceThe kind of address each end uses, the latency, when the tunnel last completed a handshake, the bytes received and sent, and the routed networks reached through that device

Symptom to cause

SymptomLikely causeWhat to do
info prints cannot reach the SXAccess agentThe agent service is stopped, or was never installedsxaccess agent info prints Agent service: Running or Stopped. Start it with sudo sxaccess agent start, then connect with sxaccess start. If it was never installed, run sudo sxaccess agent install first
info prints This device is not signed in, or the device worked for a day and then stoppedIts session expired. Only devices enrolled by signing in have a session, 24 hours by default; devices enrolled with an enrollment key never expire. A deleted device, or one that belongs to a blocked member, gets the same messagesxaccess start signs it in again; enrol a server again with an enrollment key. The length is set under Settings → Security → Session length, see Organization settings
info prints This device's organization is suspended …Access is paused for the whole organization, not for this deviceNothing to do on the device: the agent tries again about every 5 minutes and reconnects on its own once the organization is active again, without a new sign-in. Contact your organization's administrator, and see Organizations
info says Connected, but a device you expect is not in the listNo enabled access rule connects the two devices, in either direction, or a device requirement on the rule leaves the source device out. A device that fails a rule's device requirements is dropped from that rule without a messageCheck both devices' groups and the access rules, then the rule's device requirements
A device is listed but unreachableA rule connects the devices, but not for the protocol or port you are using, or nothing listens on that portTrace the connection on the device you are trying to reach. Trace why a connection is blocked shows which stage drops it
Every device shows Path: RelayedOutbound UDP is blocked, or both ends sit behind strict NATSee NAT and connectivity and Restricted networks. The Relays block of sxaccess info -d shows which STUN and TURN endpoints this device reaches
Device disappeared from the dashboardIt was enrolled with a key that has Temporary devices on, and it was offline for more than 10 minutesEnrol it again. For a long-lived machine, use a key without Temporary devices; see Enrollment keys
Internal names do not resolveNo DNS server applies to this device for that domain, DNS management is turned off for it, or another resolver on the machine answers firstCheck the DNS servers block of sxaccess info -d, and see DNS. On Linux, check what manages /etc/resolv.conf
A routed network is not reachableThe network is published to this device but not selected on itsxaccess reach list shows each network with state: Selected or Not Selected. sxaccess reach add -a <name> adds one, by the name reach list shows; without -a, add replaces the current selection. A network missing from the list is not published to this device: check the access rule that names the resource, or the route's Applies to groups
After a crash or power loss, DNS or routes still point at SXAccess while it is disconnectedThe agent did not get to undo the changes it madesxaccess stop, then sxaccess store reset --all. See Stored state
Tunnel is up, no traffic passesAnother VPN or a security product's network filter handles the traffic firstTurn the other product off and test again

Reading the logs

The agent logs to /var/log/sxaccess/client.log on Linux and macOS. The file belongs to root, so read it with sudo. At info, the default, it records enrolment, map updates and connection changes. At debug it adds ICE candidate gathering and every connection attempt, which is where the answer usually is; trace is more detailed still. sxaccess diagnose verbosity changes the level until the agent restarts.

shell - raise the level until the agent restarts
sxaccess diagnose verbosity debugsudo tail -f /var/log/sxaccess/client.log

Press Ctrl-C to stop following the log. To go back to the normal level, run the command below; restarting the agent does the same.

shell - back to the normal level
sxaccess diagnose verbosity info

Collecting a bundle

For anything you cannot resolve yourself, send a diagnostics bundle. sxaccess diagnose collect packs the agent's logs, the detail view, its settings, the network map it last received and the system's routes, interfaces and, on Linux, firewall rules into one archive. -S=false leaves the system information out, and -C sets how many older log files go in (one by default).

shell - a bundle right now
sxaccess diagnose collect

For a fault that only happens sometimes, sxaccess diagnose capture 5m is the right tool. It switches the agent to trace logging, disconnects and reconnects the device so the log starts from a fresh connection, waits the time you give, builds the archive and puts the level back. Because it reconnects, sessions running over SXAccess, such as SSH, drop. A device that was disconnected is connected for the capture and disconnected again afterwards.

shell - trace the next five minutes, then bundle
sxaccess diagnose capture 5m

Both print Bundle saved to: and the path of a sxaccess-support-*.zip file in the agent's temporary directory. Add -A to either command to replace public addresses and outside domains first, as in sxaccess diagnose collect -A. Only root can read the archive, so copy it somewhere you can read it before you attach it, with its path in place of <path>:

shell - copy the archive somewhere you can read it
sudo cp <path> ~/ && sudo chown "$USER" ~/sxaccess-support-*.zip

Starting clean

When a machine's local state is suspect, start it again from nothing. The commands below work on Linux and macOS, and they are the same steps as Resetting the agent. The machine comes back as a new device and may get a different overlay address, so update anything that referred to the old one.

First disconnect, undo the DNS and route changes the agent recorded, and stop the agent:

shell - reset, before the dashboard
sxaccess stopsxaccess store reset --allsudo sxaccess agent stop

Now delete the device under Devices in the dashboard. That revokes its key, and it frees the machine's DNS name: while the old entry exists, a new device gets that name with two numbers added.

Then delete the agent's state, which the agent creates again when it starts, and your own folder that records which identity the CLI uses: ~/.config/sxaccess on Linux, ~/Library/Application Support/sxaccess on macOS. Start the agent and enrol again. On a server, end with sxaccess start --enrollment-key-file <file> instead.

shell - reset, after the dashboard
rm -rf ~/.config/sxaccess "$HOME/Library/Application Support/sxaccess"sudo rm -rf /var/lib/sxaccess &&  sudo sxaccess agent start &&  sxaccess start