Score:1

Ubuntu 22.10 Desktop requires sudo dhclient every reboot to connect to internet

in flag

Like the title says, every time I reboot my system, I need to open the terminal and type the following command to get the internet working:

sudo dhclient

I'm new to this so if there is information you need let me know. Here's what I know:

  • I have the ethernet plugged in.

  • It doesn't light up until I input the command above.

  • If I go into the network settings, it doesn't recognize the connection like in the image you see below:

    functioning network connections tab

There is nothing there.

Any help would be appreiciated!

Included the syslog on bootup:

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'
in flag
Welcome to AskUbuntu! Is there anything in `/var/log/syslog` around the time of the system boot that might explain why `dhclient` is not starting up? The only thing that comes to mind is a permissions issue, but this generally isn't something that people need to think about unless they've done a bit of custom network configuration
Jimothy Bringus avatar
in flag
Thank you @matigo for the warm welcome. Here is the syslog file (I'm not sure how to include it here without reaching the character limit) https://pastebin.com/k0ibzDrf
Score:0
in flag

I found a solution. It's strange but it works.

https://gist.github.com/mohamadaliakbari/1cb9400984094541581fff07143e1c9d

dhclient is the Dynamic Host Configuration Protocol (DHCP) Client one would use to allow a client to connect to a DHCP server.

$ sudo nano /etc/rc.local

#!/bin/bash
dhclient
exit 0

$ sudo chmod 755 /etc/rc.local

$ sudo systemctl enable rc-local

$ sudo systemctl restart rc-local

$ sudo systemctl status rc-local

AgentRev avatar
nr flag
This one-liner works too: `sudo -- sh -c "(crontab -l ; echo '@reboot dhclient') | crontab -"`
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.