Documentación/Solución de problemas7 min

Errores de conexión y de ejecución

Soluciona fallos al iniciar el servicio, errores de configuración, problemas de TUN, handshakes ausentes y advertencias de DNS.

Lo que tendrás al final

wantasticd status muestra Connected y el dispositivo está Online.

Antes de empezar

  • Root o administrador en el dispositivo.
  • Los logs del servicio (consulta Solución de problemas: empieza aquí → Recopila logs).

Cómo leer los logs

  • Las líneas que empiezan por "Failed to load configuration:" o "Failed to start agent:" detienen el servicio. El gestor de servicios lo reinicia entonces cada 5 segundos.
  • Un arranque correcto termina con "Wantastic agent started successfully".
  • "Device health check failed" cada 30 segundos significa que el agente se ejecuta, pero el túnel no transmite tráfico.
  • Los avisos de P2P, mapeo de puertos y DNS son mayormente informativos.

Qué comprobar

  1. 1El servicio se reinicia en bucle: lee la primera línea "Failed to …" y búscala abajo. Una configuración vacía es la causa más común.
  2. 2El servicio se ejecuta pero no hay handshake: permite UDP 51820 saliente y revisa el reloj.
  3. 3El handshake funciona pero un peer es inalcanzable: revisa los enlaces de grupo en Topology.
Falla: dispositivo no reclamado
$ sudo journalctl -u wantasticd -n 3 --no-pager
wantasticd[812]: Failed to load configuration: validate config: private key required1
systemd[1]: wantasticd.service: Scheduled restart job, restart counter is at 14.
  1. 1Aún no reclamado
El servicio arranca con una configuración vacía y se reinicia en bucle.
Solucionado: reclama y reinicia
$ sudo wantasticd genkey
Device claimed. Configuration saved to /etc/wantastic/config.conf1
$ sudo systemctl restart wantasticd
wantasticd[901]: Wantastic agent started successfully
  1. 1Pulsa Ctrl+C
Reclama el dispositivo con genkey, pulsa Ctrl+C y reinicia el servicio.

Tabla rápida

ErrorSolución más sencilla
Config not found at … / private key requiredReclama con genkey y reinicia.
server public key … / server endpoint requiredElimina la configuración y reclama de nuevo.
failed to resolve endpoint <host>Corrige el DNS; el servicio reintenta.
/dev/net/tun does not existInstala kmod-tun o carga tun.
operation not permittedEjecútalo como root o añade NET_ADMIN.
Device health check failedPermite UDP 51820; corrige el reloj.
the running daemon is older than this CLI…Reinicia el servicio.
DNS: tunnel DNS not written (…)Define WANTASTIC_DNS_MODE=off.

Comprueba el resultado

wantasticd status muestra Connected.
wantasticd peers muestra (server) con un handshake de hace unos segundos.

Errores y soluciones

connect no encuentra una configuración.Config not found at <cfg>. Run `wantasticd genkey --out <key>` to create a claim key and wait for claim, or pass --wait-claim with an existing key.wantasticd connect
Por qué ocurre

El dispositivo nunca se reclamó, o la configuración está en otro lugar.

Solución

Reclama el dispositivo con genkey y reinicia el servicio.

Shellbash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
Comprobar: "Wantastic agent started successfully" en los logs.
El servicio falla justo después de instalarlo.Failed to load configuration: validate config: private key requiredlogs de wantasticd
Por qué ocurre

La configuración está vacía porque el dispositivo aún no está reclamado.

Solución

Reclama el dispositivo con genkey, pulsa Ctrl+C y reinicia el servicio.

Shellbash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
Comprobar: wantasticd status muestra Connected.
Falta la clave del hub en la configuración.Failed to load configuration: validate config: server public key requiredlogs de wantasticd
Por qué ocurre

La configuración está incompleta o se editó a mano.

Solución

Mueve la configuración dañada a otro sitio y vuelve a reclamar el dispositivo.

Shellbash
sudo mv /etc/wantastic/config.conf /etc/wantastic/config.conf.bad
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
Comprobar: El servicio arranca.
La clave del hub no es válida.Failed to load configuration: validate config: server public key must be a base64-encoded 32-byte WireGuard keylogs de wantasticd
Por qué ocurre

La configuración es un marcador de posición (por ejemplo, tras un inicio de sesión fallido en Windows), o la clave se dañó al copiarla y pegarla.

Solución

Mueve la configuración dañada a otro sitio y regístralo de nuevo. En Windows, inicia sesión con un token nuevo.

