Curl error 6 couldn t resolve host

The curl: (6) could not resolve host error in Linux primarily relates to wrongful/missing DNS nameserver setup or a random syntax error that can be fixed.

As Linux users continue to skillfully nurture and grow their user experience, they soon realize that they become more performant and productive while in the Linux command-line environment.

The Linux OS environment exposes its users to terminal-based tools like Curl for a non-interactive download and upload of targeted network/internet-based files, which is similar to the Wget utility and both share some similarities in their implementation and functionalities.

The primary role of the Curl utility as highlighted on its manual page is to transfer a targeted URL.

$ man curl 

It supports numerous protocols with the common ones being FTP, FTPS, HTTP, HTTPS, SCP, SFTP, SMTP, and SMTP.

The Curl command syntax is as follows:

$ curl [options / URLs]

We can show its implementation by using it with a random URL.

$ curl https://google.com -o linuxshelltips.txt

In the above command, Curl’s findings from accessing the highlighted URL are saved in the succeeding text file.

Curl File Download

Curl File Download

curl: (6) could not resolve host Error

Mostly, such an error occurs when there is an issue with a Linux server’s DNS resolver. A Linux administrator will categorize/define this challenge as a server management service issue.

This error is likely to take several forms when the curl command is executed from the Linux terminal and the most popular ones include:

  • curl: (6) could not resolve host: domain_name.extension; Name or service not known
  • curl: (6) could not resolve host: domain_name.extension e.g. linuxshelltips.com
  • curl: (6) could not resolve host: application

Now that we have highlighted the primary reason that might be behind the stated curl command error during its execution on a Linux terminal, it’s time to fix the problem.

Solution 1: Missing Working DNS Nameserver

A nameserver is basically a bridge between a working/purchased domain name and the IP address of a server. When you purchase or subscribe to a domain name, and before you use/link this domain name to your remote Linux server, you need to configure a DNS nameserver. A DNS nameserver enables a user to use a domain name to access a remote server instead of using its IP address.

On your Linux server/machine, the file /etc/resolv.conf is responsible for the DNS nameserver entries auto-generated by NetworkManager.

$ sudo nano /etc/resolv.conf

This file can hold more than one DNS nameserver entry. As you might have noted, the syntax for adding a DNS nameserver entry in this file should resemble the following:

nameserver   IP.ADDRESS

For instance, if you were to add Google public nameservers to this file, it would look like the following:

nameserver   192.168.100.1
nameserver   8.8.8.8
nameserver   8.8.4.4

Add DNS Name Servers in Linux

Add DNS Name Servers in Linux

If you are using a private DNS nameserver, add it to the /etc/resolv.conf file. Update or reboot the system if possible and the host should start resolving.

Solution 2: Curl Syntax Errors

Make sure the curl command execution adheres to its correct syntax usage. A syntax error can arise from something as simple as the misuse of an escape sequence (/) or an illegal spacing on the URL.

The curl: (6) could not resolve host error in Linux primarily relates to wrongful/missing DNS nameserver setup or a random syntax error that can be scanned and fixed.

when I try to load a web page to terminal it gives curl: (6) Could not resolve host error.

I have internet in my PC and trying from my home internet connection. So as I there is no any proxy involve here.

[root@localhost kevin]# curl http://google.com
curl: (6) Could not resolve host: google.com; Name or service not known

clean all and tried again but no lucky.

But if I use IP instead of the domain name, it works fine.

[root@localhost kevin]# curl http://173.194.46.0

any clue please?

Sathish's user avatar

Sathish

3,7001 gold badge16 silver badges28 bronze badges

asked Jul 26, 2014 at 5:26

Nayana Adassuriya's user avatar

Nayana AdassuriyaNayana Adassuriya

23k28 gold badges103 silver badges145 bronze badges

5

Issues were:

  1. IPV6 enabled
  2. Wrong DNS server

Here is how I fixed it:

IPV6 Disabling

  • Open Terminal
  • Type su and enter to log in as the super user
  • Enter the root password
  • Type cd /etc/modprobe.d/ to change directory to /etc/modprobe.d/
  • Type vi disableipv6.conf to create a new file there
  • Press Esc + i to insert data to file
  • Type install ipv6 /bin/true on the file to avoid loading IPV6 related modules
  • Type Esc + : and then wq for save and exit
  • Type reboot to restart fedora
  • After reboot open terminal and type lsmod | grep ipv6
  • If no result, it means you properly disabled IPV6

