0

i'm Having a lot of issues to make this work, here is my files

server1.properties



############################# Server Basics #############################
process.roles=broker,controller
node.id=1
controller.quorum.voters=1@ip:19092,2@ip:19093,3@ip:19094

listeners=BROKER://ip:9092,CONTROLLER://ip:19092,SASL_SSL://ip:9095
advertised.listeners=BROKER://ip:9092,SASL_SSL://ip:9095
listener.security.protocol.map=BROKER:SASL_PLAINTEXT,CONTROLLER:SASL_PLAINTEXT,SASL_SSL:SASL_SSL


inter.broker.listener.name=BROKER
controller.listener.names=CONTROLLER

ssl.truststore.location=/etc/pki/root/host.server.truststore.jks
ssl.truststore.password=removed
ssl.keystore.location=/etc/pki/root/host.server.keystore.jks
ssl.keystore.password=removed
ssl.key.password=removed

sasl.enabled.mechanisms=PLAIN
sasl.mechanism.controller.protocol=PLAIN
sasl.mechanism.inter.broker.protocol=PLAIN

listener.name.broker.plain.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
    username="removed" \
    password="removed" \
    user_admin="removed";

listener.name.controller.plain.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
    username="removed" \
    password="removed" \
    user_admin="removed";


# The number of threads that the server uses for receiving requests from the network and sending responses to the network
num.network.threads=3

# The number of threads that the server uses for processing requests, which may include disk I/O
num.io.threads=8

# The send buffer (SO_SNDBUF) used by the socket server
socket.send.buffer.bytes=102400

# The receive buffer (SO_RCVBUF) used by the socket server
socket.receive.buffer.bytes=102400

# The maximum size of a request that the socket server will accept (protection against OOM)
socket.request.max.bytes=104857600


############################# Log Basics #############################

# A comma separated list of directories under which to store log files
log.dirs=/tmp/server1/kraft-combined-logs

# The default number of log partitions per topic. More partitions allow greater
# parallelism for consumption, but this will also result in more files across
# the brokers.
num.partitions=1

# The number of threads per data directory to be used for log recovery at startup and flushing at shutdown.
# This value is recommended to be increased for installations with data dirs located in RAID array.
num.recovery.threads.per.data.dir=1

############################# Internal Topic Settings  #############################
# The replication factor for the group metadata internal topics "__consumer_offsets" and "__transaction_state"
# For anything other than development testing, a value greater than 1 is recommended to ensure availability such as 3.
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1


############################# Log Retention Policy #############################

# The following configurations control the disposal of log segments. The policy can
# be set to delete segments after a period of time, or after a given size has accumulated.
# A segment will be deleted whenever *either* of these criteria are met. Deletion always happens
# from the end of the log.

# The minimum age of a log file to be eligible for deletion due to age
log.retention.hours=1

# A size-based retention policy for logs. Segments are pruned from the log unless the remaining
# segments drop below log.retention.bytes. Functions independently of log.retention.hours.
#log.retention.bytes=1073741824

# The maximum size of a log segment file. When this size is reached a new log segment will be created.
log.segment.bytes=1073741824

# The interval at which log segments are checked to see if they can be deleted according
# to the retention policies
log.retention.check.interval.ms=300000

server2.properties and server3.properties are copies of the server1.properties, just changing the node.id and ports

client.properties

bootstrap.servers=ip:9092
security.protocol=SSL
ssl.truststore.location=/etc/pki/root/host.server.truststore.jks
ssl.truststore.password=removed
ssl.keystore.location=/etc/pki/root/host.server.keystore.jks
ssl.keystore.password=removed
ssl.key.password=removed

kafka.log seems to start just fine and no problems on it, but when i try to create a topic with the command:

/opt/kafka/bin/kafka-topics.sh --create --topic test --bootstrap-server ip:9092 --command-config /opt/kafka/config/kraft/SSL/client.properties

the problem is showed as :

WARN [AdminClient clientId=adminclient-1] Connection to node -1 (/ip:9092) terminated during authentication. This may happen due to any of the following reasons: (1) Authentication failed due to invalid credentials with brokers older than 1.0.0, (2) Firewall blocking Kafka TLS traffic (eg it may only allow HTTPS traffic), (3) Transient network issue. (org.apache.kafka.clients.NetworkClient)

if I use the port 9095 it gave this:

WARN [AdminClient clientId=adminclient-1] Connection to node -1 (/ip:9095) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) 

With SASL_Plaintext it works fine, also for just Plaintext

4
  • To rule out network or client certificate issues, do the commands work on the brokers themselves? Commented May 6, 2024 at 15:24
  • @OneCricketeer, interbroker communication works fine, no errors showed on the log Commented May 6, 2024 at 15:31
  • I meant the topic creation command. That's ran locally from the broker, or a different system? Commented May 6, 2024 at 15:37
  • @OneCricketeer is running locally Commented May 6, 2024 at 15:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.