You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

AIY Voice Kit V1的Google Assistant开机自启失败求助

Fixing Google Assistant Auto-Start DNS Error on AIY Voice Kit V1

Hey there! Let's break down what's going wrong here and get your Google Assistant working on boot, step by step.

First, Let's Decode That Error

The google.auth.exceptions.TransportError with the message Temporary failure in name resolution is telling you one key thing: when your assist.service launched on boot, your Raspberry Pi couldn't translate the domain oauth2.googleapis.com into an IP address (that's what DNS does). This almost always happens because the service started before your Pi's network (including DNS) was fully ready—even though you added network-online.target, the Pi's network setup can sometimes lag behind systemd's startup timing.

Step 1: Update Your systemd Service File

Let's tweak your service file to ensure it waits properly for the network (and DNS) to be fully operational. Open the file with this command:

sudo nano /etc/systemd/system/assist.service

Replace the existing content with this updated version:

[Unit]
Description=Assist @ reboot
Wants=network-online.target nss-lookup.target
After=network-online.target nss-lookup.target
Wants=systemd-timesyncd.service
After=systemd-timesyncd.service

[Service]
Environment=DISPLAY=:0
Type=simple
Restart=always
User=pi
# Wait for Google's auth server to be reachable before starting
ExecStartPre=/bin/sh -c 'until ping -c 1 oauth2.googleapis.com; do sleep 1; done'
ExecStart=/usr/bin/python3 -u /home/pi/AIY-projects-python/src/examples/voice/main.py --language en-US

[Install]
WantedBy=multi-user.target

Here's what changed:

  • Added nss-lookup.target to dependencies: this systemd target waits specifically for DNS resolution to work, which fills a gap that network-online.target might miss.
  • Added ExecStartPre: this command pings Google's authentication server repeatedly until it succeeds, ensuring the network is fully ready before launching the Assistant.

Step 2: Reload and Test the Service

Save the file (press Ctrl+O, hit Enter, then Ctrl+X to exit nano), then run these commands to apply the changes:

# Reload systemd to recognize the updated service file
sudo systemctl daemon-reload
# Restart the service immediately to test fixes
sudo systemctl restart assist.service
# Check if the service is running without errors
sudo systemctl status assist.service

If the status shows "active (running)" and no DNS-related errors, reboot your Pi to confirm it works on startup:

sudo reboot

Extra Checks If It Still Fails

  • Verify basic network connectivity: After rebooting, run ping oauth2.googleapis.com in a terminal. If this fails, your Pi has a general network issue (not just a service timing problem)—check your Wi-Fi/Ethernet connection or router settings.
  • Check DNS settings: Run cat /etc/resolv.conf to see your DNS servers. You should see at least one valid entry (like nameserver 8.8.8.8 for Google's public DNS). If not, update your Wi-Fi settings to add a reliable DNS server.
  • Confirm file paths: Make sure main.py exists at the path you specified—run ls /home/pi/AIY-projects-python/src/examples/voice/ to double-check the file is there.

内容的提问来源于stack exchange,提问作者Dogeun Oh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 07:09:06