i am having problem in deploying broker continer in azure container help me deploy when i solve one issue other occur

Scholarship Xpert 0 Reputation points
2024-09-09T06:30:43.63+00:00

broker--e5s63uf

Degraded(View details)

Deployment Progress Deadline Exceeded. 0/1 replicas ready. The TargetPort 29093 does not match any of the listening ports: [9093 9092 39175].

Docker file now it is working but interservice connectivity is not happening

# Use the official Apache Kafka image
FROM apache/kafka:3.7.0

# Set environment variables for KRaft mode configuration
ENV KAFKA_NODE_ID=1 \
    KAFKA_LISTENER_SECURITY_PROTOCOL_MAP='CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT' \
    KAFKA_ADVERTISED_LISTENERS='PLAINTEXT://broker.internal.victoriousdune-82388821a1.eastus.azurecontainerapps.io:9092,CONTROLLER://broker.internal.victoriousdune-82388821a1.eastus.azurecontainerapps.io:29093' \
    KAFKA_PROCESS_ROLES='broker,controller' \
    KAFKA_CONTROLLER_QUORUM_VOTERS='1@broker.internal.victoriousdune-82883821a1.eastus.azurecontainerapps.io:29093' \
    KAFKA_LISTENERS='CONTROLLER://0.0.0.0:29093,PLAINTEXT://0.0.0.0:9092' \
    KAFKA_INTER_BROKER_LISTENER_NAME='PLAINTEXT' \
    KAFKA_CONTROLLER_LISTENER_NAMES='CONTROLLER' \
    CLUSTER_ID='4L6g3nShT-eMCtK--X86sw' \
    KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 \
    KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 \
    KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1 \
    KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 \
    KAFKA_LOG_DIRS='/tmp/kraft-combined-logs' \
    KAFKA_LOG_RETENTION_MS=604800000 \
    KAFKA_LOG_RETENTION_BYTES=-1 \
    KAFKA_LOG_SEGMENT_BYTES=1073741824 \
    KAFKA_LOG_CLEANER_ENABLE=true \
    KAFKA_DELETE_TOPIC_ENABLE=true \
    KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"

# Set the working directory
WORKDIR /opt/kafka

# Create log directories and set ownership for appuser
RUN mkdir -p /tmp/kraft-combined-logs /opt/kafka/logs && \
    chmod -R 777 /tmp/kraft-combined-logs /opt/kafka/logs

# Expose the necessary ports for Kafka and KRaft
EXPOSE 9092 29093

# Format the storage directory for KRaft mode and start Kafka
CMD ["sh", "-c", "/opt/kafka/bin/kafka-storage.sh format --ignore-formatted --config /opt/kafka/config/kraft/server.properties --cluster-id $CLUSTER_ID && /opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/kraft/server.properties"]

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
444 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.