由于错误“AgentInitCheck:代理通信失败”,无法启动 isc-dhcp-server

由于错误“AgentInitCheck:代理通信失败”,无法启动 isc-dhcp-server

我有一台 Raspberry Pi 4 - Model B,我正在尝试使用 Pi 创建从 Wi-Fi 到以太网的适配器。我目前正在使用这个要点作为如何创建它的指南,但是当我启动 DHCP 服务器时我一直遇到错误。

当我运行时service isc-dhcp-server start,我收到此消息:

Job for isc-dhcp-server.service failed because the control process exited with error code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.

日志systemctl status isc-dhcp-server.service显示如下内容:

● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
   Active: failed (Result: exit-code) since Thu 2021-12-30 11:24:41 EST; 8s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2444 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

Dec 30 11:24:39 raspberrypi dhcpd[2454]: bugs on either our web page at www.isc.org or in the README file
Dec 30 11:24:39 raspberrypi dhcpd[2454]: before submitting a bug.  These pages explain the proper
Dec 30 11:24:39 raspberrypi dhcpd[2454]: process and the information we find helpful for debugging.
Dec 30 11:24:39 raspberrypi dhcpd[2454]:
Dec 30 11:24:39 raspberrypi dhcpd[2454]: exiting.
Dec 30 11:24:41 raspberrypi isc-dhcp-server[2444]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
Dec 30 11:24:41 raspberrypi isc-dhcp-server[2444]:  failed!
Dec 30 11:24:41 raspberrypi systemd[1]: isc-dhcp-server.service: Control process exited, code=exited, status=1/FAILURE
Dec 30 11:24:41 raspberrypi systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Dec 30 11:24:41 raspberrypi systemd[1]: Failed to start LSB: DHCP server.

为了寻找更详细的日志,我运行了journalctl -xe,它显示以下内容:

-- The unit isc-dhcp-server.service has entered the 'failed' state with result 'exit-code'.
Dec 30 11:24:41 raspberrypi systemd[1]: Failed to start LSB: DHCP server.
-- Subject: A start job for unit isc-dhcp-server.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit isc-dhcp-server.service has finished with a failure.
--
-- The job identifier is 2101 and the job result is failed.
Dec 30 11:24:41 raspberrypi sudo[2418]: pam_unix(sudo:session): session closed for user root
Dec 30 11:24:45 raspberrypi vncserver-x11[492]: AgentInitCheck: agent comms failure
Dec 30 11:24:50 raspberrypi vncserver-x11[492]: AgentInitCheck: no response from agent
Dec 30 11:24:55 raspberrypi vncserver-x11[492]: AgentInitCheck: agent comms failure
Dec 30 11:25:00 raspberrypi vncserver-x11[492]: AgentInitCheck: no response from agent
Dec 30 11:25:05 raspberrypi vncserver-x11[492]: AgentInitCheck: agent comms failure

令人沮丧的是,我并不完全清楚这agent comms failure意味着什么,以及我需要做什么来修复它。我的做法有什么问题?作为参考,我将展示我的 DHCP 配置文件。

/etc/dhcpd.conf

interface eth0
static ip_address=192.168.34.1/24

/etc/dhcp/dhcpd.conf

authoritative;
subnet 192.168.34.0 netmask 255.255.255.0 {
 range 192.168.34.10 192.168.34.250;
 option broadcast-address 192.168.34.255;
 option routers 192.168.34.1;
 default-lease-time 600;
 max-lease-time 7200;
 option domain-name "local-network";
 option domain-name-servers 8.8.8.8, 8.8.4.4;
}

/etc/default/isc-dhcp-server

# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)

# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf

# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
DHCPDv4_PID=/var/run/dhcpd.pid
#DHCPDv6_PID=/var/run/dhcpd6.pid

# Additional options to start dhcpd with.
#       Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="eth0"
INTERFACESv6=""

相关内容