cretueusebiu / valet-windows

Laravel Valet for Windows.
MIT License
912 stars 86 forks source link

Port 9001 used by System #131

Closed Leamo closed 4 years ago

Leamo commented 4 years ago

In my computer I encounter the error message Could not start the phpfpmservice service while launching valet start or valet restart

In .config\valet\Logphpfpmservice.err file I have a message saying 'Couldn't create FastCGI listen socket on port 127.0.0.1:9001'

It seems that I have a process already using the 9001 port. The problem is that is a System service that I can't kill (ntoskrnl.exe PID:4)

I don't know if it's a specificity of my computer. I didn't do anything that could explain this behavior and it's totally new. Valet worked fine last week.

I tried many fixes (uninstall/install, Acrilyc config, ...) but the only thing that work is changing phpfpm port in vendor conf files and uninstall/install valet again.

mattbrth commented 4 years ago

I have the same issue ... Did you find a solution ?

Leamo commented 4 years ago

I first updated the port directly in the vendors (C:\Users{UserName}\AppData\Roaming\Composer\vendor\cretueusebiu\valet-windows) and in C:\Users{UserName}.config\valet\Services\phpfpmservice.xml file. Then make a valet uninstall/install and it works. But of course updating the valet package with composer will remove this fix every times.

Finally I found that it was probably intel drivers that took this port after an update so I used windows recovery to rollback my computer before this updating action and I stay with the old drivers because the 9001 port is also used by Laragon and I use it too.

easterneas commented 4 years ago

I first updated the port directly in the vendors (C:\Users{UserName}\AppData\Roaming\Composer\vendor\cretueusebiu\valet-windows) and in C:\Users{UserName}.config\valet\Services\phpfpmservice.xml file. Then make a valet uninstall/install and it works. But of course updating the valet package with composer will remove this fix every times.

Finally I found that it was probably intel drivers that took this port after an update so I used windows recovery to rollback my computer before this updating action and I stay with the old drivers because the 9001 port is also used by Laragon and I use it too.

That's weird, since I use Laragon in conjunction with valet-windows, too. But I chose to use different approach before installing valet-windows: disable most of services used in Laragon except MySQL/MariaDB, and then follow the valet-windows installation instruction.

It worked finally, after a hiccup where symfony/process is conflicting as posted on #132 issue.

Leamo commented 4 years ago

This is not a problem with Laragon/valet. The problem is that PHP-CGI work with port 9001 by default in both valet and laragon. If the port is used by the system like it was my case we have to reconfigure both, or both won't work, independently of each other.

martinandersen3d commented 4 years ago

Solved.

This is a intel graphics card software related issue on windows 10.

How to fix:

In windows, go to:

  1. Star menu
  2. Type: Services:
  3. Find the service called: "Intel(R) Graphics Command Center Service"
  4. Rightclick > Properties > Startup type = Disabled

This fixed the problem for me.. :-)

abhishek-singh192 commented 4 years ago

This fixed the issue for me also. Thank you

dummyGit1 commented 4 years ago

@martinandersen3d it worked thank you..

martinandersen3d commented 4 years ago

Note: Windows update Will * maybe re-enable it. I did not test this part in depth.

jovvybersamin commented 4 years ago

@martinandersen3d thanks, man! it saves me a lot of headaches.

kylebashy commented 3 years ago

Thank you martinandersen3d. it fixed my issue. you rock.

ahxar commented 3 years ago

thanks @martinandersen3d, it works!