Shellbash
sudo mv /etc/wantastic/config.conf /etc/wantastic/config.conf.bad
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
Comprobar: El servicio arranca.
La configuración no tiene endpoint.Failed to load configuration: validate config: server endpoint requiredlogs de wantasticd
Por qué ocurre

La configuración está incompleta.

Solución

Mueve la configuración dañada a otro sitio y vuelve a reclamar el dispositivo.

Shellbash
sudo mv /etc/wantastic/config.conf /etc/wantastic/config.conf.bad
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
Comprobar: El servicio arranca.
El nombre del hub no se resuelve al arrancar.Failed to load configuration: validate config: failed to resolve endpoint <host>: …logs de wantasticd
Por qué ocurre

El DNS no está listo al arrancar, o el resolvedor no funciona ("no IP addresses found for hostname").

Solución

Revisa el DNS. El servicio reintenta por sí solo.

Shellbash
nslookup wg.wantastic.app
sudo systemctl restart wantasticd
Comprobar: "WireGuard device up. Peer endpoint: …" en los logs.
No se puede crear la interfaz del túnel.Failed to start agent: create device: create tun: CreateTUN("wantastic0") failed; /dev/net/tun does not existlogs de wantasticd
Por qué ocurre

Falta el módulo del kernel TUN (OpenWrt sin kmod-tun), o un contenedor no tiene /dev/net/tun.

Solución

Instala o carga TUN y reinicia el servicio.

Shellbash
opkg update && opkg install kmod-tun   # OpenWrt
sudo modprobe tun                       # Linux
docker run --device /dev/net/tun --cap-add NET_ADMIN …   # Docker
Comprobar: "Created TUN interface: wantastic0" en los logs.
Errores de permisos en interfaces o rutas.operation not permittedlogs de wantasticd
Por qué ocurre

wantasticd no se ejecuta como root, o el contenedor no tiene el permiso NET_ADMIN.

Solución

Usa el servicio instalado (se ejecuta como root), o añade --cap-add NET_ADMIN al contenedor.

Shellbash
sudo systemctl restart wantasticd
Comprobar: El servicio arranca.
Se agotaron los reintentos de arranque.failed to start agent after 10 attempts: …logs de wantasticd
Por qué ocurre

Se repite otro error. El texto después de los dos puntos es la causa real.

Solución

Busca en esta lista el texto después de los dos puntos, corrígelo y reinicia el servicio.

Comprobar: El servicio arranca.
Puerto de escucha ocupado.Port N in use, using random portlogs de wantasticd
Por qué ocurre

Otro programa usa el puerto. "Port %d in use, retrying with port %d..." significa lo mismo. Es informativo.

Solución

No hay nada que hacer.

Comprobar: El handshake funciona.
No hay peers en el túnel.WARNING: No peers configured in WireGuard device!logs de wantasticd
Por qué ocurre

La configuración no tiene sección [Peer].

Solución

Mueve la configuración a otro sitio y vuelve a reclamar el dispositivo.

Shellbash
sudo mv /etc/wantastic/config.conf /etc/wantastic/config.conf.bad
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
Comprobar: wantasticd peers lista (server).
La comprobación de estado sigue fallando.Device health check failed: …logs de wantasticd (cada 30 segundos)
Por qué ocurre

No hay handshake con el hub: UDP 51820 saliente está bloqueado, el reloj está mal o la MTU es demasiado grande.

Solución

Permite UDP 51820 saliente en el firewall de salida y ajusta el reloj.

Shellbash
sudo timedatectl set-ntp true
wantasticd peers
Comprobar: wantasticd peers muestra un handshake de hace unos segundos.
Falla el puerto de control local.IPC API Error: failed to find open portlogs de wantasticd
Por qué ocurre

El puerto 127.0.0.1:9034 y los siguientes están ocupados. "Warning: failed to start local IPC API" e "IPC API Error binding to …, trying next port..." están relacionados.

Solución

Detén el programa que usa el puerto, o define otro puerto con WTC_IPC_PORT.

Shellbash
sudo ss -ltnp | grep 9034
Comprobar: wantasticd status funciona.
La CLI es más reciente que el servicio.the running daemon is older than this CLI and has no /api/…; restart it to load the installed version (sudo systemctl restart wantasticd)wantasticd status / peers / ping
Por qué ocurre

El binario se actualizó, pero el servicio sigue ejecutando el antiguo.

Solución

Reinicia el servicio.

