---
title: "Verbindungs- und Laufzeitfehler | Wantastic Docs"
description: "Behebe Startfehler des Dienstes, Konfigurationsfehler, TUN-Probleme, fehlende Handshakes und DNS-Warnungen."
url: "https://wantastic.app/de/docs/errors-connect-runtime"
category: "Troubleshooting"
reading_time: "7 Min."
---

# Verbindungs- und Laufzeitfehler

Behebe Startfehler des Dienstes, Konfigurationsfehler, TUN-Probleme, fehlende Handshakes und DNS-Warnungen.

> **Outcome:** wantasticd status zeigt Connected und das Gerät ist „Online“.

## Before you start

- Root oder Administrator auf dem Gerät.
- Die Dienst-Logs (siehe Fehlerbehebung: hier starten → Logs sammeln).

## So liest du die Logs

- Zeilen, die mit „Failed to load configuration:“ oder „Failed to start agent:“ beginnen, stoppen den Dienst. Der Dienstmanager startet ihn dann alle 5 Sekunden neu.
- Ein erfolgreicher Start endet mit „Wantastic agent started successfully“.
- „Device health check failed“ alle 30 Sekunden bedeutet, dass der Agent läuft, der Tunnel aber keinen Verkehr durchlässt.
- P2P-, Port-Mapping- und DNS-Hinweise sind meist nur informativ.

## Was zu prüfen ist

1. Dienst startet in einer Schleife neu: Lies die erste „Failed to …“-Zeile und suche sie unten. Eine leere Konfiguration ist die häufigste Ursache.
2. Dienst läuft, aber kein Handshake: Erlaube ausgehendes UDP 51820 und prüfe dann die Uhrzeit.
3. Handshake funktioniert, aber ein Peer ist nicht erreichbar: Prüfe die Gruppenverbindungen in Topology.

*Fehlerhaft: Gerät nicht zugeordnet: Der Dienst startet mit einer leeren Konfiguration und startet in einer Schleife neu.*

```
$ $ sudo journalctl -u wantasticd -n 3 --no-pager
wantasticd[812]: Failed to load configuration: validate config: private key required
systemd[1]: wantasticd.service: Scheduled restart job, restart counter is at 14.
```

*Behoben: zuordnen, dann neu starten: Ordne das Gerät mit genkey zu, drücke Ctrl+C und starte dann den Dienst neu.*

```
$ $ sudo wantasticd genkey
Device claimed. Configuration saved to /etc/wantastic/config.conf
$ $ sudo systemctl restart wantasticd
wantasticd[901]: Wantastic agent started successfully
```

## Kurzübersicht

| Fehler | Einfachste Lösung |
| --- | --- |
| Config not found at … / private key required | Mit genkey zuordnen, dann neu starten. |
| server public key … / server endpoint required | Konfiguration entfernen, erneut zuordnen. |
| failed to resolve endpoint <host> | DNS korrigieren; der Dienst versucht es erneut. |
| /dev/net/tun does not exist | kmod-tun installieren oder tun laden. |
| operation not permitted | Als root ausführen oder NET_ADMIN hinzufügen. |
| Device health check failed | UDP 51820 erlauben; Uhrzeit korrigieren. |
| the running daemon is older than this CLI… | Dienst neu starten. |
| DNS: tunnel DNS not written (…) | WANTASTIC_DNS_MODE=off setzen. |

## Verify the result

- wantasticd status zeigt Connected.
- wantasticd peers zeigt (server) mit einem Handshake vor wenigen Sekunden.

## Common issues

### connect findet keine Konfiguration.

```
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.
```

- **Where:** wantasticd connect
- **Likely cause:** Das Gerät wurde nie zugeordnet, oder die Konfiguration liegt an einem anderen Ort.
- **Fix:** Ordne das Gerät mit genkey zu und starte dann den Dienst neu.

Shell:

```bash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
```

- **Verify:** „Wantastic agent started successfully“ in den Logs.

### Dienst schlägt direkt nach der Installation fehl.

```
Failed to load configuration: validate config: private key required
```

- **Where:** wantasticd-Logs
- **Likely cause:** Die Konfiguration ist leer, weil das Gerät noch nicht zugeordnet ist.
- **Fix:** Ordne das Gerät mit genkey zu, drücke Ctrl+C und starte dann den Dienst neu.

Shell:

```bash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
```

- **Verify:** wantasticd status zeigt Connected.

### In der Konfiguration fehlt der Hub-Schlüssel.

```
Failed to load configuration: validate config: server public key required
```

- **Where:** wantasticd-Logs
- **Likely cause:** Die Konfiguration ist unvollständig oder wurde von Hand bearbeitet.
- **Fix:** Verschiebe die defekte Konfiguration und ordne das Gerät erneut zu.

Shell:

```bash
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
```

- **Verify:** Der Dienst startet.

### Hub-Schlüssel ist ungültig.

```
Failed to load configuration: validate config: server public key must be a base64-encoded 32-byte WireGuard key
```

- **Where:** wantasticd-Logs
- **Likely cause:** Die Konfiguration ist ein Platzhalter (zum Beispiel nach einem fehlgeschlagenen Windows-Login), oder der Schlüssel wurde beim Kopieren und Einfügen beschädigt.
- **Fix:** Verschiebe die defekte Konfiguration und registriere das Gerät erneut. Melde dich unter Windows mit einem neuen Token an.

Shell:

```bash
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
```

- **Verify:** Der Dienst startet.

### Konfiguration hat keinen Endpunkt.

```
Failed to load configuration: validate config: server endpoint required
```

- **Where:** wantasticd-Logs
- **Likely cause:** Die Konfiguration ist unvollständig.
- **Fix:** Verschiebe die defekte Konfiguration und ordne das Gerät erneut zu.

Shell:

```bash
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
```

- **Verify:** Der Dienst startet.

### Hub-Name wird beim Booten nicht aufgelöst.

```
Failed to load configuration: validate config: failed to resolve endpoint <host>: …
```

- **Where:** wantasticd-Logs
- **Likely cause:** DNS ist beim Booten noch nicht bereit, oder der Resolver ist defekt („no IP addresses found for hostname“).
- **Fix:** Prüfe DNS. Der Dienst versucht es selbstständig erneut.

Shell:

```bash
nslookup wg.wantastic.app
sudo systemctl restart wantasticd
```

- **Verify:** „WireGuard device up. Peer endpoint: …“ in den Logs.

### Tunnel-Interface kann nicht erstellt werden.

```
Failed to start agent: create device: create tun: CreateTUN("wantastic0") failed; /dev/net/tun does not exist
```

- **Where:** wantasticd-Logs
- **Likely cause:** Das TUN-Kernelmodul fehlt (OpenWrt ohne kmod-tun), oder ein Container hat kein /dev/net/tun.
- **Fix:** Installiere oder lade TUN und starte dann den Dienst neu.

Shell:

```bash
opkg update && opkg install kmod-tun   # OpenWrt
sudo modprobe tun                       # Linux
docker run --device /dev/net/tun --cap-add NET_ADMIN …   # Docker
```

- **Verify:** „Created TUN interface: wantastic0“ in den Logs.

### Berechtigungsfehler bei Interfaces oder Routen.

```
operation not permitted
```

- **Where:** wantasticd-Logs
- **Likely cause:** wantasticd läuft nicht als root, oder der Container hat keine NET_ADMIN-Berechtigung.
- **Fix:** Verwende den installierten Dienst (er läuft als root) oder füge dem Container --cap-add NET_ADMIN hinzu.

Shell:

```bash
sudo systemctl restart wantasticd
```

- **Verify:** Der Dienst startet.

### Startversuche aufgebraucht.

```
failed to start agent after 10 attempts: …
```

- **Where:** wantasticd-Logs
- **Likely cause:** Ein anderer Fehler wiederholt sich. Der Text nach dem Doppelpunkt ist die eigentliche Ursache.
- **Fix:** Suche den Text nach dem Doppelpunkt in dieser Liste, behebe ihn und starte dann den Dienst neu.

- **Verify:** Der Dienst startet.

### Listen-Port belegt.

```
Port N in use, using random port
```

- **Where:** wantasticd-Logs
- **Likely cause:** Ein anderes Programm nutzt den Port. „Port %d in use, retrying with port %d...“ bedeutet dasselbe. Das ist nur informativ.
- **Fix:** Nichts zu tun.

- **Verify:** Der Handshake funktioniert.

### Keine Peers im Tunnel.

```
WARNING: No peers configured in WireGuard device!
```

- **Where:** wantasticd-Logs
- **Likely cause:** Die Konfiguration hat keinen [Peer]-Abschnitt.
- **Fix:** Verschiebe die Konfiguration und ordne das Gerät erneut zu.

Shell:

```bash
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
```

- **Verify:** wantasticd peers listet (server) auf.

### Health Check schlägt immer wieder fehl.

```
Device health check failed: …
```

- **Where:** wantasticd-Logs (alle 30 Sekunden)
- **Likely cause:** Kein Handshake mit dem Hub: Ausgehendes UDP 51820 ist blockiert, die Uhrzeit ist falsch oder die MTU ist zu groß.
- **Fix:** Erlaube ausgehendes UDP 51820 auf der vorgelagerten Firewall und stelle die Uhrzeit.

Shell:

```bash
sudo timedatectl set-ntp true
wantasticd peers
```

- **Verify:** wantasticd peers zeigt einen Handshake vor wenigen Sekunden.

### Lokaler Steuerport schlägt fehl.

```
IPC API Error: failed to find open port
```

- **Where:** wantasticd-Logs
- **Likely cause:** Port 127.0.0.1:9034 und die folgenden Ports sind belegt. „Warning: failed to start local IPC API“ und „IPC API Error binding to …, trying next port...“ hängen damit zusammen.
- **Fix:** Beende das Programm, das den Port nutzt, oder setze mit WTC_IPC_PORT einen anderen Port.

Shell:

```bash
sudo ss -ltnp | grep 9034
```

- **Verify:** wantasticd status funktioniert.

### CLI ist neuer als der Dienst.

```
the running daemon is older than this CLI and has no /api/…; restart it to load the installed version (sudo systemctl restart wantasticd)
```

- **Where:** wantasticd status / peers / ping
- **Likely cause:** Die Binärdatei wurde aktualisiert, aber der Dienst führt noch die alte aus.
- **Fix:** Dienst neu starten.

Shell:

```bash
sudo systemctl restart wantasticd
```

- **Verify:** wantasticd status zeigt die neue Version.

### CLI kann nicht mit dem Dienst kommunizieren.

```
daemon returned HTTP N: …
```

- **Where:** wantasticd-CLI
- **Likely cause:** Die lokale Steuer-API ist fehlgeschlagen. „decode daemon response“ ist ähnlich.
- **Fix:** Starte den Dienst neu und versuche es erneut.

Shell:

```bash
sudo systemctl restart wantasticd
```

- **Verify:** wantasticd status funktioniert.

### Peers bleiben auf Relay.

```
direct handshake timeout
```

- **Where:** wantasticd-Logs
- **Likely cause:** NAT blockiert einen direkten Pfad. „promotion queue full“, „gateway does not answer NAT-PMP“, „no UPnP internet gateway found“ und „router's external address is not public (CGNAT)“ sind ebenfalls harmlos.
- **Fix:** Nichts zu tun. Relay funktioniert. Für direkte Pfade aktiviere UPnP oder NAT-PMP auf dem Router.

- **Verify:** Verkehr fließt.

### Lokaler Zugriff findet kein LAN.

```
enable local access: no directly connected private IPv4 LAN subnet found
```

- **Where:** wantasticd (--allow-local-access)
- **Likely cause:** Das Gerät hat kein privates IPv4-LAN.
- **Fix:** Deaktiviere die Option auf diesem Gerät mit --allow-local-access=false.

- **Verify:** Kein Fehler nach einem Neustart.

### Lokaler Zugriff unter macOS oder Windows.

```
automatic local-access subnet routing is not supported on macOS yet
```

- **Where:** wantasticd (--allow-local-access)
- **Likely cause:** Diese Funktion gibt es nur unter Linux und OpenWrt (Windows zeigt „… on Windows yet“).
- **Fix:** Verwende ein Linux- oder OpenWrt-Gerät als LAN-Gateway.

