[pulsar-manager] 无法创建 environment,broker 会报错:exception io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 5253120: 1195725860

无法创建 environment,broker 会报错:exception io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 5253120: 1195725860 - discarded

# docker-compose.yml
---
version: "3.7"
services:
  pulsar:
    image: apachepulsar/pulsar:2.10.1
    environment:
    - PULSAR_MEM=-Xms512m -Xmx512m -XX:MaxDirectMemorySize=1g
    - PULSAR_PREFIX_defaultRetentionTimeInMinutes=14400
    - PULSAR_PREFIX_defaultRetentionSizeInMB=1000
   #  - PULSAR_PREFIX_httpServerEnabled=true
    - PULSAR_PREFIX_bookkeeperClientExposeStatsToPrometheus=true
    - PULSAR_PREFIX_transactionCoordinatorEnabled=true
    # - PULSAR_PREFIX_nettyMaxFrameSizeBytes=5,253,120 # default
    # - PULSAR_PREFIX_nettyMaxFrameSizeBytes=1,195,725,860
    # command: bin/pulsar standalone
    command: >
      /bin/bash -c
      "bin/apply-config-from-env.py conf/standalone.conf && bin/pulsar standalone"
    hostname: pulsar
    ports:
      - "8090:8080"
      - "6650:6650"
    restart: unless-stopped
    volumes:
      - "./data/:/pulsar/data"
  dashboard:
    image: apachepulsar/pulsar-manager:v0.3.0
    ports:
      - "8091:9527"
      - "7750:7750"
    depends_on:
      - pulsar
    links:
      - pulsar
    environment:
      SPRING_CONFIGURATION_FILE: /pulsar-manager/pulsar-manager/application.properties
      USERNAME: "pulsar"
      PASSWORD: "pulsar"
...

已解决,bookie url 和 service url 填反了。

2 Likes

如果用外部的postgresql数据库,其中username和password怎么填

应该是一样的操作,调用接口,现在好像不支持 通过 env 传入。

CSRF_TOKEN=$(curl http://backend-service:7750/pulsar-manager/csrf-token)
curl \
    -H "X-XSRF-TOKEN: $CSRF_TOKEN" \
    -H "Cookie: XSRF-TOKEN=$CSRF_TOKEN;" \
    -H 'Content-Type: application/json' \
    -X PUT http://backend-service:7750/pulsar-manager/users/superuser \
    -d '{"name": "admin", "password": "apachepulsar", "description": "test", "email": "username@test.org"}'