-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cURL error 6: Could not resolve: site.test (Domain name not found) #736
Comments
First: reboot. CURL error 6 means there's a dns lookup problem. (as you can see in the response you got). Valet provides DNS services to You said "it was working smoothly until today". Does that mean you WERE doing successful CURL calls before today? If so, what changed on your workstation?
|
Thanks for your comment @drbyte Yes it was working completely a day before, the only thing I remember doing was some yarn upgrade. And I didn't bother to look on it after the upgrade since it was pretty late so I shut down the Mac and went to bed. I've done the reboot couple of times and I haven't installed any software lately. Aside from I need to do a lot of google research for that, Thanks |
You could also install an alternate Client to override the default of using CURL: http://docs.guzzlephp.org/en/latest/faq.html#does-guzzle-require-curl
DNSMASQ troubleshootingTop 3 troubleshooting steps I've taken with dnsmasq issues:
dig
loggingEnabling logging in dnsmasq:
Then OSX networking
|
Thanks @drbyte for the those clear instructions. I did follow all the things you listed. Adding Thanks!! |
Note: you might need to add back a "real" DNS resource. You can do that either in the System Prefs DNS pane, or add the following to your dnsmasq.conf file (you don't need all of them, pick one or two to uncomment):
|
Yes I did add one of those. Thanks @drbyte! |
looks like this issue only started after upgrading to php 7.3.2 after adding the additional fallback dns servers to my dns network prefs I was getting no internet, had to reboot before it all worked |
Hello, I just wanted to add some additional info as I ran into this as well. I was seeing very slow requests between my Laravel applications with Curl via Guzzle. For some reason After turning on verbose logging (
I verified the error occurred with both PHP 7.1 and 7.3; changing the version of PHP didn't make a difference for me. Adding |
Had the same issue. Fixed it simply adding 127.0.0.1 as DNS entry in my network configuration and after loading my development environment(with guzzle), removed it and it just started working fine as it was before |
I did the same ( dding 127.0.0.1 as DNS entry in my network configuration) but i ended up having no internet connection and and if i removed it the issue is back again |
@ahmadabdallah you could add manually the domain to your hosts file |
I have had this problem several time after doing an update with brew. And I've forgotten the solution that works for me several times :) As this was one of the first things I hit with google I'm going to post why this occurs for me here. I got the solution from here https://stackoverflow.com/questions/54688451/curl-laravel-valet-dnsmasq-not-working Quick way to check if this is your problem is to do: The versions should match. If they don't it's probably because brew has installed Maybe there's a way to configure the installed |
@alexpott While I'm sure viewing the version/config info could be revealing and might lead towards something that could explain why things might not be working for someone, I'm not so sure it's "critical" that the versions match. I have the following, and I get no Curl errors in my applications.
My curl-openssl is installed by Homebrew:
|
Just wanted to chime in and say that
worked for me. Adding |
Thank you! I've been using I also use a PiHole, so I put it down to something to do with the local resolution, until I found this and added My DNS entries are in the following order:
Guzzle/cURL are now both instantaneous! |
At first there was But i could not access other networks after that. Now my guzzle http and browser network both working . |
So I have tried everything in this issue thread. I figured out this mattered after running
Then I moved the localhost(127.0.0.1) address to the top of my DNS entries and that resolved everything for me.
Make sure you have this at the top!!! The order matters! At least it did for me... |
Yes, putting |
My solution:
|
You have to keep your same DNS servers as before, just adding 127.0.0.1 removed other defaults. You need to manually add them back but keep 127.0.0.1 at the top. |
Yes and no. An even better way is to tell Dnsmasq what you preferred DNS servers are. This is easily done by creating a new config file. Example: to use Cloudflare's 1.1.1.1 create:
Add/remove **This works since Valet 2.6.0 |
Was just trying to make it simple for people changing their DNS then their internet not working. This is great to know though! |
This worked for me! Thank you v much |
In addition to DrByte's reply above, make sure 127.0.0.1 is the first entry in your dns list. |
I think these should be added to valet documentation. It really help a lot. Thanks guys! |
Excelent! |
Helps me too |
I have a laravel app and a lumen api app both installed on my local machine. The laravel app uses the lumen app to get the data, so on my .env file the laravel app has its
APP_DOMAIN=http://site.test/
and it's being used as a base_uri for the Guzzle Client class.Everything was working smoothly not until today I got the error that says.
When I try to test the lumen url on the browser it works completely fine, as well as on postman.
http://site.test/url-here
it returns the json stuff that I need.So I was wondering why isn't being recognized by the laravel app.
Also I saw very similar issue But I don't think adding the url on the
/etc/hosts
file is the right wayAny idea how to fix this? I am not quite sure if this is the right place to post this issue. So I apologize
if I'm on the wrong side.
Thanks
The text was updated successfully, but these errors were encountered: