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

[QUESTION] 项目开启crontab任务出现错误 #6650

Open
leizhishang opened this issue Apr 2, 2024 · 10 comments
Open

[QUESTION] 项目开启crontab任务出现错误 #6650

leizhishang opened this issue Apr 2, 2024 · 10 comments
Labels
question Further information is requested

Comments

@leizhishang
Copy link

项目启动时出现以下问题,如果没有开启crontab,就不会出现
Fatal error: Uncaught Swoole\Error: Socket#1 has already been bound to another coroutine#2, writing of the same socket in coroutine#3 at the same time is not allowed in /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php:76
Stack trace:
#0 /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php(76): fwrite()
#1 /wwwroot/firefree_api/vendor/symfony/console/Output/Output.php(166): Symfony\Component\Console\Output\StreamOutput->doWrite()
#2 /wwwroot/firefree_api/vendor/symfony/console/Output/Output.php(132): Symfony\Component\Console\Output\Output->write()
#3 /wwwroot/firefree_api/vendor/hyperf/framework/src/Logger/StdoutLogger.php(138): Symfony\Component\Console\Output\Output->writeln()
#4 /wwwroot/firefree_api/vendor/hyperf/framework/src/Logger/StdoutLogger.php(113): Hyperf\Framework\Logger\StdoutLogger->log()
#5 /wwwroot/firefree_api/vendor/hyperf/event/src/EventDispatcher.php(75): Hyperf\Framework\Logger\StdoutLogger->debug()
#6 /wwwroot/firefree_api/vendor/hyperf/event/src/EventDispatcher.p in /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php on line 76
[2024-04-02 04:19:00 *195.3] ERROR php_swoole_server_rshutdown (ERRNO 503): Fatal error: Uncaught Swoole\Error: Socket#1 has already been bound to another coroutine#2, writing of the same socket in coroutine#3 at the same time is not allowed in /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php:76
Stack trace:
#0 /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php(76): fwrite()
#1 /wwwroot/firefree_api/vendor/symfony/console/Output/Output.php(166): Symfony\Component\Console\Output\StreamOutput->doWrite()
#2 /wwwroot/firefree_api/vendor/symfony/console/Output/Output.php(132): Symfony\Component\Console\Output\Output->write()
#3 /wwwroot/firefree_api/vendor/hyperf/framework/src/Logger/StdoutLogger.php(138): Symfony\Component\Console\Output\Output->writeln()
#4 /wwwroot/firefree_api/vendor/hyperf/framework/src/Logger/StdoutLogger.php(113): Hyperf\Framework\Logger\StdoutLogger->log()
#5 /wwwroot/firefree_api/vendor/hyperf/event/src/EventDispatcher.php(75): Hyperf\Framework\Logger\StdoutLogger->debug()
#6 /wwwroot/firefree_api/vendor/hyperf/event/src/EventDispatcher.p in /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php on line 76

Fatal error: Uncaught Swoole\Error: Socket#1 has already been bound to another coroutine#3, writing of the same socket in coroutine#4 at the same time is not allowed in /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php:76
Stack trace:
#0 /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php(76): fwrite()
#1 /wwwroot/firefree_api/vendor/symfony/console/Output/Output.php(166): Symfony\Component\Console\Output\StreamOutput->doWrite()
#2 /wwwroot/firefree_api/vendor/symfony/console/Output/Output.php(132): Symfony\Component\Console\Output\Output->write()
#3 /wwwroot/firefree_api/vendor/hyperf/framework/src/Logger/StdoutLogger.php(138): Symfony\Component\Console\Output\Output->writeln()
#4 /wwwroot/firefree_api/vendor/hyperf/framework/src/Logger/StdoutLogger.php(113): Hyperf\Framework\Logger\StdoutLogger->log()
#5 /wwwroot/firefree_api/vendor/hyperf/event/src/EventDispatcher.php(75): Hyperf\Framework\Logger\StdoutLogger->debug()
#6 /wwwroot/firefree_api/vendor/hyperf/event/src/EventDispatcher.p in /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php on line 76
[2024-04-02 04:19:00 *193.1] ERROR php_swoole_server_rshutdown (ERRNO 503): Fatal error: Uncaught Swoole\Error: Socket#1 has already been bound to another coroutine#3, writing of the same socket in coroutine#4 at the same time is not allowed in /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php:76
Stack trace:
#0 /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php(76): fwrite()
#1 /wwwroot/firefree_api/vendor/symfony/console/Output/Output.php(166): Symfony\Component\Console\Output\StreamOutput->doWrite()
#2 /wwwroot/firefree_api/vendor/symfony/console/Output/Output.php(132): Symfony\Component\Console\Output\Output->write()
#3 /wwwroot/firefree_api/vendor/hyperf/framework/src/Logger/StdoutLogger.php(138): Symfony\Component\Console\Output\Output->writeln()
#4 /wwwroot/firefree_api/vendor/hyperf/framework/src/Logger/StdoutLogger.php(113): Hyperf\Framework\Logger\StdoutLogger->log()
#5 /wwwroot/firefree_api/vendor/hyperf/event/src/EventDispatcher.php(75): Hyperf\Framework\Logger\StdoutLogger->debug()
#6 /wwwroot/firefree_api/vendor/hyperf/event/src/EventDispatcher.p in /wwwroot/firefree_api/vendor/symfony/console/Output/StreamOutput.php on line 76

@leizhishang leizhishang added the question Further information is requested label Apr 2, 2024
@limingxinleo
Copy link
Member

php 版本
hyperf 版本
swoole 版本

@leizhishang
Copy link
Author

php 7.4.33
hyperf 2.2.0
swoole 4.6.1

@leizhishang
Copy link
Author

4820-bfb4-918370a9ecc1
4242d8d0-0a7d-43e5-8d64-7fcf1345fb1e
这是使用的组件情况

@leizhishang
Copy link
Author

27b987782
-8cbf-6e0b77c5f3f2
这是测试定时任务

@limingxinleo
Copy link
Member

dump 改成 var_dump

要么升级 Hyperf PHP 和 Swoole 到最新再看看

@leizhishang
Copy link
Author

改完还是一样的.

@limingxinleo
Copy link
Member

截图看看

@leizhishang
Copy link
Author

image image

@limingxinleo
Copy link
Member

代码截图

@limingxinleo
Copy link
Member

不用了,升级版本试试看吧,Swoole 升级到 4.8

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

No branches or pull requests

2 participants