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

updateApiVersions 报错 [ERROR] [10753] Unknown[385] #72

Open
bearzlh opened this issue Sep 2, 2022 · 3 comments
Open

updateApiVersions 报错 [ERROR] [10753] Unknown[385] #72

bearzlh opened this issue Sep 2, 2022 · 3 comments

Comments

@bearzlh
Copy link

bearzlh commented Sep 2, 2022

  • 你遇到了什么问题?
    报错日志如下,多发于hyperf一段时间无访问时再次访问出错。频繁访问没有报错
    PHP Warning: Uninitialized string offset 0 in /www/hyperf-skeleton/vendor/longlang/phpkafka/src/Protocol/Type/UVarInt.php on line 41

Warning: Uninitialized string offset 0 in /www/hyperf-skeleton/vendor/longlang/phpkafka/src/Protocol/Type/UVarInt.php on line 41
[ERROR] [10753] Unknown[385] in /www/hyperf-skeleton/vendor/longlang/phpkafka/src/Protocol/ErrorCode.php
[ERROR] #0 /www/hyperf-skeleton/vendor/longlang/phpkafka/src/Client/SyncClient.php(196): longlang\phpkafka\Protocol\ErrorCode::check(10753)
#1 /www/hyperf-skeleton/vendor/longlang/phpkafka/src/Client/SyncClient.php(103): longlang\phpkafka\Client\SyncClient->updateApiVersions()
#2 /www/hyperf-skeleton/vendor/longlang/phpkafka/src/Client/SwooleClient.php(52): longlang\phpkafka\Client\SyncClient->connect()
#3 /www/hyperf-skeleton/vendor/longlang/phpkafka/src/Broker.php(174): longlang\phpkafka\Client\SwooleClient->connect()
#4 /www/hyperf-skeleton/vendor/longlang/phpkafka/src/Broker.php(156): longlang\phpkafka\Broker->getClientByBrokerId(1001)
#5 /www/hyperf-skeleton/vendor/longlang/phpkafka/src/Producer/Producer.php(160): longlang\phpkafka\Broker->getClient(1001)
#6 /www/hyperf-skeleton/vendor/hyperf/kafka/src/Producer.php(94): longlang\phpkafka\Producer\Producer->sendBatch(Array)
#7 [internal function]: Hyperf\Kafka\Producer->Hyperf\Kafka{closure}()
#8 /www/hyperf-skeleton/vendor/hyperf/kafka/src/Producer.php(148): Closure->call(Object(Hyperf\Kafka\Producer))
#9 {main}

  • Kafka 环境是自建还是云服务?
    docker环境
    cat docker-compose.yml
version: '2'
services:
  zookeeper:
    image: zookeeper:3.5
    ports:
      - "2182:2181"
  kafka:
    image: wurstmeister/kafka
    depends_on: [ zookeeper ]
    ports:
      - "9092:9092"
    environment:
      KAFKA_ADVERTISED_HOST_NAME: 192.168.0.90
      KAFKA_CREATE_TOPICS: "cps_static:1:1"
      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
      #KAFKA_HOME: "/opt/kafka_2.12-2.4.1"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
  kafka-manager:
    image: kafkamanager/kafka-manager
    depends_on:
      - zookeeper
    ports:
      - "8084:9000"
    environment:
      ZK_HOSTS: zookeeper:2181
  • 请执行下面的命令获取环境信息。

php -v & php --ri swoole & composer info | grep longlang/phpkafka

[1] 72185
[2] 72186
PHP 8.0.12 (cli) (built: Oct 21 2021 14:38:26) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.12, Copyright (c) Zend Technologies
    with Yasd v0.3.9-alpha, Our Copyright, by codinghuang
[1]  - 72185 done       php -v

swoole

Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 5.0.0
Built => Aug 23 2022 18:14:26
coroutine => enabled with boost asm context
kqueue => enabled
rwlock => enabled
openssl => OpenSSL 3.0.0 7 sep 2021
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
pcre => enabled
zlib => 1.2.11
brotli => E16777225/D16777225
mysqlnd => enabled
async_redis => enabled

Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 262144 => 262144
[2]  + 72186 done       php --ri swoole
longlang/phpkafka                       v1.2.1  A kafka client. Support php-fpm and Swoole.

  • 提供最小可复现代码:
无法复现
@xingcy08
Copy link

我也报这个了,每天凌晨的时候会报那么两三次

@jdbaha
Copy link

jdbaha commented May 19, 2023

Same problem

@crazyfd
Copy link

crazyfd commented Sep 27, 2023

同样的问题,Uninitialized string offset 0[41] in vendor/longlang/phpkafka/src/Protocol/Type/UVarInt.php

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

No branches or pull requests

4 participants