正如标题所说,每次我重新启动系统时,我都需要打开终端并输入以下命令才能使互联网正常运行:
sudo dhclient
我是这方面的新手,所以如果您需要信息,请告诉我。以下是我所知道的:
我已插入以太网。
直到我输入上述命令它才会亮。
如果我进入网络设置,它将无法识别连接,如下图所示:
那里什么也没有。
任何帮助都将不胜感激!
在启动时包含系统日志:
Mar 6 00:00:49 pihole rsyslogd: [origin software="rsyslogd" swVersion="8.2001.0" x-pid="777" x-info="https://www.rsyslog.com"] rsyslogd was HUPed
Mar 6 00:00:49 pihole systemd[1]: logrotate.service: Succeeded.
Mar 6 00:00:49 pihole systemd[1]: Finished Rotate log files.
Mar 6 00:01:05 pihole fstrim[22058]: /boot/efi: 505 MiB (529461248 bytes) trimmed on /dev/nvme0n1p1
Mar 6 00:01:05 pihole fstrim[22058]: /: 146.4 GiB (157200916480 bytes) trimmed on /dev/nvme0n1p2
Mar 6 00:01:05 pihole systemd[1]: fstrim.service: Succeeded.
Mar 6 00:01:05 pihole systemd[1]: Finished Discard unused blocks on filesystems from /etc/fstab.
Mar 6 00:01:07 pihole xrdp[957]: (957)(139926684609792)[INFO ] Socket 12: AF_INET6 connection received from ::ffff:135.181.109.244 port 63364
Mar 6 00:01:07 pihole xrdp[957]: (957)(139926684609792)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.68.56 port 3389)
Mar 6 00:01:07 pihole xrdp[22113]: (22113)(139926684609792)[DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
Mar 6 00:01:07 pihole xrdp[22113]: (22113)(139926684609792)[INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Mar 6 00:01:07 pihole xrdp[22113]: (22113)(139926684609792)[INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Mar 6 00:01:07 pihole xrdp[22113]: (22113)(139926684609792)[ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
Mar 6 00:01:07 pihole xrdp[22113]: (22113)(139926684609792)[DEBUG] TLSv1.3 enabled
Mar 6 00:01:07 pihole xrdp[22113]: (22113)(139926684609792)[DEBUG] TLSv1.2 enabled
Mar 6 00:01:07 pihole xrdp[22113]: (22113)(139926684609792)[DEBUG] Security layer: requested 3, selected 0
Mar 6 00:01:07 pihole xrdp[957]: (957)(139926684609792)[INFO ] Socket 12: AF_INET6 connection received from ::ffff:135.181.109.244 port 63496
Mar 6 00:01:07 pihole xrdp[957]: (957)(139926684609792)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.68.56 port 3389)
Mar 6 00:01:07 pihole xrdp[22114]: (22114)(139926684609792)[DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
Mar 6 00:01:07 pihole xrdp[22114]: (22114)(139926684609792)[INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Mar 6 00:01:07 pihole xrdp[22114]: (22114)(139926684609792)[INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Mar 6 00:01:07 pihole xrdp[22114]: (22114)(139926684609792)[ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
Mar 6 00:01:07 pihole xrdp[22114]: (22114)(139926684609792)[DEBUG] TLSv1.3 enabled
Mar 6 00:01:07 pihole xrdp[22114]: (22114)(139926684609792)[DEBUG] TLSv1.2 enabled
Mar 6 00:01:07 pihole xrdp[22114]: (22114)(139926684609792)[DEBUG] Security layer: requested 3, selected 0
Mar 6 00:01:08 pihole xrdp[22113]: (22113)(139926684609792)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.68.56 port 3389)
Mar 6 00:01:08 pihole xrdp[22114]: (22114)(139926684609792)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.68.56 port 3389)
Mar 6 00:01:13 pihole systemd[1801]: tracker-miner-fs.service: start operation timed out. Terminating.
Mar 6 00:01:13 pihole systemd[1801]: tracker-miner-fs.service: Failed with result 'timeout'.
Mar 6 00:01:13 pihole systemd[1801]: Failed to start Tracker file system data miner.
Mar 6 00:01:13 pihole systemd[1801]: tracker-miner-fs.service: Scheduled restart job, restart counter is at 519.
Mar 6 00:01:13 pihole systemd[1801]: Stopped Tracker file system data miner.
Mar 6 00:01:13 pihole systemd[1801]: Starting Tracker file system data miner...
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Set scheduler policy to SCHED_IDLE
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Setting priority nice level to 19
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Unable to get XDG user directory path for special directory &DOCUMENTS. Ignoring this location.
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Unable to get XDG user directory path for special directory &MUSIC. Ignoring this location.
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Unable to get XDG user directory path for special directory &PICTURES. Ignoring this location.
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Unable to get XDG user directory path for special directory &VIDEOS. Ignoring this location.
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Unable to get XDG user directory path for special directory &DOWNLOAD. Ignoring this location.
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Unable to get XDG user directory path for special directory &DOCUMENTS. Ignoring this location.
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Unable to get XDG user directory path for special directory &MUSIC. Ignoring this location.
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Unable to get XDG user directory path for special directory &PICTURES. Ignoring this location.
Mar 6 00:01:13 pihole tracker-miner-f[22115]: Unable to get XDG user directory path for special directory &VIDEOS. Ignoring this location.
Mar 6 00:01:17 pihole dbus-daemon[2785]: [session uid=1000 pid=2785] Activating via systemd: service name='org.freedesktop.Tracker1' unit='tracker-store.service' requested by ':1.2' (uid=1000 pid=2779 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Mar 6 00:01:17 pihole systemd[2771]: Starting Tracker metadata database store and lookup manager...
Mar 6 00:01:17 pihole dbus-daemon[2785]: [session uid=1000 pid=2785] Successfully activated service 'org.freedesktop.Tracker1'
Mar 6 00:01:17 pihole systemd[2771]: Started Tracker metadata database store and lookup manager.
Mar 6 00:01:20 pihole dbus-daemon[2785]: [session uid=1000 pid=2785] Activating via systemd: service name='org.freedesktop.Tracker1.Miner.Extract' unit='tracker-extract.service' requested by ':1.2' (uid=1000 pid=2779 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Mar 6 00:01:20 pihole systemd[2771]: Starting Tracker metadata extractor...
Mar 6 00:01:20 pihole tracker-extract[22140]: Set scheduler policy to SCHED_IDLE
Mar 6 00:01:20 pihole tracker-extract[22140]: Setting priority nice level to 19
Mar 6 00:01:20 pihole dbus-daemon[2785]: [session uid=1000 pid=2785] Successfully activated service 'org.freedesktop.Tracker1.Miner.Extract'
Mar 6 00:01:20 pihole systemd[2771]: Started Tracker metadata extractor.
Mar 6 00:01:29 pihole systemd[2771]: tracker-extract.service: Succeeded.
Mar 6 00:01:43 pihole tracker-miner-f[22115]: Couldn't create new Files miner: 'Failed to load SPARQL backend: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.Tracker1': timed out (service_start_timeout=120000ms)'
Mar 6 00:01:43 pihole systemd[1801]: tracker-miner-fs.service: Main process exited, code=exited, status=1/FAILURE
Mar 6 00:01:43 pihole systemd[1801]: tracker-miner-fs.service: Failed with result 'exit-code'.
Mar 6 00:01:43 pihole systemd[1801]: Failed to start Tracker file system data miner.
Mar 6 00:01:43 pihole systemd[1801]: tracker-miner-fs.service: Scheduled restart job, restart counter is at 520.
Mar 6 00:01:43 pihole systemd[1801]: Stopped Tracker file system data miner.
Mar 6 00:01:43 pihole systemd[1801]: Starting Tracker file system data miner...
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Set scheduler policy to SCHED_IDLE
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Setting priority nice level to 19
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Unable to get XDG user directory path for special directory &DOCUMENTS. Ignoring this location.
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Unable to get XDG user directory path for special directory &MUSIC. Ignoring this location.
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Unable to get XDG user directory path for special directory &PICTURES. Ignoring this location.
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Unable to get XDG user directory path for special directory &VIDEOS. Ignoring this location.
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Unable to get XDG user directory path for special directory &DOWNLOAD. Ignoring this location.
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Unable to get XDG user directory path for special directory &DOCUMENTS. Ignoring this location.
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Unable to get XDG user directory path for special directory &MUSIC. Ignoring this location.
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Unable to get XDG user directory path for special directory &PICTURES. Ignoring this location.
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Unable to get XDG user directory path for special directory &VIDEOS. Ignoring this location.
Mar 6 00:01:43 pihole dbus-daemon[1857]: [session uid=998 pid=1857] Activating via systemd: service name='org.freedesktop.Tracker1' unit='tracker-store.service' requested by ':1.1052' (uid=998 pid=22178 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Mar 6 00:01:43 pihole systemd[1801]: Starting Tracker metadata database store and lookup manager...
Mar 6 00:01:43 pihole dbus-daemon[1857]: [session uid=998 pid=1857] Successfully activated service 'org.freedesktop.Tracker1'
Mar 6 00:01:43 pihole systemd[1801]: Started Tracker metadata database store and lookup manager.
Mar 6 00:01:43 pihole tracker-store[22183]: Cannot initialize database: Could not open sqlite3 database:'/home/pihole/.cache/tracker/meta.db': unable to open database file
Mar 6 00:01:43 pihole systemd[1801]: tracker-store.service: Main process exited, code=exited, status=1/FAILURE
Mar 6 00:01:43 pihole systemd[1801]: tracker-store.service: Failed with result 'exit-code'.
Mar 6 00:01:43 pihole tracker-miner-f[22178]: Couldn't create new Files miner: 'Failed to load SPARQL backend: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying'
答案1
我找到了一个解决方案。虽然很奇怪,但确实有效。
https://gist.github.com/mohamadaliakbari/1cb9400984094541581fff07143e1c9d
dhclient 是动态主机配置协议 (DHCP) 客户端,用于允许客户端连接到 DHCP 服务器。
$ sudo nano /etc/rc.local
#!/bin/bash
dhclient
exit 0
$ sudo chmod 755 /etc/rc.local
$ sudo systemctl 启用 rc-local
$ sudo systemctl 重启 rc-local
$ sudo systemctl status rc-local