二进制打包出来的bin文件,使用 ./webman status 命名出现报错

hujiao

问题描述

因为项目为微服务架构,我通过 php webman build:bin 进行将应用打包二进制文件,并部署到生产。当我测试查看webman状态时,出现以下报错。

程序代码

./webman.bin status

报错信息

Workerman[./webman.bin] status 

Fatal error: Uncaught TypeError: ksort(): Argument #1 ($array) must be of type array, null given in phar:///data/www/webman/webman.bin/vendor/workerman/workerman/Worker.php:1067
Stack trace:
#0 phar:///data/www/webman/webman.bin/vendor/workerman/workerman/Worker.php(1067): ksort(NULL, 1)
#1 phar:///data/www/webman/webman.bin/vendor/workerman/workerman/Worker.php(969): Workerman\Worker::formatStatusData('/data/www/webma...')
#2 phar:///data/www/webman/webman.bin/vendor/workerman/workerman/Worker.php(552): Workerman\Worker::parseCommand()
#3 phar:///data/www/webman/webman.bin/vendor/workerman/webman-framework/src/support/App.php(131): Workerman\Worker::runAll()
#4 phar:///data/www/webman/webman.bin/vendor/webman/console/src/Commands/StatusCommand.php(29): support\App::run()
#5 phar:///data/www/webman/webman.bin/vendor/symfony/console/Command/Command.php(298): Webman\Console\Commands\StatusCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 phar:///data/www/webman/webman.bin/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 phar:///data/www/webman/webman.bin/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(Webman\Console\Commands\StatusCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 phar:///data/www/webman/webman.bin/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 phar:///data/www/webman/webman.bin/webman(45): Symfony\Component\Console\Application->run()
#10 /data/www/webman/webman.bin(5): require('phar:///data/ww...')
#11 {main}
  thrown in phar:///data/www/webman/webman.bin/vendor/workerman/workerman/Worker.php on line 1067

截图报错信息里报错文件相关代码

操作系统及workerman/webman等框架组件具体版本

服务器信息:Linux VM-20-10-centos 3.10.0-1160.59.1.el7.x86_64 #1 SMP Wed Feb 23 16:47:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

webman版本:Webman-framework v1.5.8

748 1 0
1个回答

walkor 打赏

升级workerman

  • hujiao 2023-08-01

    升级workerman后(版本为:v4.1.13)。启动又报另一种错误了,错误如下:
    ./webman.bin start

    =========================================================================

    Workerman[./webman.bin] start in DEBUG mode
    stream_socket_server(): Unable to connect to tcp://0.0.0.0:8787 (Address in use) in file phar:///data/www/webman/webman.bin/vendor/workerman/workerman/Worker.php on line 2360

    In Worker.php line 2362:

    Address in use

    start [-d|--daemon]

  • hujiao 2023-08-01

    可能端口被占用了,我排查一下

  • hujiao 2023-08-01

    @walkor 感谢你的指点,已经可以了,谢谢!!

年代过于久远,无法发表回答
×
🔝