Blizzard / Blizzard/node-rdkafka

Connection error with Docker node:17-alpine

Open
#952 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.2k
Forks
403
PR merge metrics
No merged PRs in 30d

Description

Running a basic consumer on node:17-alpine is causing errors when connecting to Confluent Cloud. **Dropping down to node:10-alpine solves the problem**

The same code, outside of docker, can connect to a confluent cloud instance
Inside the docker container with node:17-alpine, we receive the following:

```
LibrdKafkaError: Local: Broker transport failure
at Function.createLibrdkafkaError [as create] (/usr/local/app/node_modules/node-rdkafka/lib/error.js:454:10)
at /usr/local/app/node_modules/node-rdkafka/lib/client.js:350:28 {
origin: 'local',
message: 'broker transport failure',
code: -195,
errno: -195
}
Something went wrong:
Error: broker transport failure
```

An identical Dockerfile with node:10-alpine does not have the same issue

Dockerfile, for reference

```
FROM node:10-alpine

RUN apk --no-cache add \
bash \
g++ \
ca-certificates \
lz4-dev \
musl-dev \
cyrus-sasl-dev \
openssl-dev \
make \
python3

RUN apk add --no-cache --virtual .build-deps gcc zlib-dev libc-dev bsd-compat-headers py-setuptools bash

# Create app directory
RUN mkdir -p /usr/local/app
WORKDIR /usr/local/app

COPY package*.json ./
COPY .npmrc ./

RUN npm install

COPY . .

RUN rm -f .npmrc

RUN npm run build

EXPOSE 3000
CMD [ "npm", "run", "start" ]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.