hostapd.service的作业失败,因为控制进程退出并显示错误代码

时间:2019-07-11 06:52:58

标签: raspberry-pi

我正在为Raspberry Pi设置WiFi路由器,但这出现了:

hostapd.service的作业失败,因为控制进程退出并显示错误代码。 参见

  

“ systemctl status hostapd.service”和“ journalctl -xe”以获取详细信息。

我尝试排除systemctl状态hostapd.service:

● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
   Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2019-07-11 15:50:37 JST; 1s ago
  Process: 1673 ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=ex

 7月 11 15:50:37 raspberrypi systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA
 7月 11 15:50:37 raspberrypi systemd[1]: hostapd.service: Unit entered failed state.
 7月 11 15:50:37 raspberrypi systemd[1]: hostapd.service: Failed with result 'exit-code'.

我是Raspberry Pi的新手。将不胜感激。预先谢谢你!

3 个答案:

答案 0 :(得分:0)

我只是遇到了这个错误-将PSK延长到> = 8个字符就解决了这个问题。

答案 1 :(得分:0)

今天是我第二次成功设置Raspberry Pi 0 W接入点。这次我遇到这个错误:

ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=1/FAILURE)

追踪步骤之后,我发现我在/ etc / default / hostapd文件中犯了一个错误。

我只是忘了在DAEMON_CONF字符串的末尾输入引号“。

此外,hostapd.conf文件中rpi0w的驱动程序应该是nl80211,而不是brcmfmac。

您可能像我一样犯了一个简单的错误。检查所有修改。

我已按照本网站的说明进行设置

https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md

MyAP

答案 2 :(得分:0)

获得更具体错误的一个技巧是运行 ExecStart 指向的代码行:

/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF}

用您在 $DAEMON_OPTS 中配置的任何值填写 ${DAEMON_CONF}/etc/default/hostapd.conf。现在您将看到更好的错误,例如配置错误或驱动程序错误。

相关问题