Closed songguoxiong closed 3 years ago
@sy-records
这个只能自己改代码或者关闭hook sockets。创建的时候不在协程里没有hook,在协程里的时候被hook,类型不对了
暂时先关闭hook,后面会解决。
!defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_SOCKETS);
原来的问题没有了,有了新的报错。 好像是swoole返回的类型和原生的类型不一致,原生是int | bool,swoole是int
[WARNING] TypeError: Return value of swoole_socket_write() must be of the type int, bool returned(0) in @swoole-src/library/ext/sockets.php:37
Stack trace:
#0 [internal function]: swoole_socket_write(Object(Swoole\Coroutine\Socket), '\x82\x81\x00\x0FemitZipkinB...')
#1 xxx/vendor/hyperf/tracer/class_map/ThriftUdpTransport.php(163): socket_write(Object(Swoole\Coroutine\Socket), '\x82\x81\x00\x0FemitZipkinB...')
#2 xxx/vendor/hyperf/tracer/class_map/ThriftUdpTransport.php(144): Jaeger\ThriftUdpTransport->doWrite('\x82\x81\x00\x0FemitZipkinB...')
#3 [internal function]: Jaeger\ThriftUdpTransport->Jaeger\{closure}()
#4 xxx/vendor/hyperf/tracer/class_map/ThriftUdpTransport.php(180): Closure->call(Object(Jaeger\ThriftUdpTransport))
#5 xxx/vendor/hyperf/utils/src/Functions.php(271): Jaeger\ThriftUdpTransport->Jaeger\{closure}()
#6 xxx/vendor/hyperf/utils/src/Coroutine.php(62): call(Object(Closure))
#7 {main}
@sy-records
原来的问题没有了,有了新的报错。 好像是swoole返回的类型和原生的类型不一致,原生是int | bool,swoole是int
[WARNING] TypeError: Return value of swoole_socket_write() must be of the type int, bool returned(0) in @swoole-src/library/ext/sockets.php:37 Stack trace: #0 [internal function]: swoole_socket_write(Object(Swoole\Coroutine\Socket), '\x82\x81\x00\x0FemitZipkinB...') #1 xxx/vendor/hyperf/tracer/class_map/ThriftUdpTransport.php(163): socket_write(Object(Swoole\Coroutine\Socket), '\x82\x81\x00\x0FemitZipkinB...') #2 xxx/vendor/hyperf/tracer/class_map/ThriftUdpTransport.php(144): Jaeger\ThriftUdpTransport->doWrite('\x82\x81\x00\x0FemitZipkinB...') #3 [internal function]: Jaeger\ThriftUdpTransport->Jaeger\{closure}() #4 xxx/vendor/hyperf/tracer/class_map/ThriftUdpTransport.php(180): Closure->call(Object(Jaeger\ThriftUdpTransport)) #5 xxx/vendor/hyperf/utils/src/Functions.php(271): Jaeger\ThriftUdpTransport->Jaeger\{closure}() #6 xxx/vendor/hyperf/utils/src/Coroutine.php(62): call(Object(Closure)) #7 {main}
大佬,解决了吗?我遇到这样的情况??? @songguoxiong
原来的问题了,随之而来的新的报错 好像是羊毛返回的类型和自己的类型没有特征,本身就是int | bool,swoole 是int
[WARNING] TypeError: Return value of swoole_socket_write() must be of the type int, bool returned(0) in @swoole-src/library/ext/sockets.php:37 Stack trace: #0 [internal function]: swoole_socket_write(Object(Swoole\Coroutine\Socket), '\x82\x81\x00\x0FemitZipkinB...') #1 xxx/vendor/hyperf/tracer/class_map/ThriftUdpTransport.php(163): socket_write(Object(Swoole\Coroutine\Socket), '\x82\x81\x00\x0FemitZipkinB...') #2 xxx/vendor/hyperf/tracer/class_map/ThriftUdpTransport.php(144): Jaeger\ThriftUdpTransport->doWrite('\x82\x81\x00\x0FemitZipkinB...') #3 [internal function]: Jaeger\ThriftUdpTransport->Jaeger\{closure}() #4 xxx/vendor/hyperf/tracer/class_map/ThriftUdpTransport.php(180): Closure->call(Object(Jaeger\ThriftUdpTransport)) #5 xxx/vendor/hyperf/utils/src/Functions.php(271): Jaeger\ThriftUdpTransport->Jaeger\{closure}() #6 xxx/vendor/hyperf/utils/src/Coroutine.php(62): call(Object(Closure)) #7 {main}
大佬,解决了吗?我遇到这样的情况??? @songguoxiong
没有,我们后面swoole回退到了4.5
Execute the command and paste the result below.
Command:
uname -a && php -v && composer info | grep hyperf && php --ri swoole
Description:
hyperf.php里是
docker使用的base镜像是
hyperf/hyperf:7.4-alpine-v3.11-swoole
Steps To Reproduce: