-
Notifications
You must be signed in to change notification settings - Fork 1.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
Client has no connection to Kafka anymore after idling for some time #1487
Comments
You can access debug log if you set the library logger: https://github.com/Shopify/sarama/blob/master/tools/kafka-console-producer/kafka-console-producer.go#L45 Can you share the output? |
Hi, I'm working on the same project as weeco, so I've got a log for you 😄 [
// ...
{
"level": "debug",
"ts": "2019-10-04T15:57:27.316+0200",
"msg": "Successful SASL handshake. Available mechanisms: [PLAIN]",
"source": "sarama"
},
{
"level": "debug",
"ts": "2019-10-04T15:57:27.337+0200",
"msg": "SASL authentication successful with broker XXXXXXXXX - [0 0 0 0]",
"source": "sarama"
},
{
"level": "debug",
"ts": "2019-10-04T15:57:27.337+0200",
"msg": "Connected to broker at XXXXXXXXX (registered as #1)",
"source": "sarama"
},
{
"level": "debug",
"ts": "2019-10-04T16:04:26.781+0200",
"msg": "client/metadata fetching metadata for all topics from broker XXXXXXXXX",
"source": "sarama"
},
{
"level": "debug",
"ts": "2019-10-04T16:14:26.781+0200",
"msg": "client/metadata fetching metadata for all topics from broker XXXXXXXXX",
"source": "sarama"
},
{
"level": "error",
"ts": "2019-10-04T16:19:25.782+0200",
"msg": "Sending REST error",
"route": "XXXXXXXXX",
"method": "GET",
"error": "one of the brokers failed to return a list of consumer groups: EOF"
},
{
"level": "warn",
"ts": "2019-10-04T16:22:00.266+0200",
"msg": "Keep alive has errored",
"error": "write tcp XXXXXXXXX->XXXXXXXXX: wsasend: Eine bestehende Verbindung wurde softwaregesteuert\r\ndurch den Hostcomputer abgebrochen."
},
{
"level": "debug",
"ts": "2019-10-04T16:24:26.781+0200",
"msg": "client/metadata fetching metadata for all topics from broker XXXXXXXXX",
"source": "sarama"
},
{
"level": "warn",
"ts": "2019-10-04T16:24:30.472+0200",
"msg": "Keep alive has errored",
"error": "write tcp XXXXXXXXX->XXXXXXXXX: wsasend: Eine bestehende Verbindung wurde softwaregesteuert\r\ndurch den Hostcomputer abgebrochen."
},
{
"level": "warn",
"ts": "2019-10-04T16:25:30.522+0200",
"msg": "Keep alive has errored",
"error": "write tcp XXXXXXXXX->XXXXXXXXX: wsasend: Eine bestehende Verbindung wurde softwaregesteuert\r\ndurch den Hostcomputer abgebrochen."
},
// ...
] Some things to note here: The message The "keep alive" is referring to this code: https://github.com/kafka-owl/kafka-owl/blob/master/backend/cmd/api/main.go#L50-L59 |
I have updated the title as this is not an Admin client exclusive problem. The same happens if you use the sarama client directly, rather than the AdminClient. |
Seems like the problem lies with the Corresponding issue: |
Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. |
Still valid |
Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. |
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Configuration
What configuration values are you using for Sarama and Kafka?
Logs
Problem Description
I have an admin client which is supposed to return a list of all Kafka topics upon invocation on a REST endpoint. This does work as desired, however after some idling (e. g. not running any requests with the admin client) for 30 minutes or so I can not get any topics anymore because of the error shown above in the logs.
I thought the .Net.KeepAlive config option (as shown in the go code) would resolve this, but apparently this hasn't helped. What is the problem?
The text was updated successfully, but these errors were encountered: