Solved portsnap fetch error

I have this :
ping google
Code:
ping: cannot resolve google.com: Host name lookup failure

ping freebsd.org
Code:
ping: cannot resolve freebsd.org: Host name lookup failure

drill @8.8.8.8 pkg.freebsd.org
Code:
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 55416
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; pkg.freebsd.org.   IN   A

;; ANSWER SECTION:
pkg.freebsd.org.   299   IN   A   213.138.116.73

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 35 msec
;; SERVER: 8.8.8.8
;; WHEN: Tue Nov  1 16:59:07 2016
;; MSG SIZE  rcvd: 49
 
in my /etc/resolv.conf
i have that
Code:
# Generated by resolvconf
  # nameserver 89.2.0.1
  # nameserver 89.2.0.2
   nameserver  8.8.8.8
   nameserver  8.8.4.4
   options edns0
Please note that /etc/resolv.conf is sensitive to spaces. The lines should begin with nameserver and not ___nameserver (using underscores as spaces here to illustrate where the problem might be), otherwise they're just ignored.
 
Waaaaaaaaaw thank you tobik everything work now ^^ !! I just put nameserver at line beginning and now it works
Really thank you everbody for your help ^^
 
Please note that /etc/resolv.conf is sensitive to spaces. The lines should begin with nameserver and not ___nameserver (using underscores as spaces here to illustrate where the problem might be), otherwise they're just ignored.
Good call! I just knew it had to be a DNS issue ("No address record" usually points there...), but couldn't figure out what was happening.

Glad it's working for you now, Korede!
 
Interesting. It looks like /etc/resolv.conf should have a proper parsing feature. Might be worth submitting a PR?
Define proper parsing :) I think it does what it's supposed to. If you don't follow the grammar of your config files they won't get parsed properly. I think it's unfortunate that you won't get any error messages but the grammar for resolv.conf(5) is pretty simple and IMHO clearly documented.

On the other hand OpenBSD 6.0 would've had no trouble parsing Korede's resolv.conf since it tokenizes lines first (though this is not documented).
 
Define proper parsing :) I think it does what it's supposed to. If you don't follow the grammar of your config files they won't get parsed properly. I think it's unfortunate that you won't get any error messages but the grammar for resolv.conf(5) is pretty simple and IMHO clearly documented.

On the other hand OpenBSD 6.0 would've had no trouble parsing Korede's resolv.conf since it tokenizes lines first (though this is not documented).

That's precisely what I am suggesting. Many other config files are parsed or tokenized. It won't be difficult to implement even /etc/resolv.conf is very simple to use. Some people just likes to overdo their config files with extra spaces or tabs. :)
 
in my /etc/resolv.conf
i have that
Code:
# Generated by resolvconf
  # nameserver 89.2.0.1
  # nameserver 89.2.0.2
   nameserver  8.8.8.8
   nameserver  8.8.4.4
   options edns0
Define proper parsing :) I think it does what it's supposed to. If you don't follow the grammar of your config files they won't get parsed properly. I think it's unfortunate that you won't get any error messages but the grammar for resolv.conf(5) is pretty simple and IMHO clearly documented.

On the other hand OpenBSD 6.0 would've had no trouble parsing Korede's resolv.conf since it tokenizes lines first (though this is not documented).
"Generated by resolvconf" (Debian framework) in Korede's resolv.conf indicates that file has been copy/pasted from his Debian system. It seems that linux system has also no problem parsing the config file with spaces before the configuration options.
 
"Generated by resolvconf" (Debian framework) in Korede's resolv.conf indicates that file has been copy/pasted from his Debian system.
resolvconf(8) exists on FreeBSD too, but it's pretty clear that the initial version of resolv.conf was copied from a Linux system and edited later on FreeBSD.
It seems that linux system has also no problem parsing the config file with spaces before the configuration options.
No, Linux systems, tested with both Ubuntu 16.04 (glibc based) and Alpine Linux 3.4 (musl based), have trouble parsing /etc/resolv.conf with spaces too.
 
resolvconf(8) exists on FreeBSD too, ......
I thought resolvconf (8) was specific for the linux platform. Thanks for pointing it out.

No, Linux systems, tested with both Ubuntu 16.04 (glibc based) and Alpine Linux 3.4 (musl based), have trouble parsing /etc/resolv.conf with spaces too.
I see. My mistake. I was misled by the impression (Debian) resolvconf has generated resolv.conf as shown with the spaces before the configuration settings and a linux system is able to pars the file in this manner. Thanks for the clarification.
 
Back
Top