Troubleshooting

Troubleshooting #

Is it the network? #

If Terraform or an MQTT client times out, check the network before anything else. From your laptop on DVNTM-TD:

curl -fsSLO https://raw.githubusercontent.com/deevnet/ansible-collection-deevnet.net/main/scripts/segment-check.sh
bash segment-check.sh DVNTM-TD

It checks your address and DNS, the provisioning API, the state store and the broker (each over the site CA), the internet, and that the rest of the site is correctly out of reach. Turn off any VPN or iCloud Private Relay first. All passing means the network is fine and the problem is on the Terraform or client side (below). Anything failing: send the whole output to the operator; the fix is on the substrate, not in your repo.

Terraform side #

SymptomWhat it means
No API tokenDEEVNET_API_TOKEN is not exported in this shell
Failed to query available provider packages for deevnet/deevnetthe provider is not in your filesystem mirror, or not at a version your constraint allows. See Before you start
Connection timed out to api.mobile.deevnet.net:8080 or tfstate…:9000you are not on DVNTM-TD (or a trusted seat) β€” where to sit
api.mobile.deevnet.net does not resolve on DVNTM-TDa VPN, Private Relay or hard-coded DNS is bypassing the site’s resolver 10.20.45.1
x509: certificate signed by unknown authorityDEEVNET_API_CACERT does not point at site-ca.pem
401 on the first applythe enrollment token was for a different name, and is now spent. Ask for a new admission
401 lateryou are presenting the enrollment token (spent) instead of terraform output -raw api_token
400 on a broker accounta topic pattern breaks the rules: a leading /, $ or %, a # not at the end, or a device reaching into log/ ( rules)
400 on a DNS recordthe address is outside your own subnet
Saved plan is stalethe state moved between plan and apply. Re-plan
ssh_keys apply fails on a workloada known defect β€” leave ssh_keys unset

Device side #

In rough order of how often each is the cause:

SymptomCheck
Never joins Wi-Fithe PSK is the one from terraform output, not an older one; the SSID is the output’s (DVNTM-IOT on the mobile kit); the board is 2.4 GHz-capable and in range
Joins, but the broker connection fails at TLSthe CA is site-ca.pem (DER for MicroPython); you connect by name, mqtt.mobile.deevnet.net, not by IP β€” the certificate is for the name; the ESP32 has a sane clock
TLS works, CONNACK refused (not authorized)username is <tenant>-<name>; the password is from the current state β€” a -replace issued a new one
Connected, but publishes vanishthe topic must be the granted one, <tenant>/…, exactly. An unauthorized publish is dropped or disconnects the client β€” it is not an error you will see
Connected, subscribed, but nothing arrivesa refused subscription is also silent. Compare your topic with granted_subscribe
Keeps reconnectingtwo devices with the same client id β€” the broker drops the older one each time
Log lines missingthe device publishes to <tenant>/log/<its own device name> and nothing else under log/; read partition <index>-2, not the default
Page last modified: September 26, 2026