Add Google DNS server

  • Open Terminal
  • Type su and enter to log in as the super user
  • Enter the root password
  • Type cat /etc/resolv.conf to check what DNS server your Fedora using. Mostly this will be your Modem IP address.
  • Now we have to Find a powerful DNS server. Luckily there is a open DNS server maintain by Google.
  • Go to this page and find out what are the «Google Public DNS IP addresses»
  • Today those are 8.8.8.8 and 8.8.4.4. But in future those may change.
  • Type vi /etc/resolv.conf to edit the resolv.conf file
  • Press Esc + i for insert data to file
  • Comment all the things in the file by inserting # at the begin of the each line. Do not delete anything because can be useful in future.
  • Type below two lines in the file

    nameserver 8.8.8.8
    nameserver 8.8.4.4

    -Type Esc + : and then wq for save and exit

  • Now you are done and everything works fine (Not necessary to restart).
  • But every time when you restart the computer your /etc/resolv.conf will be replaced by default. So I’ll let you find a way to avoid that.

Here is my blog post about this:
http://codeketchup.blogspot.sg/2014/07/how-to-fix-curl-6-could-not-resolve.html

Jahan Zinedine's user avatar

answered Jul 28, 2014 at 1:29

Nayana Adassuriya's user avatar

Nayana AdassuriyaNayana Adassuriya

23k28 gold badges103 silver badges145 bronze badges

4

Perhaps you have some very weird and restrictive SELinux rules in place?

If not, try strace -o /tmp/wtf -fF curl -v google.com and try to spot from /tmp/wtf output file what’s going on.

answered Jul 26, 2014 at 11:12

Sathish's user avatar

5

I have today similar problem. But weirder.

  • host — works host pl.archive.ubuntu.com
  • dig — works on default and on all other DNS’s dig pl.archive.ubuntu.com, dig @127.0.1.1 pl.archive.ubuntu.com
  • curl — doesn’t work! but for some addresses it does. WEIRD! Same in Ruby, APT and many more.
$ curl -v http://google.com/
*   Trying 172.217.18.78...
* Connected to google.com (172.217.18.78) port 80 (#0)
> GET / HTTP/1.1
> Host: google.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 302 Found
< Cache-Control: private
< Content-Type: text/html; charset=UTF-8
< Referrer-Policy: no-referrer
< Location: http://www.google.pl/?gfe_rd=cr&ei=pt9UWfqXL4uBX_W5n8gB
< Content-Length: 256
< Date: Thu, 29 Jun 2017 11:08:22 GMT
<
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.pl/?gfe_rd=cr&ei=pt9UWfqXL4uBX_W5n8gB">here</A>.
</BODY></HTML>
* Connection #0 to host google.com left intact

$ curl -v http://pl.archive.ubuntu.com/
* Could not resolve host: pl.archive.ubuntu.com
* Closing connection 0
curl: (6) Could not resolve host: pl.archive.ubuntu.com

Revelation

Eventually I used strace on curl and found that it was connection to nscd deamon.

connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = 0

Solution

I’ve restarted the nscd service (Name Service Cache Daemon) and it helped to solve this issue!

systemctl restart nscd.service

answered Jun 29, 2017 at 11:29

Chris Suszyński's user avatar

3

There is no need to disable IPv6 as the answer suggests. The reason curl fails is simply because the DNS resolution is missing.

There is one liner solution to this.

If you care about what is inside /etc/resolv.conf then append it:

echo 'nameserver 1.1.1.1' | sudo tee -a /etc/resolv.conf >/dev/null

I usually don’t care and just replace the content of the file:

echo 'nameserver 1.1.1.1' | sudo tee /etc/resolv.conf >/dev/null

answered Oct 11, 2021 at 17:33

Houman's user avatar

HoumanHouman

63.2k86 gold badges266 silver badges455 bronze badges

0

Try nslookup google.com to determine if there’s a DNS issue.
192.168.1.254 is your local network address and it looks like your system is using it as a DNS server. Is this your gateway/modem router as well?
What happens when you try ping google.com. Can you browse to it on a Internet web browser?

answered Jul 26, 2014 at 13:25

Benjamin B's user avatar

2

In Our case, the command was passed through mail/skype and the person who needs to execute copied an extra space.

we found that extra space after an hour and removing that made it work.

answered Aug 6, 2022 at 3:20

nikhil2000's user avatar

nikhil2000nikhil2000

1493 silver badges13 bronze badges

I had an issue with IPV6 that suddenly showed up in wordpress admin where curl failed to connect to wordpress.org etc giving

An unexpected error occurred. Something may be wrong with WordPress.org

and also

Installation failed: Download failed. cURL error 28: Resolving timed out after 10005 milliseconds

I eventually sorted by adding the following as a php file in mu-plugins:

add_action( 'http_api_curl', function( $curl_handle ) { curl_setopt( $curl_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );});

and also when using curl directly in php by using the following option in the options array:

curl_setopt_array($curl, array(CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4));

The OS is IBM i (OS400/i5OS) v7.2 running on Power 6 and the php version is 8.1.10. Interestingly IPV6 is not active on the box.

answered Sep 17, 2022 at 11:37

jez001's user avatar

Are you curious to know why does the error ‘curl (6) could not resolve host ubuntu’ appear?

Usually, such curl errors happen when there are problems with DNS resolvers on the server.

At Bobcares, we often get requests from our customers to fix curl (6) could not resolve host Ubuntu as part of our Server Management Services.

Today, let’s discuss why this error occurs and see how our Support Engineers fix it.

What is curl (6) could not resolve host?

Many of our customers have experienced this error ‘curl (6) could not resolve host’ while trying to connect to a webpage from the terminal.

This error mainly occurs due to a wrong DNS set up or bad settings on the server.

Also, we’ve seen this error appearing in different ways which include.

  1. curl: (6) Could not resolve host: application
  2. curl: (6) Could not resolve host: domain.com
  3. curl: (6) Could not resolve host: google.com; Name or service not known

This essentially means the server was not able to connect to the remote host.

How we fixed the error curl (6) could not resolve host in ubuntu

At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems while managing a server.

Now, let’s see the major reasons for curl errors and how our Support Engineers fix this error.

1. Missing working DNS nameserver

Sometimes, users may receive a problem when trying to install packages like wget, apt-get not being able to resolve hosts.

For example, when executing a command apt-get install wget.

Users may get an error as curl#6 - "Could not resolve host: repo.xxx.com; Unknown error"

This mainly occurs when we don’t have nameservers in the /etc/resolv.conf

So, we added the following line in the file.

nameserver 8.8.8.8

Then, this fixed the error and the host started resolving.

2. Syntax error

Recently, one of our customers had a problem while executing the command curl on his terminal. He used the command as below,

curl -X 'GET https://www.mywebsite.com/Web2/PDF.aspx?page=1' 

Also, the error said Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36 OPR/51.0.2830.26'
curl: (6) Could not resolve host:

On checking, our Support Engineers found that the error was due to the incorrect syntax used to access the website.

So, we corrected the syntax as below. This happened as he had included space after one of the / escape sequences.

curl -X GET https://www.mywebsite.com/Web2/PDF.aspx?page=1/

Similarly, an error happened when running the following command

curl -i -H 'Content-Type: application/json' -d '{"Code":"FR","Name":"France"}' http://127.0.0.1:8080/countries

The error said Curl: (6) Could not resolve host: application.

This error was also due to the syntax error in the command. Thus, we resolved this problem editing like this in windows:

"{/"Code/":/"FR/"}"

In another case, we corrected it by deleting an extra space from the command.

curl -H Content-Type:application/json ~

Finally, this fixed the error.

[Need more help to solve curl error?- We’ll fix it for you.]

Conclusion

In short, an error curl (6) could not resolve host on ubuntu happens due to syntax error or due to the wrong DNS set up. Today, we saw how our Support Engineers assisted our customers to solve this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Getting this error message when trying to work with passport in my project on my local server.

CurlFactory.php line 186:
cURL error 6: Could not resolve host: api.project.local (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)


{
    "token_type": "Bearer",
    "expires_in": 518399,
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ijk0MWU3Y2Q2Y2I1ZTEyYmYyYzAzYTIzY2I1YWM5YjY3YjI0MmU2NTUwOWRhODVlZTMxNzc3MjIwODA3ZTA2ZGY1YWIwYjMzNDg2MDA2MTZlIn0.eyJhdWQiOiIxIiwianRpIjoiOTQxZTdjZDZjYjVlMTJiZjJjMDNhMjNjYjVhYzliNjdiMjQyZTY1NTA5ZGE4NWVlMzE3NzcyMjA-rkLpvJhuju4Qlo0QNjsXUUHXq6GyqqiQTNa2d0IUsWdAOSLsy1bMu4Z2ga_Jj1L1ThwbDOfy7kE4_5SDfKKIyKXO_-iw",
    "refresh_token": "L8p2NAqRZfi1fP1XyO3NW36dCqa6HZJWgNKkuR8IMz2LJe5711nRHPMP734caln1+8m+GC6K79yTjRjru01iR7LKP1CCseixQ8mkzXWZb+roQv32qdkXVSeCzObecOI2ZWq+l1KNs12NA3KIZJ4bS0N2rOYxlw3KTNx55uydH13vmanbeXIpym0ha8op0M9s9HvwPc+dJUhjL20JzDGCcyuhciGIe6CTKyBuqi4dNA8tIeALLPSSqtvd0QsRWCWTVBL72RVeEeIq/4kFppE="
}

install laravel 5.3
install passport package
extract laravel auth scaffold to app directory.
put this line of code inside of authentication controller when user is logged in :
path = Project/app/Foundation/Auth/AuthenticatesUsers.php

 $http = new Client;

            $response = $http->post('Project.local/oauth/token', [
                'form_params' => [
                    'grant_type' => 'password',
                    'client_id' => 1,
                    'client_secret' => 'xKqNbzcXyjySg20nVuVLw5nk5PAMhFQOQwRTeTjd',
                    'username' => $userobject['email'],
                    'password' => $userobject['password'],
                    'scope' => '',
                ],
            ]);


On some servers it works, on some it doesn’t and I don’t know what is the cause. the server I’m facing problem right now is ubuntu14.04 server with php5.6 and apache2 and mysql5.5

Curl: (6) could not resolve host – What’s wrong?

If you are using Linux, you are not too unfamiliar with Terminal, which is a software program that allows the user to communicate with the computer by running pre-installed commands. When you are trying to install a new application for using Terminal, you may get the error Curl: (6) could not resolve host.

If you are facing the error Curl: (6) could not resolve host, there may be 2 reasons for that. First of all, IPV6 was enabled. And another one is the wrong DNS server. So, if you are troubled because of one of the two reasons above, we will bring you the ways to disable IPV6 and add a Google DNS server to deal with this error. Let’s get started now!

How to fix Curl: (6) could not resolve host

As we mentioned above, the first solution we will show you is how to disable IPV6 to solve the error Curl: (6) could not resolve host. Here is the detailed instruction:

  • Open Terminal -> Type su and enter in order to log in as the super user.
  • Fill out the root password.
  • Change the directory cd/etc/modprobe.d/ to /etc/modprobe.d/
  • Type vi disableipv6.conf and generate a new file.
  • Press the combination key Esc + I to insert data into the file you have already created.
  • Enter install ipv6 /bin/true on the file in order to avoid loading modules related to IPV6.
  • Type Esc + : -> Type wp to save and exit.
  • Enter reboot to restart fedora -> Open terminal -> Type lsmod | grep ipv6
  • Now, if there is no result, you succeed in disabling IPV6.

The second method to deal with this error Curl: (6) could not resolve host is to add Google DNS server. Let’s follow the steps below:

  • Open Terminal -> Type su and enter in order to log in as the super user.
  • Fill out the root password.
  • In order to check what DNS server you are using, let’s type cat /etc/resolv.conf.
  • An open DNS server maintained by Google can help you to address this trouble. They are 8.8.8.8 and 8.8.4.4 but they may change in the future. Learn more here.
  • Enter vi /etc/resolv.conf in order to modify the file resolv.conf.
  • Press the combination key Esc + I to insert data into the file.
  • Insert # at the beginning of each line -> Fill out the two following lines in the file:

nameserver 8.8.8.8
nameserver 8.8.4.4

  • Type Esc + : -> Type wp to save and exit.

Everything is done and you don’t need to restart. The error will disappear now!

Conclusion

To sum up, they are the two helpful solutions that are rated by many users. So, we hope that they will also support you to tackle the error Curl: (6) could not resolve host effectively. If you have any questions, please leave your comment below and we will answer you as soon as possible.

Furthermore, if you are finding some fast-loading speed, SEO-friendly and responsive free WordPress themes and Joomla 4 Templates, don’t hesitate to visit our site and explore the collection.

  • Author
  • Recent Posts

Lt Digital Team (Content &Amp; Marketing)

Welcome to LT Digital Team, we’re small team with 5 digital content marketers. We make daily blogs for Joomla! and WordPress CMS, support customers and everyone who has issues with these CMSs and solve any issues with blog instruction posts, trusted by over 1.5 million readers worldwide.

Lt Digital Team (Content &Amp; Marketing)

I have a CentOS 7.3 machine that is a guest running on Oracle VirtualBox. The host is a Windows machine. I can ping 8.8.8.8 from the Linux server. The Linux server can ping itself by its hostname ping coolvm. As root I recently did a yum -y update command. That is when curl stopped working. FQDNs will not resolve.

If I try this:

curl -v http://www.google.com

I get this error:

  • Could not resolve host: www.google.com; Unknown error
  • Closing connection 0 curl: (6) COuld not resolve host: www.google.com; Unknown error

The commands nslookup, dig and host have not been installed. I cannot install new Yum packages because I get an error related to host resolution («Resolving time out»).

The /etc/resolv.conf file looks like this:

# Generated by NetworkManager
search localdomain
nameserver 8.8.8.8
nameserver 8.8.4.4

I tried rebooting the host machine (and thus the guest too). But that did not help me. Browsing the internet has not changed.

The interface for the main NIC in /etc/sysconfig/network-scripts/ has DNS server stanzas that have worked in the past. The interface file is standard and complete. I have not changed it since the yum -y update command.

How can I get FQDNs to resolve? I want to use the Lynx command. My repositories rely on FQDNs to resolve. I cannot use yum to install packages.

Update. I ran this command:

cat /etc/nsswitch.conf | grep -i hosts

I saw this:

#hosts:   db files nisplus nis dns
hosts:    files dns myhostname

« Previous
Next »

Error: Error downloading packages: Curl error (6): Couldn’t resolve host name for https://mirrors.fedoraproject.org/metalink?repo=updates-released-f25&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]

$ sudo dnf install python

When installing python package, this error is raised (Curl error (6): Couldn’t resolve host name for https://mirrors.fedoraproject.org/metalink?repo=updates-released-f25&arch=x86_64)

How to resolve could not resolve host name issue?

Try running this commands

$ sudo dnf clean all
$ sudo dnf upgrade

Check whether output of the upgrade command is ‘Error: Failed to synchronize cache for repo ‘fedora»

Try ping command for host mirrors.fedoraproject.org

$ ping mirrors.fedoraproject.org 

Output:

ping: mirrors.fedoraproject.org: Temporary failure in name resolution

Try few times if ping is not working and displayed as above and instead of getting reply.

PING wildcard.fedoraproject.org (67.219.144.68) 56(84) bytes of data.
64 bytes from 67.219.144.68 (67.219.144.68): icmp_seq=1 ttl=50 time=367 ms
64 bytes from 67.219.144.68 (67.219.144.68): icmp_seq=2 ttl=50 time=307 ms

Try upgrade command also few times if not working, sometimes connection with host ‘mirrors.fedoraproject.org’ might be temporarily failed.

$ sudo dnf upgrade

Output:

Upgrades all the packages.

« Previous
Next »

Posted on Sunday, July 27, 2014 by nayana

After you installed Fedora, you may face this issue while updating the system or a any specific application. Any also while try to install new application using Terminal. There are few things you have to do to fedora before you start to work otherwise it will trouble you always.

Today I’m going to treat for these symptoms
1. curl: (6) Could not resolve host
2. curl: (6) Could not resolve host: google.com; Name or service not known
3. nolookup not working
4. Firefox doesn’t have internet
5. Couldn’t resolve host when installing/updating yum packages
6. Very Slow DNS Lookup
7. Very slow to load web pages in web browser.

Here is the step by step solution.

1. Most of the issues occur because of the IPV6 internet connection in the Fedora. So first we have to disable IPV6 totally. here what you have to do

  • Open Terminal
  • Type su and enter to log in as the super user
  • Enter the root password
  • Type cd /etc/modprobe.d/ to change directory to /etc/modprobe.d/
  • Type vi disableipv6.conf to create a new file there
  • Press Esc + i for insert data to file
  • Type install ipv6 /bin/true on the file to avoid loading IPV6 related modules
  • Type Esc + : and then wq for save and exit
  • Type reboot to restart fedora
  • After reboot open terminal and type lsmod | grep ipv6 
  • If no result, it means you properly disabled IPV6

2. Then you have to disable the IPV6 DNS look-up in your Firefox browser. For that you have to go true one of my step by step tutorial. below I mention the link. But remember to comeback here to continue rest of the tasks.

  • Go to How to NO INTERNET IN THE FIREFOX AFTER INSTALLING FEDORA 20 Tutorial for fix the Firefox. this is not only for Fedora 20. works in most of the other versions too.

3. Now your Firefox ready t surf internet but one more issue there. Fedora may user your ADSL router or Modem as the DNS server. In other way Fedora may uses some less powerful DNS server for look-up. So  your DNS look-up will be slow and wrong most of the time. This will cause to Curl errors and slow loading errors. So we have to set some powerful DNS server for look-up purpose in Fedora. Here is the steps.

  • Open Terminal
  • Type su and enter to log in as the super user
  • Enter the root password
  • Type cat /etc/resolv.conf to check what DNS server your Fedora using. Mostly this will be your Modem IP address.
  • Now we have to Find a powerful DNS server. Luckily there is a open DNS server maintain by Google.
  • Go to this page and find out what are the «Google Public DNS IP addresses»
  • Today those are 8.8.8.8 and 8.8.4.4. But in future those may change.
  • Type vi /etc/resolv.conf to edit the resolv.conf file
  • Press Esc + i for insert data to file
  • Comment all the things in the file by inserting # at the begin of the each line. Do not delete anything because can be useful in future.
  • Type below two lines in the file
nameserver 8.8.8.8
nameserver 8.8.4.4

  • Type Esc + : and then wq for save and exit
  • Now you are done and everything works fine (Not necessary to restart).
  • But every time when you restart the computer your  /etc/resolv.conf will be replaced by default. So I’m let you find a way to avoid that. 

dil wrote in ru_root

August 31 2017, 11:19

Category:

  • IT
  • Cancel

Есть некая программа (бинарная, не скрипт), использующая для связи с внешними сайтами libcurl.so .
И у неё время от времени случается такая фигня: 'Curl Error 6 : 'couldn't resolve host name' — многие сотни таких ошибок про один и тот же хост за полторы-две минуты, потом всё налаживается. А потом опять такая же фигня случается, обычно 4-5 раз в день.

При этом host и dig все эти хосты всегда успешно ресолвят. На всякий случай проверил авторитетные сервера доменов, с которыми это случается, все нормально работают. И через указанные в /etc/resolv.conf один местный и два гугловых сервера тоже всё успешно ресолвится.

Гуглить пробовал, единственная найденная идея — поменять в nsswitch.com порядок поиска со стандартного hosts: files dns на hosts: dns files. Поменял, не помогло.

Похоже, проблема где-то внутри curl’овой библиотеки. Есть какие-нибудь идеи, отчего такое может быть, и как это можно исправить?

Upd: Проблема оказалась не в curl’е. На машине был запущен nscd, я решил попробовать его отключить, и тогда ресолвинг стал работать нормально. Такие вот загадочные грабли :(

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Curl error 56 recv failure connection reset by peer
  • Curl error 56 receiving data failed with unitytls error code 1048578
  • Curl error 56 receiving data failed with unity tls error code 1048578 unity
  • Curl error 56 received http code 503 from proxy after connect
  • Curl error 56 proxy connect aborted

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии