[BUG] hyperf 3.1 nacos配置中心grpc后报错
jiyang666 opened this issue · comments
Command: uname -a && php -v && composer info | grep hyperf && php --ri swoole
PHP 8.2.19 (cli) (built: May 7 2024 14:19:14) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.19, Copyright (c) Zend Technologies
with Zend OPcache v8.2.19, Copyright (c), by Zend Technologies
friendsofhyperf/lock v3.1.20 The lock component for Hyperf.
hyperf/amqp v3.1.21 A amqplib for hyperf.
hyperf/async-queue v3.1.15 A async queue component for hyperf.
hyperf/cache v3.1.15 A cache component for hyperf.
hyperf/code-parser v3.1.15 A code parser component for Hyperf.
hyperf/codec v3.1.15 A codec component for Hyperf.
hyperf/collection v3.1.21 Hyperf Collection package which come from illuminate/collections
hyperf/command v3.1.15 Command for hyperf
hyperf/conditionable v3.1.15 Hyperf Macroable package which come from illuminate/conditionable
hyperf/config v3.1.15 An independent component that provides configuration container.
hyperf/config-center v3.1.15 The abstraction component of config center
hyperf/config-nacos v3.1.15 A nacos adapter for config center component.
hyperf/constants v3.1.16 A constants component for hyperf.
hyperf/context v3.1.15 A coroutine/application context library.
hyperf/contract v3.1.15 The contracts of Hyperf.
hyperf/coordinator v3.1.21 Hyperf Coordinator
hyperf/coroutine v3.1.15 Hyperf Coroutine
hyperf/crontab v3.1.19 A crontab component for Hyperf.
hyperf/database v3.1.21 A flexible database library.
hyperf/db-connection v3.1.15 A hyperf db connection handler for hyperf/database.
hyperf/devtool v3.1.19 A Devtool for Hyperf.
hyperf/di v3.1.15 A DI for Hyperf.
hyperf/dispatcher v3.1.15 A HTTP Server for Hyperf.
hyperf/engine v2.11.0 Coroutine engine provided by swoole.
hyperf/engine-contract v1.10.1 Contract for Coroutine Engine
hyperf/event v3.1.15 an event manager that implements PSR-14.
hyperf/exception-handler v3.1.15 Exception handler for hyperf
hyperf/filesystem v3.1.15 flysystem integration for hyperf
hyperf/flysystem-oss v1.3.0
hyperf/framework v3.1.15 A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.
hyperf/grpc v3.1.21 A GRPC basic library for Hyperf.
hyperf/guzzle v3.1.15 Swoole coroutine handler for guzzle
hyperf/http-message v3.1.19 microservice framework base on swoole
hyperf/http-server v3.1.17 A HTTP Server for Hyperf.
hyperf/http2-client v3.1.15 A HTTP2 client library for Hyperf.
hyperf/logger v3.1.15 A logger component for hyperf.
hyperf/macroable v3.1.15 Hyperf Macroable package which come from illuminate/macroable
hyperf/memory v3.1.15 An independent component that use to operate and manage memory.
hyperf/model-listener v3.1.15 A model listener for Hyperf.
hyperf/nacos v3.1.15 Nacos SDK
hyperf/paginator v3.1.15 A paginator component for hyperf.
hyperf/pipeline v3.1.15 Hyperf Macroable package which come from illuminate/pipeline
hyperf/pool v3.1.15 An independent universal connection pool component.
hyperf/process v3.1.15 A process component for hyperf.
hyperf/rate-limit v3.1.15 A rate limiter implemented for Hyperf or other coroutine framework
hyperf/redis v3.1.18 A redis component for hyperf.
hyperf/resource v3.1.15 A api resource component for hyperf.
hyperf/serializer v3.1.15 A serializer component for Hyperf.
hyperf/server v3.1.15 A base server library for Hyperf.
hyperf/signal v3.1.15 A signal library for Hyperf.
hyperf/snowflake v3.1.15 A snowflake library
hyperf/stdlib v3.1.15 A stdlib component for Hyperf.
hyperf/stringable v3.1.20 Hyperf Stringable package which come from illuminate/support
hyperf/support v3.1.15 A support component for Hyperf.
hyperf/tappable v3.1.15 Hyperf Macroable package which come from illuminate/tappable
hyperf/testing v3.1.21 Testing for hyperf
hyperf/token-bucket v2.0.0 Implementation of the Token Bucket algorithm.
hyperf/translation v3.1.15 An independent translation component, forked by illuminate/translation.
hyperf/utils v3.1.0 A tools package that could help developer solved the problem quickly.
hyperf/validation v3.1.15 hyperf validation
hyperf/watcher v3.1.21 Hot reload watcher for Hyperf
swoole
Swoole => enabled
Author => Swoole Team <team@swoole.com>
Version => 5.1.1
Built => Apr 7 2024 13:49:24
coroutine => enabled with boost asm context
kqueue => enabled
rwlock => enabled
sockets => enabled
openssl => OpenSSL 3.2.1 30 Jan 2024
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
pcre => enabled
zlib => 1.2.12
mysqlnd => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_fiber_mock => Off => Off
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 262144 => 262144
Description:
[WARNING] Hyperf\Engine\Exception\HttpClientException: Client no connection in /Users/jiyang/project/hyperf-curd/vendor/hyperf/engine/src/Http/V2/Client.php:57
Stack trace:
#0 /Users/jiyang/project/hyperf-curd/vendor/hyperf/http2-client/src/Client.php(198): Hyperf\Engine\Http\V2\Client->recv(-1.0)
#1 /Users/jiyang/project/hyperf-curd/kernel/Context/Coroutine.php(48): Hyperf\Http2Client\Client->Hyperf\Http2Client{closure}()
#2 [internal function]: Kernel\Context\Coroutine->Kernel\Context{closure}()
#3 {main}
[ERROR] Hyperf\Http2Client\Exception\ClientClosedException: http2 client send request failed caused by closed connection. in /Users/jiyang/project/hyperf-curd/vendor/hyperf/http2-client/src/Client.php:86
Stack trace:
#0 /Users/jiyang/project/hyperf-curd/vendor/hyperf/http2-client/src/Client.php(131): Hyperf\Http2Client\Client->send(Object(Hyperf\Engine\Http\V2\Request))
#1 /Users/jiyang/project/hyperf-curd/vendor/hyperf/nacos/src/GrpcClient.php(110): Hyperf\Http2Client\Client->request(Object(Hyperf\Engine\Http\V2\Request))
#2 /Users/jiyang/project/hyperf-curd/vendor/hyperf/nacos/src/GrpcClient.php(297): Hyperf\Nacos\GrpcClient->request(Object(Hyperf\Nacos\Protobuf\Request\ServerCheckRequest))
#3 /Users/jiyang/project/hyperf-curd/vendor/hyperf/nacos/src/GrpcClient.php(176): Hyperf\Nacos\GrpcClient->serverCheck()
#4 /Users/jiyang/project/hyperf-curd/vendor/hyperf/nacos/src/GrpcClient.php(96): Hyperf\Nacos\GrpcClient->reconnect()
#5 /Users/jiyang/project/hyperf-curd/vendor/hyperf/nacos/src/GrpcFactory.php(41): Hyperf\Nacos\GrpcClient->__construct(Object(Hyperf\ConfigNacos\NacosClient), Object(Hyperf\Nacos\Config), Object(Hyperf\Di\Container), '', 'config')
#6 /Users/jiyang/project/hyperf-curd/vendor/hyperf/config-nacos/src/NacosDriver.php(53): Hyperf\Nacos\GrpcFactory->get('', 'config')
#7 /Users/jiyang/project/hyperf-curd/vendor/hyperf/config-center/src/Process/ConfigFetcherProcess.php(70): Hyperf\ConfigNacos\NacosDriver->createMessageFetcherLoop()
#8 /Users/jiyang/project/hyperf-curd/vendor/hyperf/process/src/AbstractProcess.php(101): Hyperf\ConfigCenter\Process\ConfigFetcherProcess->handle()
#9 [internal function]: Hyperf\Process\AbstractProcess->Hyperf\Process{closure}(Object(Swoole\Process))
#10 {main}
^C