Forum Discussion
NN_210021
Nimbostratus
Aug 03, 2015Curl perform failed: Couldn't resolve host name (6)
Hi all,
can anyone give me a hint on what causes this error ? Can't find anything on DC /internet search
HTTP module: authenticateUser(): Curl perform failed: Couldn't resolve host name (6)...
Hannes_Rapp
Nimbostratus
Aug 03, 2015To sort out the DNS issues, try to follow the steps below:
Check to see if you have a DNS server configured
hannesr@(lb01)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list sys db dns.nameservers
sys db dns.nameservers {
value "10.199.22.2 10.199.22.6"
}
hannesr@(lb01)(cfg-sync Changes Pending)(Active)(/Common)(tmos) q
Check to see if you have DNS server connectivity
[hannesr@lb01:Active:Changes Pending] config dig blabla
; <<>> DiG 9.9.6-P2 <<>> blabla
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 58826
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;blabla. IN A
;; AUTHORITY SECTION:
. 10688 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2015080300 1800 900 604800 86400
;; Query time: 1 msec
;; SERVER: 10.199.22.253(10.199.22.2)
;; WHEN: Mon Aug 03 12:08:38 UTC 2015
;; MSG SIZE rcvd: 110
- Hannes_RappAug 03, 2015
Nimbostratus
1) If you don't have a DNS server configured - configure one. 2) If you don't receive any response to dig command - make sure you have UDP/53 connectivity to the DNS server. 3) If both commands succeed, assume that DNS on F5 is OK and you must update the DNS server's configuration to include a new A entry for your service name. When done, retry your cURL command. Good luck! - NN_210021Aug 03, 2015
Nimbostratus
So heres the outcome: sys db.nameservers { value "10.128.20.252 10.128.128.1.243" } for the dig command: ; <<>> DiG 9.9.5 <<>> blabla ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 62411 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4000 ;; QUESTION SECTION: ;blabla. IN A ;; Query time: 29 msec ;; SERVER: 10.128.1.24353(10.128.1.243) ;; WHEN: Mon Aug 03 14:25:38 UTC 2015 ;; MSG SIZE rcvd: 35 - Hannes_RappAug 03, 2015
Nimbostratus
DNS config on your F5 is in place. Furthermore, you don't have any connectivity problems to a DNS server. What is the outcome if you issue the command "host YourServiceName" ? Replace YourServiceName with the actual name you're using in the cURL command. - NN_210021Aug 03, 2015
Nimbostratus
That SERVFAIL seems strange or is it ok ? For example curl http://textbelt.com results in curl: (6) Couldnt resolve host 'textbelt.com' Same for google. - Hannes_RappAug 03, 2015
Nimbostratus
We can then conclude that your DNS server (10.128.1.243) is missing the configuration to resolve "textbelt.com" to an IP-address, or has another problem. I don't think it's an F5 (configuration) issue by any means. - NN_210021Aug 03, 2015
Nimbostratus
So at least the F5 is ok. I'll check the DNS server. Thanks for your help and guidance, well done ! - Amresh008Aug 10, 2018
Nimbostratus
There are two ways in which DNS can be added in F5 and both have different results. If you add it under system tab - that helps your F5 (bash) to resolve the hostname for cURL And if you add it under Network- DNS resolver list,this enables your TMM to resolve the URLs (used in http proxy config.)
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
