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

Retryable Exception #343

Open
tomasantunes opened this issue Oct 3, 2023 · 3 comments
Open

Retryable Exception #343

tomasantunes opened this issue Oct 3, 2023 · 3 comments

Comments

@tomasantunes
Copy link

I'm getting the following error when trying to create a producer with Pulsar Node JS client:

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: Failed to create producer: Retryable]
@shibd
Copy link
Member

shibd commented Oct 7, 2023

Can you share your reproduction code?

@viktorvsk
Copy link

viktorvsk commented Dec 31, 2023

I face the same issue when deploying with 3.1.x docker-compose. If I docker-compose up the default compose from the site on my host and connect to it with pulsar://127.0.0.1:6650 it works as expected. However, if I add my producer service into docker-compose file along with simple redis as:

  worker:
    restart: unless-stopped
    networks:
      - pulsar
    command: node src/worker.js
    environment:
      REDIS_URL: redis://redis:6379
      PULSAR_URL: pulsar://broker:6650
    build:
      context: .
    deploy:
      replicas: 3
    depends_on:
      zookeeper:
        condition: service_healthy
      redis:
        condition: service_healthy
      bookie:
        condition: service_started
  redis:
    image: redis:7
    networks:
      - pulsar
    volumes:
      - ./redis-data:/data
    command: redis-server --io-threads 4 --io-threads-do-reads yes --appendonly no --maxmemory-policy noeviction --bind 0.0.0.0 --maxclients 100000 --tcp-backlog 100000
    healthcheck:
      test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
      interval: 3s
      timeout: 5s
      retries: 5

I got this error [Error: Failed to create producer: Retryable]

I verified that broker is pingable from worker container, tried different combinations of networks and other stuff, still can't figure out what could be the issue

Producer code is also default, if simplified:

const URL = process.env.PULSAR_URL || 'pulsar://127.0.0.1:6650';
export const client = new PulsarClient.Client({serviceUrl: URL});
await client.createProducer({topic: 'my-topic',sendTimeoutMs: 1000}).catch(console.error);

UPD Fixed it by changing env variable for broker service from - advertisedListeners=external:pulsar://127.0.0.1:6650 to - advertisedListeners=external:pulsar://broker:6650

@slobberbone
Copy link

slobberbone commented May 27, 2024

@tomasantunes For your information , I reproduce the trouble with the 1.11.0 of the pulsar-client, but no trouble with 1.10.0 ...

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