Laravel valet on Apple Silicon Failed to connect Connection refused - apple-m1

I have just installed Laravel valet for the very first time on Apple Silicon M1 and I can't get it to work.
I have followed all possible actions in all kind of forums (SO, github) and nothing works.
The error I see is right when I want to serve a Laravel app using valet:
valet open mysite.test
I see in the browser:
cannot connect to website
Also, if I try curl in the terminal, I get:
❯ curl -IL https://mysite.test/
curl: (7) Failed to connect to mysite.test port 443 after 5 ms: Connection refused
However, if I ping it, I do get response
❯ ping https://mysite.test
PING https://mysite.test (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.045 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.173 ms
valet config.json
{
"tld": "test",
"loopback": "127.0.0.1",
"paths": [
"/Users/me/.config/valet/Sites",
"/Users/me/development/laravel/code"
]
}
dnsmasq.d/tld-test.conf
address=/.test/127.0.0.1
listen-address=127.0.0.1
Note
I also got Docker Desktop running to run a MySQL instance ... maybe that's causing conflicts in my network? as described here
What am I missing?
How do I fix it?

Related

Server can not be found using Laravel Valet

I have followed the instructions to install Laravel Valet. No errors during installation and when pinging foo.test it seems to work:
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.079 ms
Have linked a folder with valet link and secured it. But when trying in the browser I get the "Server not found..." error. But, pinging it works(?):
PING produktbild.test (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.078 ms
Have installed and restarted Valet several times. The output from brew services list is:
valet restart
Restarting dnsmasq...
Restarting php...
Restarting nginx...
Valet services have been restarted.
brew services list
Name Status User File
dnsmasq error 512 root ~/Library/LaunchAgents/homebrew.mxcl.dnsmasq.plist
nginx none root
opensearch none
php none root
Why is it a "error" status for dnsmasq and "none" on nginx? And most important, how to solve it?
ADDED 1: I previously had MAMP Pro installed. It is uninstalled and settings reverted - I think...
/Magnus

nerdctl DNS timeout on Windows

We just installed Rancher Desktop 1.4.1 (nerdctl v 0.20.0) on Windows 10 and we seem to have a problem pulling images and logging into a registry:
nerdctl pull alpine
docker.io/library/alpine:latest: resolving |--------------------------------------|
elapsed: 9.9 s total: 0.0 B (0.0 B/s)
INFO[0010] trying next host error="failed to do request: Head \"https://registry-1.docker.io/v2/library/alpine/manifests/latest\": dial tcp: lookup registry-1.docker.io on 192.168.167.172:53: read udp 192.168.167.172:47744->192.168.167.172:53: i/o timeout" host=registry-1.docker.io
FATA[0010] failed to resolve reference "docker.io/library/alpine:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/alpine/manifests/latest": dial tcp: lookup registry-1.docker.io on 192.168.167.172:53: read udp 192.168.167.172:47744->192.168.167.172:53: i/o timeout
Trying to login results in similar errors:
nerdctl --debug-full login registry-1.docker.io
/usr/local/bin/docker-credential-rancher-desktop: source: line 5: can't open '/etc/rancher/desktop/credfwd': No such file or directory
Enter Username: myusername
Enter Password:
DEBU[0030] Ignoring hosts dir "/etc/containerd/certs.d" error="stat /etc/containerd/certs.d: no such file or directory"
DEBU[0030] Ignoring hosts dir "/etc/docker/certs.d" error="stat /etc/docker/certs.d: no such file or directory"
DEBU[0030] len(regHosts)=1
ERRO[0040] failed to call tryLoginWithRegHost error="failed to call rh.Client.Do: Get \"https://registry-1.docker.io/v2/\": dial tcp: lookup registry-1.docker.io on 192.168.167.172:53: read udp 192.168.167.172:36590->192.168.167.172:53: i/o timeout" i=0
FATA[0040] failed to call rh.Client.Do: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 192.168.167.172:53: read udp 192.168.167.172:36590->192.168.167.172:53: i/o timeout
It looks like nerdctl is having problems resolving hostnames. It always times-out after 10 seconds.
Is there a way to explicitly configure hostname resolution in Rancher or nerdctl?
Any help would be appreciated.

The site of "Welcome to nginx!" not appearing as I `curl http://your_server_ip`

I've been doing the tutorial of nginx.
The below image is from the tutorial.
And as I curl http://my_ip ,
curl: (28) Failed to connect to my_ip port 80 after 130496 ms: Connection timed out
is returned after long wait.
What cause(s) can be thought?
BTW the following commands work well.
curl http://127.0.0.1
curl http://localhost
At least for my configurations, just rebooting my computer has worked for me.

Unable to access a URL that I can see is live from a proxy

I'm trying to install Homebrew on my Mac. When I run, the install script, I get:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out
However, I can see from proxies that https://raw.githubusercontent.com/Homebrew/install/master/install is live. It won't load for me in Chrome either, so I can tell the problem is at my end.
I'm on a home network, so no proxies applicable.
When I ping raw.githubusercontent.com locally, I get:
PING raw.githubusercontent.com (90.207.238.183): 56 data bytes
64 bytes from 90.207.238.183: icmp_seq=0 ttl=252 time=13.273 ms
64 bytes from 90.207.238.183: icmp_seq=1 ttl=252 time=10.497 ms
How can I figure out what's going wrong?
So turns out that Sky (my webhost) were blocking github as a fraudulent site. Unblocking via Sky Broadband Shield fixed the issue.
http://helpforum.sky.com/t5/Broadband/githubusercontent-com-blocked-by-Sky-Broadband-Shield/td-p/2722951

FileZilla: able to connect via SFTP, but failed to list directories

I used FileZilla to connect to one of my Linux servers via the SFTP protocol, but got below error stack trace.
Status: Connecting to <server_ip>...
Response: fzSftp started, protocol_version=5
Command: keyfile "C:\ruifeng_ibm.ppk"
Command: open "root#<server_ip>" 22
Status: Connected to <server_ip>
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server
On the server when I ran lsof -i, I was able to see the established sshd connection.
sshd 12333 root 3u IPv4 109406 0t0 TCP <server_hostname>:ssh-><workstation_ip>:54315 (ESTABLISHED)
How could the directories not be listed when the connection is successful? No idea how to debug either.
Turned out to be a silly problem.
I put below welcome message in the .bashrc file.
echo -e "\n\nHello Ruifeng...Welcome to the Arena! \n#>>------>---->>"
Either it contained some illegal characters FileZilla does not honor, or it's completely not supported by FileZilla. Too lazy to further dig in. After removing this message, the connection worked and the directories got listed.

Resources