Skip to content
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

Can't Run Strapi on port 1337 getting error 426 "This page isn't working" #12414

Closed
TechXTT opened this issue Feb 5, 2022 · 16 comments
Closed

Comments

@TechXTT
Copy link

TechXTT commented Feb 5, 2022

I just installed strapi v4.
I'm running node 16.13.2
With npm 8.4.1
Windows 11

This is the command I used to install it:
npx create-strapi-app@latest testing-strapi --quickstart

After the installation it gave me :
image

And when it auto opened on my Chrome browser(Tried on Edge too)
It gave me this:
image

I tried different version of node , updated npm.
Later I tried changing all the refrences of port 1337 to another port and it did load but it said that it had a problem with the api and it was trying to connect to api on port 1337 not 3001 as I set it then.
Console of /admin(with changed port)
image
/admin page with changed port:
image

Update:

Tried it on WSL same problem I presume the problem is with the port,

@TechXTT
Copy link
Author

TechXTT commented Feb 6, 2022

I'm sorry found the problem apparently Razer Chroma's server is running on port 1337 so after I killed the process it started working.

@TechXTT TechXTT closed this as completed Feb 6, 2022
@TechXTT
Copy link
Author

TechXTT commented Feb 6, 2022

For anyone with a similar problem quick guide on how I found it:
open cmd with administrator
run netstat -aon
you will get a list with all ports in use and the ProcessID that is using it
find the port and look up the last number that is the PID
open Task Manager go to Details page sort by PID and find the specific PID

@TechXTT TechXTT reopened this Feb 6, 2022
@TechXTT TechXTT closed this as completed Feb 6, 2022
@aetaix
Copy link

aetaix commented Feb 14, 2022

Hello everyone, had the same issue, and my Razer Chroma was indeed the issue : the razer services use :1337 port to run its back services.
You save my app !

@rrfaria
Copy link

rrfaria commented Mar 6, 2022

I found an issue on changing port to solve this ...
I had same issue so I changed port to 1338 on .env and then run yarn develop again
It opens but with errors
It still looking for 1337

to avoid it I built again and run yarn develop then it worked
image

@TechXTT
Copy link
Author

TechXTT commented Mar 7, 2022

I found an issue on changing port to solve this ... I had same issue so I changed port to 1338 on .env and then run yarn develop again It opens but with errors It still looking for 1337

to avoid it I built again and run yarn develop then it worked image

To change port of strapi you need to do it the following way:
change your .env file located in the root project directory adding this line:
PORT=1338
Then save the file, and run this command in order to refresh up all the things:
npm run build
now you can start your server by running:
npm run develop

@blaw6331
Copy link

blaw6331 commented Mar 20, 2022

NOTE TO PEOPLE WITH RAZOR PRODUCTS
razor has a process called RzSDKServer that is causing this issue
Get-Process -Id (Get-NetTCPConnection -LocalPort 1337).OwningProcess
then
taskkill /F /PID IDFROMABOVECOMMAND

then go to task manager services or process manager and set "Razor Chroma SDK Server" process to disabled. This may break some of razors software but who uses it anyways

or change the strapi port like people have done in above comments

This strapi localhost:1337/admin is not showing a HTTP error code 426 Upgrade Required that makes the page not load

@DenisCor
Copy link

DenisCor commented Jul 24, 2022

netstat -aon

Thank You! This started happening after I bought my Razer mouse and installed Razer Synapse software. They did release an update which will fix this port conflict, so just update your Synapse and Srapi will run just fine (for those who still run into this issue)

@buden3000
Copy link

not sure what was using port 1337 on my machine as there was nothing in the list when i checked but changing the port has just got this running for me so would suggest this is a fix for some other unknown issue too possibly

@LukeBennettUK
Copy link

I found an issue on changing port to solve this ... I had same issue so I changed port to 1338 on .env and then run yarn develop again It opens but with errors It still looking for 1337

to avoid it I built again and run yarn develop then it worked image

Thank you so much for your answer, I changed the localhost port, ran yarn strapi build then yarn strapi start and it worked! No need to kill processes through task manager.

@kolpaja
Copy link

kolpaja commented Nov 21, 2022

For anyone with a similar problem quick guide on how I found it: open cmd with administrator run netstat -aon you will get a list with all ports in use and the ProcessID that is using it find the port and look up the last number that is the PID open Task Manager go to Details page sort by PID and find the specific PID

you are amazing, thank you

@nkechr1s
Copy link

I'm sorry found the problem apparently Razer Chroma's server is running on port 1337 so after I killed the process it started working.

Lol same here.

@Lauro235
Copy link

Lauro235 commented May 16, 2023

What worked for me is...

ctrl shift f => type 1337
replace all with 1338

npm run build
npm start

@lsotoj
Copy link

lsotoj commented Sep 14, 2023

Go over the proccesse's that is runnin over the same port, in my case was Razer keyboard that was running on the same port, I just finished the procces ID and it worked. :)

@CostinSariu
Copy link

For anyone with a similar problem quick guide on how I found it: open cmd with administrator run netstat -aon you will get a list with all ports in use and the ProcessID that is using it find the port and look up the last number that is the PID open Task Manager go to Details page sort by PID and find the specific PID

Hey as a newbie dev who barely knows what he's doing with a deadline, I've been trying to solve this for 6 hours and wanted to thank you sosososo much for coming back to post your solution.

@neutral-id
Copy link

Absolute legend. I've been sat here trying to diagnose why windows cannot access a WSL port.

@af0nx
Copy link

af0nx commented Apr 23, 2024

Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests