打開一個(gè)workerman后臺運(yùn)行?root@9202e29e1549:/var/www/html# php public/pricemonitorworker.php start
然后查看狀態(tài):提示端口被占用
root@9202e29e1549:/var/www/html# php public/pricemonitorworker.php status
?
? stream_socket_server(): unable to connect to tcp://0.0.0.0:1598 (Address already in use)
?
并非workerman的bug。
可能是你的代碼改寫了命令或者thinkphp項(xiàng)目改寫了命令導(dǎo)致
windows系統(tǒng),沒有改寫命令。每次運(yùn)行會在workerman文件夾下會自動生成pid文件,如果程序意外退出,pid還繼續(xù)存在。再次運(yùn)行workerman就會報(bào)這個(gè)錯(cuò)誤。只有刪掉pid文件才能繼續(xù)運(yùn)行。怎么解決這個(gè)問題?