When PM2 starts the node service, it has been reported that the port is occupied, and it is useless to change the port several times.

vue+node

* *

< H2 > 1. Problem found < / H2 >

* *

* *

< H2 > 2. Find the problem < / H2 >

* *

 pm2 list 

clipboard.png


clipboard.png


clipboard.png

  
   pm2
   
  node
  nodekill -9 [pid] 
  
  

first of all, don't tag it indiscriminately. What does your question have to do with nginx?

I guess your problem is caused by pm2's fork mode, because fork mode does not support port reuse, which can cause this problem if you open multiple processes. Change fork to cluster try

in addition, the kill command cannot specify the port, but the process id (pid), such as kill 1234
to check the port occupancy, can use: ss-lntp | grep < port > , where < port > is the port you want to see

.

lsof-I: look at the port number

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e443be-437d3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e443be-437d3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?