- **Verify:** Lokaler Zugriff funktioniert über das Linux- oder OpenWrt-Gerät.

### Masquerade-Regel fehlgeschlagen.

```
iptables masquerade on <if>: …
```

- **Where:** wantasticd (--allow-local-access)
- **Likely cause:** iptables fehlt.
- **Fix:** Installiere iptables.

Shell:

```bash
sudo apt-get install -y iptables
opkg install iptables-nft   # OpenWrt
```

- **Verify:** Lokaler Zugriff funktioniert.

### Forwarding kann nicht aktiviert werden.

```
enable forwarding: …
```

- **Where:** wantasticd (--allow-local-access)
- **Likely cause:** Die Systemeinstellungen sind schreibgeschützt (zum Beispiel in einem Container).
- **Fix:** Aktiviere IP-Forwarding auf dem Host.

Shell:

```bash
sudo sysctl -w net.ipv4.ip_forward=1
```

- **Verify:** Lokaler Zugriff funktioniert.

### Zu viele Geräte mit lokalem Zugriff.

```
too many tenant local-access advertisers
```

- **Where:** wantasticd (--allow-local-access)
- **Likely cause:** Zu viele Geräte in deinem Konto geben ihr LAN frei.
- **Fix:** Deaktiviere --allow-local-access auf Geräten, die es nicht brauchen.

- **Verify:** Der Fehler ist verschwunden.

### DNS kann nicht geschrieben werden.

```
DNS: tunnel DNS not written (…)
```

- **Where:** wantasticd-Logs
- **Likely cause:** Ein anderes Programm verwaltet DNS. Zugehörige Meldungen: „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“.
- **Fix:** Lass das System DNS verwalten: Setze WANTASTIC_DNS_MODE=off für den Dienst.

Shell:

```bash
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
```

- **Verify:** Keine DNS-Warnung nach dem Neustart.

### Warnung bei der Update-Prüfung.

```
Update check failed; will retry in an hour: …
```

- **Where:** wantasticd-Logs
- **Likely cause:** Das Gerät erreicht get.wantastic.app nicht. Der Tunnel funktioniert weiterhin.
- **Fix:** Erlaube HTTPS zu get.wantastic.app.

Shell:

```bash
curl -I https://get.wantastic.app/latest
```

- **Verify:** Keine Warnung bei der nächsten stündlichen Prüfung.

### Zwei Tunnel, oder ein Interface wantastic1 erscheint.

- **Where:** ip link / wantasticd logs
- **Likely cause:** genkey oder login läuft neben dem Dienst noch im Vordergrund.
- **Fix:** Drücke im genkey-Fenster Ctrl+C und starte dann den Dienst neu.

Shell:

```bash
pgrep -a wantasticd
sudo systemctl restart wantasticd
```

- **Verify:** Nur ein wantasticd-Prozess und ein wantastic0-Interface.

## Continue with

- [Troubleshooting: start here](https://wantastic.app/de/docs/troubleshooting): Fix most problems in 3 steps. If that does not work, find your exact error in the table and open the matching guide.
- [wantasticd CLI reference and operations](https://wantastic.app/de/docs/wantasticd): The most used wantasticd commands first, then every command and flag, environment variables, config and state paths per OS, log lines, local access, exit node, and the claim flow (genkey / --wait-claim).
- [Login, token and claim errors](https://wantastic.app/de/docs/errors-login-claim): Fix claim problems (genkey, QR code, Claim Device), "Login failed: …" messages and token errors.
- [OpenWrt and embedded device errors](https://wantastic.app/de/docs/errors-openwrt-embedded): kmod-tun, read-only flash, procd, full flash, wrong clocks and BusyBox issues on routers and modules.
- [macOS and Windows errors](https://wantastic.app/de/docs/errors-macos-windows): launchd, Gatekeeper, tray, sc.exe and Windows service errors with the easiest fixes.
- [Run in Docker (community pattern)](https://wantastic.app/de/docs/install-docker): Run wantasticd in a Docker container built from the official release: build a small image, claim it once with genkey, then run it detached. Not an official image.
