Skip to content

Tabnine fails to authenticate on Arch Linux with iwd + systemd-resolved due to empty /etc/resolv.conf #204

@nicoandresr

Description

@nicoandresr

Note: Feel free to close this issue as needed - I'm primarily documenting this for future reference so others encountering the same problem can find a solution.

Environment:

OS: Arch Linux
Network setup: iwd + systemd-resolved
Editor: Neovim with tabnine-nvim plugin
Tabnine version: 4.321.0

Issue:

Tabnine cannot authenticate or connect to API endpoints when /etc/resolv.conf is empty or only contains comments. The plugin logs show repeated errors:

WARN [hickory_resolver::system_conf::unix] no nameservers found in config
ERROR Failed to send analytics event... dns error... NoConnections
ERROR Error while fetching messages... ConnectError("dns error", ResolveError { kind: NoConnections })

Despite DNS resolution working system-wide (verified with ping api.tabnine.com), Tabnine's Rust-based DNS resolver (hickory_resolver) reads /etc/resolv.conf directly and fails when it contains no nameserver entries.

Root Cause:

On systems using systemd-resolved, /etc/resolv.conf should be a symlink to /run/systemd/resolve/stub-resolv.conf. In my case, it was a regular file with only comments, causing Tabnine to have no DNS configuration.

# Create proper symlink to systemd-resolved stub
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

# Ensure systemd-resolved is running
sudo systemctl enable --now systemd-resolved
sudo systemctl restart systemd-resolved

# Verify resolv.conf now has nameserver entries
cat /etc/resolv.conf

Additionally, ensure iwd is configured to use systemd-resolved in /etc/iwd/main.conf:

[Network]
NameResolvingService=systemd

Suggestion:

Consider adding a more user-friendly error message when no nameservers are detected, or documenting this common Arch Linux setup issue in troubleshooting guides.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions