-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
KAFKA-7312: Change broker port used in testMinimumRequestTimeouts and testForceClose #6360
Conversation
@@ -1062,7 +1062,7 @@ class AdminClientIntegrationTest extends IntegrationTestHarness with Logging { | |||
@Test | |||
def testMinimumRequestTimeouts(): Unit = { | |||
val config = createConfig() | |||
config.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:22") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ijuma Is there any specific reason for using port 22 (default SSH port) here? Due to this, some times the test is failing with out of memory .
java.lang.OutOfMemoryError: Java heap space
at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
at org.apache.kafka.common.memory.MemoryPool$1.tryAllocate(MemoryPool.java:30)
at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:112)
at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:424)
at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:385)
at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:640)
at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:561)
at org.apache.kafka.common.network.Selector.poll(Selector.java:472)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:535)
at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:1140)
at java.lang.Thread.run(Thread.java:748)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird, I don't know why that was chosen. Good find!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should have a constant for incorrect port and reuse it. Have we verified the 222 is not used by anything?
…tMinimumRequestTimeouts, testForceClose) tests
@ijuma I have used port 225 as incorrect broker port. port 225 is a reserved port. Pls take a look. |
retest this please |
@@ -71,6 +71,9 @@ object TestUtils extends Logging { | |||
/* 0 gives a random port; you can then retrieve the assigned port from the Socket object. */ | |||
val RandomPort = 0 | |||
|
|||
/* Incorrect broker port which can used by kafka clients in tests. */ | |||
val incorrectBrokerPort = 225 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add something like: "this port should not be used by any other service and hence we use a reserved port"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a couple of minor changes to fix the naming convention of IncorrectBrokerPort. LGTM now.
retest this please |
… testForceClose Port 22 is used by ssh, which causes the AdminClient to throw an OOM: > java.lang.OutOfMemoryError: Java heap space > at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57) > at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) > at org.apache.kafka.common.memory.MemoryPool$1.tryAllocate(MemoryPool.java:30) > at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:112) > at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:424) > at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:385) > at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:640) > at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:561) > at org.apache.kafka.common.network.Selector.poll(Selector.java:472) > at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:535) > at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:1140) > at java.lang.Thread.run(Thread.java:748) > > Author: Manikumar Reddy <manikumar.reddy@gmail.com> Author: Ismael Juma <ismael@juma.me.uk> Reviewers: Ismael Juma <ismael@juma.me.uk> Closes #6360 from omkreddy/KAFKA-7312 (cherry picked from commit 9ee5f92) Signed-off-by: Manikumar Reddy <manikumar@confluent.io>
… testForceClose Port 22 is used by ssh, which causes the AdminClient to throw an OOM: > java.lang.OutOfMemoryError: Java heap space > at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57) > at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) > at org.apache.kafka.common.memory.MemoryPool$1.tryAllocate(MemoryPool.java:30) > at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:112) > at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:424) > at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:385) > at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:640) > at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:561) > at org.apache.kafka.common.network.Selector.poll(Selector.java:472) > at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:535) > at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:1140) > at java.lang.Thread.run(Thread.java:748) > > Author: Manikumar Reddy <manikumar.reddy@gmail.com> Author: Ismael Juma <ismael@juma.me.uk> Reviewers: Ismael Juma <ismael@juma.me.uk> Closes #6360 from omkreddy/KAFKA-7312 (cherry picked from commit 9ee5f92) Signed-off-by: Manikumar Reddy <manikumar@confluent.io>
… testForceClose Port 22 is used by ssh, which causes the AdminClient to throw an OOM: > java.lang.OutOfMemoryError: Java heap space > at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57) > at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) > at org.apache.kafka.common.memory.MemoryPool$1.tryAllocate(MemoryPool.java:30) > at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:112) > at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:424) > at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:385) > at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:640) > at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:561) > at org.apache.kafka.common.network.Selector.poll(Selector.java:472) > at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:535) > at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:1140) > at java.lang.Thread.run(Thread.java:748) > > Author: Manikumar Reddy <manikumar.reddy@gmail.com> Author: Ismael Juma <ismael@juma.me.uk> Reviewers: Ismael Juma <ismael@juma.me.uk> Closes #6360 from omkreddy/KAFKA-7312 (cherry picked from commit 9ee5f92) Signed-off-by: Manikumar Reddy <manikumar@confluent.io>
… testForceClose Port 22 is used by ssh, which causes the AdminClient to throw an OOM: > java.lang.OutOfMemoryError: Java heap space > at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57) > at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) > at org.apache.kafka.common.memory.MemoryPool$1.tryAllocate(MemoryPool.java:30) > at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:112) > at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:424) > at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:385) > at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:640) > at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:561) > at org.apache.kafka.common.network.Selector.poll(Selector.java:472) > at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:535) > at org.apache.kafka.clients.admin.KafkaAdminClient$AdminClientRunnable.run(KafkaAdminClient.java:1140) > at java.lang.Thread.run(Thread.java:748) > > Author: Manikumar Reddy <manikumar.reddy@gmail.com> Author: Ismael Juma <ismael@juma.me.uk> Reviewers: Ismael Juma <ismael@juma.me.uk> Closes apache#6360 from omkreddy/KAFKA-7312
Port 22 is used by ssh, which causes the AdminClient to throw an OOM:
Committer Checklist (excluded from commit message)