服务可以正常停止
php start.php stop
再次启动出现问题:
Warning: stream_socket_server(): Unable to connect to tcp://0.0.0.0:8787 (Address already in use)
包括 start 和 restart(都加 -d)也不行
按照手册常见问题杀死进程后再次启动是可以的,但是每次启动都得 kill 一次。
修改
config/server.php
中
'reusePort' => true
后,启动不报错了,但是日志文件还是有大量的错误,也是:
Warning: stream_socket_server(): Unable to connect to tcp://0.0.0.0:8787 (Address already in use)
而且日志文件越来越大。
/runtime/logs/stdout.log
Warning: stream_socket_server(): Unable to connect to tcp://0.0.0.0:8787 (Address already in use) in /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/workerman/Worker.php on line 2363
Fatal error: Uncaught Exception: Address already in use in /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/workerman/Worker.php:2365
Stack trace:
#0 /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/workerman/Worker.php(2492): Workerman\Worker->listen()
#1 /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/workerman/Worker.php(1636): Workerman\Worker->run()
#2 /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/workerman/Worker.php(1429): Workerman\Worker::forkOneWorkerForLinux()
#3 /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/workerman/Worker.php(1403): Workerman\Worker::forkWorkersForLinux()
#4 /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/workerman/Worker.php(1788): Workerman\Worker::forkWorkers()
#5 /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/workerman/Worker.php(1724): Workerman\Worker::monitorWorkersForLinux()
#6 /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/workerman/Worker.php(562): Workerman\Worker::monitorWorkers()
#7 /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/webman-framework/src/support/App.php(131): Workerman\Worker::runAll()
#8 /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/start.php(4): support\App::run()
#9 {main}
thrown in /www/wwwroot/sport-plat.sdbaizhi.com/sport-platform/vendor/workerman/workerman/Worker.php on line 2365
CentOS 8.3.2011 x86_64(Py3.7.9)
Workerman version:4.1.15
PHP version:8.2.9
Windows 下开发正常,Linux 服务器上出现问题。
启动后
ps auxf
贴下stop后
ps auxf
贴下php -m
贴下有使用了什么特殊的扩展影响了,比如grpc
php -m:
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
filter
ftp
gd
gettext
hash
iconv
igbinary
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
random
redis
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvsem
tokenizer
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
启动后:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2 0.0 0.0 0 0 ? S 2023 0:17 [kthreadd]
root 3 0.0 0.0 0 0 ? I< 2023 0:00 _ [rcu_gp]
root 4 0.0 0.0 0 0 ? I< 2023 0:00 _ [rcu_par_gp]
root 6 0.0 0.0 0 0 ? I< 2023 0:00 _ [kworker/0:0H-kblockd]
root 9 0.0 0.0 0 0 ? I< 2023 0:00 _ [mm_percpu_wq]
root 10 0.0 0.0 0 0 ? S 2023 3:28 _ [ksoftirqd/0]
root 11 0.0 0.0 0 0 ? I 2023 420:22 _ [rcu_sched]
root 12 0.0 0.0 0 0 ? S 2023 0:26 _ [migration/0]
root 13 0.0 0.0 0 0 ? S 2023 0:01 _ [watchdog/0]
root 14 0.0 0.0 0 0 ? S 2023 0:00 _ [cpuhp/0]
root 15 0.0 0.0 0 0 ? S 2023 0:00 _ [cpuhp/1]
root 16 0.0 0.0 0 0 ? S 2023 0:39 _ [watchdog/1]
root 17 0.0 0.0 0 0 ? S 2023 0:26 _ [migration/1]
root 18 0.0 0.0 0 0 ? S 2023 2:06 _ [ksoftirqd/1]
root 20 0.0 0.0 0 0 ? I< 2023 0:00 _ [kworker/1:0H-kblockd]
root 21 0.0 0.0 0 0 ? S 2023 0:00 _ [cpuhp/2]
root 22 0.0 0.0 0 0 ? S 2023 0:37 _ [watchdog/2]
root 23 0.0 0.0 0 0 ? S 2023 0:29 _ [migration/2]
root 24 0.0 0.0 0 0 ? S 2023 3:23 _ [ksoftirqd/2]
root 26 0.0 0.0 0 0 ? I< 2023 0:00 _ [kworker/2:0H-kblockd]
root 27 0.0 0.0 0 0 ? S 2023 0:00 _ [cpuhp/3]
root 28 0.0 0.0 0 0 ? S 2023 0:44 _ [watchdog/3]
root 29 0.0 0.0 0 0 ? S 2023 0:26 _ [migration/3]
root 30 0.0 0.0 0 0 ? S 2023 2:45 _ [ksoftirqd/3]
root 32 0.0 0.0 0 0 ? I< 2023 0:00 _ [kworker/3:0H]
root 37 0.0 0.0 0 0 ? S 2023 0:00 _ [kdevtmpfs]
root 38 0.0 0.0 0 0 ? I< 2023 0:00 _ [netns]
root 39 0.0 0.0 0 0 ? S 2023 29:41 _ [kauditd]
root 40 0.0 0.0 0 0 ? S 2023 0:25 _ [khungtaskd]
root 41 0.0 0.0 0 0 ? S 2023 0:00 _ [oom_reaper]
root 42 0.0 0.0 0 0 ? I< 2023 0:00 _ [writeback]
root 43 0.0 0.0 0 0 ? S 2023 0:00 _ [kcompactd0]
root 44 0.0 0.0 0 0 ? SN 2023 0:00 _ [ksmd]
root 45 0.0 0.0 0 0 ? SN 2023 6:07 _ [khugepaged]
root 46 0.0 0.0 0 0 ? I< 2023 0:00 _ [crypto]
root 47 0.0 0.0 0 0 ? I< 2023 0:00 _ [kintegrityd]
root 48 0.0 0.0 0 0 ? I< 2023 0:00 _ [kblockd]
root 49 0.0 0.0 0 0 ? I< 2023 0:00 _ [blkcg_punt_bio]
root 50 0.0 0.0 0 0 ? I< 2023 0:00 _ [tpm_dev_wq]
root 51 0.0 0.0 0 0 ? I< 2023 0:00 _ [md]
root 52 0.0 0.0 0 0 ? I< 2023 0:00 _ [edac-poller]
root 53 0.0 0.0 0 0 ? S 2023 0:00 _ [watchdogd]
root 56 0.0 0.0 0 0 ? I< 2023 0:00 _ [pm_wq]
root 77 0.0 0.0 0 0 ? S 2023 8:01 _ [kswapd0]
root 170 0.0 0.0 0 0 ? I< 2023 0:00 _ [kthrotld]
root 171 0.0 0.0 0 0 ? I< 2023 0:00 _ [acpi_thermal_pm]
root 172 0.0 0.0 0 0 ? I< 2023 0:00 _ [kmpath_rdacd]
root 173 0.0 0.0 0 0 ? I< 2023 0:00 _ [kaluad]
root 175 0.0 0.0 0 0 ? I< 2023 0:00 _ [ipv6_addrconf]
root 176 0.0 0.0 0 0 ? I< 2023 0:00 _ [kstrp]
root 442 0.0 0.0 0 0 ? I< 2023 5:26 _ [kworker/3:1H-xfs-log/vda1]
root 443 0.0 0.0 0 0 ? I< 2023 0:00 _ [ata_sff]
root 445 0.0 0.0 0 0 ? S 2023 0:00 _ [scsi_eh_0]
root 446 0.0 0.0 0 0 ? I< 2023 0:00 _ [scsi_tmf_0]
root 448 0.0 0.0 0 0 ? S 2023 0:00 _ [scsi_eh_1]
root 449 0.0 0.0 0 0 ? I< 2023 0:00 _ [scsi_tmf_1]
root 465 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfsalloc]
root 466 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs_mru_cache]
root 469 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-buf/vda1]
root 470 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-conv/vda1]
root 471 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-cil/vda1]
root 472 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-reclaim/vda]
root 474 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-eofblocks/v]
root 477 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-log/vda1]
root 478 0.0 0.0 0 0 ? S 2023 73:56 _ [xfsaild/vda1]
root 479 0.0 0.0 0 0 ? I< 2023 1:53 _ [kworker/2:1H-kblockd]
root 573 0.0 0.0 0 0 ? I< 2023 1:58 _ [kworker/0:1H-kblockd]
root 653 0.0 0.0 0 0 ? I< 2023 1:12 _ [kworker/1:1H-kblockd]
root 685 0.0 0.0 0 0 ? I< 2023 0:00 _ [nfit]
root 2360466 0.0 0.0 0 0 ? I 07:05 0:00 _ [kworker/u8:2-events_unbound]
root 2362249 0.0 0.0 0 0 ? I 08:11 0:00 _ [kworker/3:1-cgroup_destroy]
root 2363157 0.0 0.0 0 0 ? I 08:44 0:00 _ [kworker/2:1-memcg_kmem_cache]
root 2363807 0.0 0.0 0 0 ? I 09:10 0:00 _ [kworker/0:1-events]
root 2363856 0.0 0.0 0 0 ? I 09:11 0:00 _ [kworker/3:0-mm_percpu_wq]
root 2364070 0.0 0.0 0 0 ? I 09:20 0:00 _ [kworker/0:2-events]
root 2364340 0.0 0.0 0 0 ? I 09:30 0:00 _ [kworker/1:3-events]
root 2364548 0.0 0.0 0 0 ? I 09:38 0:00 _ [kworker/u8:0-events_unbound]
root 2364596 0.0 0.0 0 0 ? I 09:39 0:00 _ [kworker/2:0-mm_percpu_wq]
root 2364602 0.0 0.0 0 0 ? I 09:40 0:00 _ [kworker/1:2-events_power_effi
root 2364775 0.0 0.0 0 0 ? I 09:45 0:00 _ [kworker/u8:1-events_unbound]
root 1 0.0 0.1 326940 10260 ? Ss 2023 63:54 /usr/lib/systemd/systemd --switche
root 618 0.0 0.0 108480 6968 ? Ss 2023 0:44 /usr/lib/systemd/systemd-udevd
root 720 0.0 0.0 150796 2572 ? S<sl 2023 136:33 /sbin/auditd
root 723 0.0 0.0 48672 3344 ? S< 2023 45:47 _ /usr/sbin/sedispatch
libstor+ 750 0.0 0.0 19736 1996 ? Ss 2023 1:06 /usr/bin/lsmd -d
root 760 0.0 0.0 50240 4700 ? Ss 2023 0:03 /usr/sbin/smartd -n -q never
root 763 0.0 0.1 214824 9660 ? Ss 2023 0:41 /usr/sbin/sssd -i --logger=files
root 877 0.0 0.1 221600 10912 ? S 2023 4:56 _ /usr/libexec/sssd/sssd_be --do
root 882 0.0 0.3 242180 29000 ? S 2023 442:45 _ /usr/libexec/sssd/sssd_nss --u
root 769 0.0 0.0 17780 1980 ? Ss 2023 0:00 /usr/sbin/mcelog --ignorenodev --d
dbus 780 0.0 0.0 77024 5404 ? Ss 2023 202:35 /usr/bin/dbus-daemon --system --ad
chrony 793 0.0 0.0 129064 3348 ? S 2023 2:19 /usr/sbin/chronyd
rngd 794 0.0 0.0 381328 5808 ? Ssl 2023 22:19 /sbin/rngd -f --fill-watermark=0
root 858 0.0 0.0 34300 3852 ? Ss 2023 1:56 pure-ftpd (SERVER)
root 886 0.0 0.0 97512 6864 ? Ss 2023 1:43 /usr/lib/systemd/systemd-logind
root 1194 0.0 0.1 391692 12048 ? Ssl 2023 9:26 /usr/sbin/NetworkManager --no-daem
root 1460 0.0 0.0 123108 5172 ? Ss 2023 2:34 /usr/libexec/postfix/master -w
postfix 1462 0.0 0.1 150448 8536 ? S 2023 0:30 _ qmgr -l -t unix -u
postfix 2362530 0.0 0.1 150408 10356 ? S 08:21 0:00 _ pickup -l -t unix -u
root 1474 0.0 0.6 720992 47672 ? Ssl 2023 173:07 /usr/sbin/rsyslogd -n
root 1480 0.0 0.0 85528 7088 ? Ss 2023 80:15 /usr/sbin/sshd -D -oCiphers=aes256
root 2364754 0.6 0.1 163736 10472 ? Ss 09:45 0:00 _ sshd: root [priv]
root 2364756 0.0 0.0 156956 5568 ? S 09:45 0:00 | _ sshd: root@pts/4
root 2364757 0.0 0.0 27536 5292 pts/4 Ss 09:45 0:00 | _ -bash
root 2364788 0.0 0.0 59152 4828 pts/4 R+ 09:45 0:00 | _ ps auxf
root 2364786 0.0 0.1 145656 9660 ? Ss 09:45 0:00 _ sshd: unknown [priv]
sshd 2364787 0.0 0.0 85540 2972 ? S 09:45 0:00 _ sshd: unknown [net]
root 1487 0.0 0.0 44000 2252 ? Ss 2023 0:00 /usr/sbin/atd -f
root 1492 0.0 0.0 36948 3368 ? Ss 2023 0:54 /usr/sbin/crond -n
root 1494 0.0 0.0 16224 1680 ttyS0 Ss+ 2023 0:00 /sbin/agetty -o -p -- \u --keep-ba
root 1541 0.0 0.1 127240 7916 ? Ss 2023 20:29 php-fpm: master process (/www/serv
root 2188168 0.0 0.7 173504 54476 ? Ss Oct15 0:04 /usr/lib/systemd/systemd-journald
root 2188251 0.0 0.2 186084 15716 ? S Oct15 0:01 WorkerMan: worker process monitor
root 4189844 0.0 0.2 186084 16000 ? S Oct15 0:01 WorkerMan: worker process monitor
root 1804165 0.0 0.1 186084 15008 ? S Oct15 0:00 WorkerMan: worker process monitor
root 2339500 0.0 0.5 454344 44396 ? Ssl Oct15 0:01 /usr/libexec/platform-python -s /u
root 2343265 0.0 0.1 184036 14716 ? S Oct15 0:00 WorkerMan: master process start_f
root 2343266 0.0 0.2 188132 18236 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343267 0.0 0.3 264864 24644 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343268 0.0 0.2 188132 17888 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343269 0.0 0.2 188132 17764 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343270 0.0 0.3 264864 24644 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343271 0.0 0.2 188132 19420 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343272 0.0 0.2 186084 16008 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343273 0.0 0.2 188132 17768 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343274 0.0 0.2 186084 16008 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343275 0.0 0.2 188132 18056 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343276 0.0 0.2 186084 16008 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343277 0.0 0.3 264876 24644 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343278 0.0 0.2 188132 17888 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343279 0.0 0.2 188132 17888 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343280 0.0 0.3 264864 24644 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343281 0.0 0.3 264864 25496 ? S Oct15 0:00 _ WorkerMan: worker process web
root 2343282 0.0 0.2 186084 15752 ? S Oct15 0:00 _ WorkerMan: worker process mon
停止后:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2 0.0 0.0 0 0 ? S 2023 0:17 [kthreadd]
root 3 0.0 0.0 0 0 ? I< 2023 0:00 _ [rcu_gp]
root 4 0.0 0.0 0 0 ? I< 2023 0:00 _ [rcu_par_gp]
root 6 0.0 0.0 0 0 ? I< 2023 0:00 _ [kworker/0:0H-kblockd]
root 9 0.0 0.0 0 0 ? I< 2023 0:00 _ [mm_percpu_wq]
root 10 0.0 0.0 0 0 ? S 2023 3:28 _ [ksoftirqd/0]
root 11 0.0 0.0 0 0 ? I 2023 420:22 _ [rcu_sched]
root 12 0.0 0.0 0 0 ? S 2023 0:26 _ [migration/0]
root 13 0.0 0.0 0 0 ? S 2023 0:01 _ [watchdog/0]
root 14 0.0 0.0 0 0 ? S 2023 0:00 _ [cpuhp/0]
root 15 0.0 0.0 0 0 ? S 2023 0:00 _ [cpuhp/1]
root 16 0.0 0.0 0 0 ? S 2023 0:39 _ [watchdog/1]
root 17 0.0 0.0 0 0 ? S 2023 0:26 _ [migration/1]
root 18 0.0 0.0 0 0 ? S 2023 2:06 _ [ksoftirqd/1]
root 20 0.0 0.0 0 0 ? I< 2023 0:00 _ [kworker/1:0H-kblockd]
root 21 0.0 0.0 0 0 ? S 2023 0:00 _ [cpuhp/2]
root 22 0.0 0.0 0 0 ? S 2023 0:37 _ [watchdog/2]
root 23 0.0 0.0 0 0 ? S 2023 0:29 _ [migration/2]
root 24 0.0 0.0 0 0 ? S 2023 3:23 _ [ksoftirqd/2]
root 26 0.0 0.0 0 0 ? I< 2023 0:00 _ [kworker/2:0H-kblockd]
root 27 0.0 0.0 0 0 ? S 2023 0:00 _ [cpuhp/3]
root 28 0.0 0.0 0 0 ? S 2023 0:44 _ [watchdog/3]
root 29 0.0 0.0 0 0 ? S 2023 0:26 _ [migration/3]
root 30 0.0 0.0 0 0 ? S 2023 2:45 _ [ksoftirqd/3]
root 32 0.0 0.0 0 0 ? I< 2023 0:00 _ [kworker/3:0H]
root 37 0.0 0.0 0 0 ? S 2023 0:00 _ [kdevtmpfs]
root 38 0.0 0.0 0 0 ? I< 2023 0:00 _ [netns]
root 39 0.0 0.0 0 0 ? S 2023 29:41 _ [kauditd]
root 40 0.0 0.0 0 0 ? S 2023 0:25 _ [khungtaskd]
root 41 0.0 0.0 0 0 ? S 2023 0:00 _ [oom_reaper]
root 42 0.0 0.0 0 0 ? I< 2023 0:00 _ [writeback]
root 43 0.0 0.0 0 0 ? S 2023 0:00 _ [kcompactd0]
root 44 0.0 0.0 0 0 ? SN 2023 0:00 _ [ksmd]
root 45 0.0 0.0 0 0 ? SN 2023 6:07 _ [khugepaged]
root 46 0.0 0.0 0 0 ? I< 2023 0:00 _ [crypto]
root 47 0.0 0.0 0 0 ? I< 2023 0:00 _ [kintegrityd]
root 48 0.0 0.0 0 0 ? I< 2023 0:00 _ [kblockd]
root 49 0.0 0.0 0 0 ? I< 2023 0:00 _ [blkcg_punt_bio]
root 50 0.0 0.0 0 0 ? I< 2023 0:00 _ [tpm_dev_wq]
root 51 0.0 0.0 0 0 ? I< 2023 0:00 _ [md]
root 52 0.0 0.0 0 0 ? I< 2023 0:00 _ [edac-poller]
root 53 0.0 0.0 0 0 ? S 2023 0:00 _ [watchdogd]
root 56 0.0 0.0 0 0 ? I< 2023 0:00 _ [pm_wq]
root 77 0.0 0.0 0 0 ? S 2023 8:01 _ [kswapd0]
root 170 0.0 0.0 0 0 ? I< 2023 0:00 _ [kthrotld]
root 171 0.0 0.0 0 0 ? I< 2023 0:00 _ [acpi_thermal_pm]
root 172 0.0 0.0 0 0 ? I< 2023 0:00 _ [kmpath_rdacd]
root 173 0.0 0.0 0 0 ? I< 2023 0:00 _ [kaluad]
root 175 0.0 0.0 0 0 ? I< 2023 0:00 _ [ipv6_addrconf]
root 176 0.0 0.0 0 0 ? I< 2023 0:00 _ [kstrp]
root 442 0.0 0.0 0 0 ? I< 2023 5:26 _ [kworker/3:1H-kblockd]
root 443 0.0 0.0 0 0 ? I< 2023 0:00 _ [ata_sff]
root 445 0.0 0.0 0 0 ? S 2023 0:00 _ [scsi_eh_0]
root 446 0.0 0.0 0 0 ? I< 2023 0:00 _ [scsi_tmf_0]
root 448 0.0 0.0 0 0 ? S 2023 0:00 _ [scsi_eh_1]
root 449 0.0 0.0 0 0 ? I< 2023 0:00 _ [scsi_tmf_1]
root 465 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfsalloc]
root 466 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs_mru_cache]
root 469 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-buf/vda1]
root 470 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-conv/vda1]
root 471 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-cil/vda1]
root 472 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-reclaim/vda]
root 474 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-eofblocks/v]
root 477 0.0 0.0 0 0 ? I< 2023 0:00 _ [xfs-log/vda1]
root 478 0.0 0.0 0 0 ? S 2023 73:56 _ [xfsaild/vda1]
root 479 0.0 0.0 0 0 ? I< 2023 1:53 _ [kworker/2:1H-kblockd]
root 573 0.0 0.0 0 0 ? I< 2023 1:58 _ [kworker/0:1H-kblockd]
root 653 0.0 0.0 0 0 ? I< 2023 1:12 _ [kworker/1:1H-kblockd]
root 685 0.0 0.0 0 0 ? I< 2023 0:00 _ [nfit]
root 2360466 0.0 0.0 0 0 ? I 07:05 0:00 _ [kworker/u8:2-events_unbound]
root 2362249 0.0 0.0 0 0 ? I 08:11 0:00 _ [kworker/3:1-cgroup_destroy]
root 2363157 0.0 0.0 0 0 ? I 08:44 0:00 _ [kworker/2:1-memcg_kmem_cache]
root 2363807 0.0 0.0 0 0 ? I 09:10 0:00 _ [kworker/0:1-events]
root 2363856 0.0 0.0 0 0 ? I 09:11 0:00 _ [kworker/3:0-mm_percpu_wq]
root 2364070 0.0 0.0 0 0 ? I 09:20 0:00 _ [kworker/0:2-events]
root 2364340 0.0 0.0 0 0 ? I 09:30 0:00 _ [kworker/1:3-events]
root 2364548 0.0 0.0 0 0 ? I 09:38 0:00 _ [kworker/u8:0-events_unbound]
root 2364596 0.0 0.0 0 0 ? I 09:39 0:00 _ [kworker/2:0-events_power_effi
root 2364602 0.0 0.0 0 0 ? I 09:40 0:00 _ [kworker/1:2-mm_percpu_wq]
root 2364775 0.0 0.0 0 0 ? I 09:45 0:00 _ [kworker/u8:1-events_unbound]
root 2364802 0.0 0.0 0 0 ? I 09:46 0:00 _ [kworker/2:2-cgroup_pidlist_de
root 1 0.0 0.1 326940 10260 ? Ss 2023 63:54 /usr/lib/systemd/systemd --switche
root 618 0.0 0.0 108480 6968 ? Ss 2023 0:44 /usr/lib/systemd/systemd-udevd
root 720 0.0 0.0 150796 2572 ? S<sl 2023 136:33 /sbin/auditd
root 723 0.0 0.0 48672 3344 ? S< 2023 45:47 _ /usr/sbin/sedispatch
libstor+ 750 0.0 0.0 19736 1996 ? Ss 2023 1:06 /usr/bin/lsmd -d
root 760 0.0 0.0 50240 4700 ? Ss 2023 0:03 /usr/sbin/smartd -n -q never
root 763 0.0 0.1 214824 9660 ? Ss 2023 0:41 /usr/sbin/sssd -i --logger=files
root 877 0.0 0.1 221600 10912 ? S 2023 4:56 _ /usr/libexec/sssd/sssd_be --do
root 882 0.0 0.3 242180 29000 ? S 2023 442:45 _ /usr/libexec/sssd/sssd_nss --u
root 769 0.0 0.0 17780 1980 ? Ss 2023 0:00 /usr/sbin/mcelog --ignorenodev --d
dbus 780 0.0 0.0 77024 5404 ? Ss 2023 202:35 /usr/bin/dbus-daemon --system --ad
chrony 793 0.0 0.0 129064 3348 ? S 2023 2:19 /usr/sbin/chronyd
rngd 794 0.0 0.0 381328 5808 ? Ssl 2023 22:19 /sbin/rngd -f --fill-watermark=0
root 858 0.0 0.0 34300 3852 ? Ss 2023 1:56 pure-ftpd (SERVER)
root 886 0.0 0.0 97512 6864 ? Ss 2023 1:43 /usr/lib/systemd/systemd-logind
root 1194 0.0 0.1 391692 12048 ? Ssl 2023 9:26 /usr/sbin/NetworkManager --no-daem
root 1460 0.0 0.0 123108 5172 ? Ss 2023 2:34 /usr/libexec/postfix/master -w
postfix 1462 0.0 0.1 150448 8536 ? S 2023 0:30 _ qmgr -l -t unix -u
postfix 2362530 0.0 0.1 150408 10356 ? S 08:21 0:00 _ pickup -l -t unix -u
root 1474 0.0 0.6 729184 47672 ? Ssl 2023 173:07 /usr/sbin/rsyslogd -n
root 1480 0.0 0.0 85528 7088 ? Ss 2023 80:15 /usr/sbin/sshd -D -oCiphers=aes256
root 2364754 0.0 0.1 163736 10472 ? Ss 09:45 0:00 _ sshd: root [priv]
root 2364756 0.0 0.0 156956 5568 ? S 09:45 0:00 _ sshd: root@pts/4
root 2364757 0.0 0.0 27536 5292 pts/4 Ss 09:45 0:00 _ -bash
root 2364853 0.0 0.0 59152 4700 pts/4 R+ 09:48 0:00 _ ps auxf
root 1487 0.0 0.0 44000 2252 ? Ss 2023 0:00 /usr/sbin/atd -f
root 1492 0.0 0.0 36948 3368 ? Ss 2023 0:54 /usr/sbin/crond -n
root 1494 0.0 0.0 16224 1680 ttyS0 Ss+ 2023 0:00 /sbin/agetty -o -p -- \u --keep-ba
root 1541 0.0 0.1 127240 7916 ? Ss 2023 20:29 php-fpm: master process (/www/serv
root 4136592 0.0 0.0 26240 3344 ? S Mar01 0:00 /bin/sh /www/server/mysql/bin/mysq
mysql 4137301 0.1 14.6 3675728 1122820 ? Sl Mar01 521:46 _ /www/server/mysql/bin/mysqld -
root 3889053 0.0 0.1 722504 14360 ? Ssl Aug27 5:59 /proc/self/exe
root 3911557 0.0 0.0 133400 5372 ? Ss Aug28 0:00 login -- root
root 3913041 0.0 0.0 27504 5196 tty1 Ss+ Aug28 0:00 _ -bash
root 3913027 0.0 0.1 93792 9320 ? Ss Aug28 0:00 /usr/lib/systemd/systemd --user
root 3913029 0.0 0.0 390496 4020 ? S Aug28 0:00 _ (sd-pam)
root 3913519 0.0 1.2 764704 92876 ? Sl Aug28 7:01 /www/server/panel/pyenv/bin/python
root 3914203 0.0 0.5 1224364 44768 ? Sl Aug28 42:02 /www/server/panel/pyenv/bin/python
root 4092591 0.0 0.0 53352 5968 ? Ssl Sep01 31:31 /usr/local/aegis/aegis_update/AliY
root 4092635 0.2 0.1 117664 10296 ? Ssl Sep01 192:44 /usr/local/aegis/aegis_client/aegi
root 4092646 0.5 1.0 241480 78988 ? Ssl Sep01 382:53 /usr/local/aegis/aegis_client/aegi
root 80718 0.0 0.1 685916 8904 ? Ssl Sep04 54:15 /usr/local/share/aliyun-assist/2.2
root 80859 0.0 0.0 19420 2032 ? Ssl Sep04 9:37 /usr/local/share/assist-daemon/ass
root 1568717 0.0 0.2 164804 19024 ? Ss Oct01 0:00 nginx: master process /www/server/
www 2156378 0.0 0.5 213960 42452 ? S Oct15 0:02 _ nginx: worker process
www 2156379 0.0 0.5 213960 41872 ? S Oct15 0:00 _ nginx: worker process
www 2156380 0.0 0.5 213960 40176 ? S Oct15 0:00 _ nginx: worker process
www 2156381 0.0 0.5 213960 39088 ? S Oct15 0:00 _ nginx: worker process
www 2156382 0.0 0.2 192620 18488 ? S Oct15 0:00 _ nginx: cache manager process
root 1569492 0.0 0.1 188768 13180 ? Ss Oct01 0:26 php-fpm: master process (/www/serv
root 2188168 0.0 0.7 181696 54976 ? Ss Oct15 0:04 /usr/lib/systemd/systemd-journald
root 2188251 0.0 0.2 186084 15716 ? S Oct15 0:01 WorkerMan: worker process monitor
root 4189844 0.0 0.2 186084 16000 ? S Oct15 0:01 WorkerMan: worker process monitor
root 1804165 0.0 0.1 186084 15008 ? S Oct15 0:00 WorkerMan: worker process monitor
root 2339500 0.0 0.5 454344 44396 ? Ssl Oct15 0:01 /usr/libexec/platform-python -s /u
root 2343267 0.0 0.3 264864 24644 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343268 0.0 0.2 188132 17888 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343269 0.0 0.2 188132 17764 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343270 0.0 0.3 264864 24644 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343271 0.0 0.2 188132 19420 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343272 0.0 0.2 186084 16008 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343273 0.0 0.2 188132 17768 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343274 0.0 0.2 186084 16008 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343275 0.0 0.2 188132 18056 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343276 0.0 0.2 186084 16008 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343277 0.0 0.3 264876 24644 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343278 0.0 0.2 188132 17888 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343279 0.0 0.2 188132 17888 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343280 0.0 0.3 264864 24644 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343281 0.0 0.3 264864 25496 ? S Oct15 0:00 WorkerMan: worker process webman
root 2343282 0.0 0.2 186084 15752 ? S Oct15 0:00 WorkerMan: worker process monitor
我停了服务后,查了哪些进程在监听8787,发现有很多,然后都杀了,再启动就行了
服务器上重新创建一个空的webman项目,config/sever.php 端口改成 8686 ,然后启动,停止,启动看下是否有问题。
php start.php start(正常)
Ctrl + C 停止 (正常)
php start.php start -d(正常)
php start.php stop(正常)
workerman.log:
2024-10-16 11:39:20 pid:2368506 Workerman[start.php] start in DEBUG mode
2024-10-16 11:39:49 pid:2368506 Workerman[start.php] stopping ...
2024-10-16 11:39:49 pid:2368506 Workerman[start.php] has been stopped
2024-10-16 11:40:08 pid:2368531 Workerman[start.php] start in DAEMON mode
2024-10-16 11:40:27 pid:2368557 Workerman[start.php] stop
2024-10-16 11:40:27 pid:2368557 Workerman[start.php] is stopping ...
2024-10-16 11:40:27 pid:2368533 Workerman[start.php] stopping ...
2024-10-16 11:40:27 pid:2368533 Workerman[start.php] has been stopped
2024-10-16 11:40:27 pid:2368557 Workerman[start.php] stop success
2024-10-16 11:40:35 pid:2368558 Workerman[start.php] start in DEBUG mode
2024-10-16 11:40:40 pid:2368558 Workerman[start.php] stopping ...
2024-10-16 11:40:40 pid:2368558 worker[webman:2368574] exit with status 1
2024-10-16 11:40:40 pid:2368558 worker[monitor:2368575] exit with status 1
2024-10-16 11:40:40 pid:2368558 Workerman[start.php] has been stopped
stdout.log:
空
https://www.workerman.net/download/php/php-8.2-linux-x86_64.tar.gz
下载这个静态php,解压后得到一个php
然后使用静态php 启动停止你的正式项目试下是否正常,排除你的php版本有bug
启动停止方式(启动前保证进程都已经正确停止)
./php start.php start -d
./php start.php stop
使用这个静态php可以启动和停止,没有报错。
上次我把残留的进程都 kill 了,然后多次启停尝试,目前没有再出现那个问题,之前或许是我自己哪里没弄好。
可能是php版本的bug,升级php版本或者使用静态php都可以
好的,感谢!