Valet: ERR_CONNECTION_REFUSED

Created on 3 Jul 2018  路  5Comments  路  Source: laravel/valet

After 4 hours of trying, I don't know what to do.

So everything worked fine and I coded for weeks without problems. Now when I wanted to show my friend how to use valet share, everything went wrong.

My page was secured with https://instafood.test. For "valet share" I needed to use "valet unsecure". My mistake was that I forgot to write "valet unsecure instafood".

I did not notice my mistake and called the command valet share afterward. I took the shared URL and opened it on safari on an iPhone. I saw the dreaded "it works". So I stopped valet share and secured it again, but the page https://instafood.test stopped working and I even didn't get "it works". Just "ERR_CONNECTION_REFUSED".

With "valet paths" I saw the wrong paths and deleted them, but nonetheless, it's still not working.

In #326 I found that I should uninstall everything again. I did everything and restarted the services:

image

Brew is telling me that it is successfully restarted, but I get errors in: /usr/local/var/log

In redis I get the errors:

image

And in nginx

image

Like for the others. The weird part is that I can ping my address and it works. If I go to http://localhost:8080/ I get the "Welcome to nginx!"-page.

So I tryed to find out what is on port: 80

image

How should I block these? And with sudo lsof -i:80 I see these

image

So in another forum I found out you should stop apache. I tried with sudo apachectl stop and then sudo brew services restart --all. But still no luck.

I don't really know what to do anymore. It's super weird and I don't want to reinstall my os...

Most helpful comment

Check next time if the nginx config; nginx -t this was for me the problem.

All 5 comments

Usually when ports are being reserved unexpectedly, especially after installing and starting/stopping/removing/reinstalling/starting/etc a reboot works wonders.

So I just are going to post some Updates:

I uninstalled everything. From Node to all brew services and I even uninstalled apache.

Now I installed everything back beside apache and every brew services are running without errors.

Fortunately, I get a 404 - Not Found on valet. I think that is because apache is not running. But I'm curious why do I need nginx and apache at the same time? Does anyone know it?

Well, that is weird. I've never needed to write: cd parent/my-project && valet link my-project

But that was it. I DID IT 馃帀

You said you had edited the valet paths settings. Perhaps your parent directory is no longer in that list? That would explain the need to do manual linking.

Nevertheless, glad you got it sorted out! Please close this Issue if your matter requires no further discussion.

Check next time if the nginx config; nginx -t this was for me the problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

papakay picture papakay  路  3Comments

dustinleblanc picture dustinleblanc  路  4Comments

crydotsnake picture crydotsnake  路  5Comments

webartistse picture webartistse  路  4Comments

VinceG picture VinceG  路  3Comments