[SOLVED] DNS configuration issue

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

[SOLVED] DNS configuration issue

Postby PeterArch » Fri Dec 09, 2016 7:07 pm

Hello all,

I have ArchLinux ARMv7 running on a Banana Pi connected to my router with an Ethernet cable.

I have trouble connecting to the network. I can ping 8.8.8.8 but not http://www.google.com

As suggested in the wiki, I need to check my DNS configuration:
https://wiki.archlinux.org/index.php/Network_configuration#Check_the_connection

I noticed that my /etc/resolv.conf file exits but is empty (maybe it’s a broken symbolic link?) so the DNS servers are not listed. I can’t edit it (even as root) either and it’s not recommended to edit it manually anyway.

I also tried to set up a static IP address by creating a profile with netctl. However, I can’t start the profile. I get this error:
$this->bbcode_second_pass_quote('', '
')Failed to start netctl@eth0.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status netctl@eth0.service' for details.


Here’s the output of $ systemctl status netctl@eth0.service :

$this->bbcode_second_pass_quote('', '
') netctl@eth0.service - A basic static ethernet connection
Loaded: loaded (/etc/systemd/system/netctl@eth0.service; enabled; vendor preset: disabled)
Active: active (exited) since Wed 2016-11-30 14:56:37 CET; 29min ago
Docs: man:netctl.profile(5)
Process: 130 ExecStart=/usr/lib/network/network start %I (code=exited, status=0/SUCCESS)
Main PID: 130 (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.


I found a similar topic on this but it didn’t help in my case because I can’t edit /etc/resolv.conf:
https://archlinuxarm.org/forum/viewtopic.php?f=9&t=1122

Any thoughts? :)
Last edited by PeterArch on Mon Dec 12, 2016 6:15 pm, edited 1 time in total.
PeterArch
 
Posts: 2
Joined: Mon Dec 05, 2016 4:55 pm

Re: DNS configuration issue

Postby WarheadsSE » Mon Dec 12, 2016 3:04 pm

If your resolv.conf is a symlink, see if it points to the /run location for systemd-resolved, which is fairly dependent on systemd-networkd. If that is the case, and you wish to continue with netctl, remove the symlink and create an empty file, then re-connect to the network.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: DNS configuration issue

Postby PeterArch » Mon Dec 12, 2016 6:14 pm

Problem solved! You were right, /etc/resolv.conf is a symlink pointing to /run/systemd/resolve/resolv.conf. However this file doesn’t exist so the symlink is broken.

I removed the symlink:
$this->bbcode_second_pass_code('', '# rm /etc/resolv.conf')
and created an empty file:
$this->bbcode_second_pass_code('', '# vim /etc/resolv.conf')
I noticed that /etc/resolvconf.conf didn’t mention any name servers so I added this line:
$this->bbcode_second_pass_quote('', 'n')ame_servers=8.8.8.8

And I generated /etc/resolv.conf using:
$this->bbcode_second_pass_code('', '# resolvconf -u')
then I rebooted.

My /etc/resolvconf now contains:
$this->bbcode_second_pass_quote('', '
')# Generated by resolvconf
nameserver 8.8.8.8

I can now ping http://www.google.com ok!
Thanks for your help!

Note: netctl still doesn’t load the profile with a static IP address but I’ll investigate this myself for now.
PeterArch
 
Posts: 2
Joined: Mon Dec 05, 2016 4:55 pm
Top


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 16 guests