Shellbash
sudo systemctl restart wantasticd
Comprobar: wantasticd status muestra la nueva versión.
La CLI no puede comunicarse con el servicio.daemon returned HTTP N: …CLI de wantasticd
Por qué ocurre

Falló la API de control local. "decode daemon response" es similar.

Solución

Reinicia el servicio y vuelve a intentarlo.

Shellbash
sudo systemctl restart wantasticd
Comprobar: wantasticd status funciona.
Los peers siguen por relay.direct handshake timeoutlogs de wantasticd
Por qué ocurre

El NAT bloquea una ruta directa. "promotion queue full", "gateway does not answer NAT-PMP", "no UPnP internet gateway found" y "router's external address is not public (CGNAT)" también son inofensivos.

Solución

No hay nada que hacer. El relay funciona. Para rutas directas, habilita UPnP o NAT-PMP en el router.

Comprobar: El tráfico fluye.
El acceso local no encuentra una LAN.enable local access: no directly connected private IPv4 LAN subnet foundwantasticd (--allow-local-access)
Por qué ocurre

El dispositivo no tiene una LAN IPv4 privada.

Solución

Desactiva la opción en este dispositivo con --allow-local-access=false.

Comprobar: No hay error después de reiniciar.
Acceso local en macOS o Windows.automatic local-access subnet routing is not supported on macOS yetwantasticd (--allow-local-access)
Por qué ocurre

Esta función solo funciona en Linux y OpenWrt (Windows muestra "… on Windows yet").

Solución

Usa un dispositivo Linux u OpenWrt como puerta de enlace de la LAN.

Comprobar: El acceso local funciona a través del dispositivo Linux u OpenWrt.
Falló la regla de masquerade.iptables masquerade on <if>: …wantasticd (--allow-local-access)
Por qué ocurre

Falta iptables.

Solución

Instala iptables.

Shellbash
sudo apt-get install -y iptables
opkg install iptables-nft   # OpenWrt
Comprobar: El acceso local funciona.
No se puede habilitar el reenvío.enable forwarding: …wantasticd (--allow-local-access)
Por qué ocurre

La configuración del sistema es de solo lectura (por ejemplo, en un contenedor).

Solución

Habilita el reenvío IP en el host.

Shellbash
sudo sysctl -w net.ipv4.ip_forward=1
Comprobar: El acceso local funciona.
Demasiados dispositivos con acceso local.too many tenant local-access advertiserswantasticd (--allow-local-access)
Por qué ocurre

Demasiados dispositivos de tu cuenta comparten su LAN.

Solución

Desactiva --allow-local-access en los dispositivos que no lo necesiten.

Comprobar: El error desaparece.
No se puede escribir el DNS.DNS: tunnel DNS not written (…)logs de wantasticd
Por qué ocurre

Otro programa gestiona el DNS. Mensajes relacionados: "write <f>: read-only filesystem; remount it read-write or manage DNS through the platform resolver", "<x> owns /etc/resolv.conf; DNS cannot be changed safely", "<if> is not managed by NetworkManager".

Solución

Deja que el sistema gestione el DNS: define WANTASTIC_DNS_MODE=off para el servicio.

Shellbash
sudo mkdir -p /etc/systemd/system/wantasticd.service.d
printf '[Service]\nEnvironment=WANTASTIC_DNS_MODE=off\n' | sudo tee /etc/systemd/system/wantasticd.service.d/dns.conf
sudo systemctl daemon-reload && sudo systemctl restart wantasticd
Comprobar: No hay advertencia de DNS después de reiniciar.
Advertencia de comprobación de actualizaciones.Update check failed; will retry in an hour: …logs de wantasticd
Por qué ocurre

El dispositivo no puede llegar a get.wantastic.app. El túnel sigue funcionando.

Solución

Permite HTTPS hacia get.wantastic.app.

Shellbash
curl -I https://get.wantastic.app/latest
Comprobar: No hay advertencia en la siguiente comprobación horaria.
Dos túneles, o aparece una interfaz wantastic1.ip link / logs de wantasticd
Por qué ocurre

genkey o login sigue ejecutándose en primer plano junto al servicio.

Solución

Pulsa Ctrl+C en la ventana de genkey y reinicia el servicio.

Shellbash
pgrep -a wantasticd
sudo systemctl restart wantasticd
Comprobar: Solo un proceso wantasticd y una interfaz wantastic0.

Continúa con

¿Sigues atascado?

Envía por correo el nombre del dispositivo, la plataforma y el texto exacto del error. Nunca envíes tokens, claves ni contraseñas.

hello@wantastic.app