Skip to content
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

rpk topic consume: EOF error #932

Closed
0x5d opened this issue Mar 22, 2021 · 4 comments
Closed

rpk topic consume: EOF error #932

0x5d opened this issue Mar 22, 2021 · 4 comments

Comments

@0x5d
Copy link
Contributor

0x5d commented Mar 22, 2021

Rpk can't consume from topics if the given offset is "newest" (-1) or "oldest" (-2).

Setup

You can skip this if everything's up to date

# In the repo root
task llvm:install
task rp:build
task rpk:build
task dashboard:build 
task v-rp:build-pkg PKG_FORMATS=deb
task v-rp:build-docker-image

Start a Redpanda cluster, create the topic

# Use the freshly-built rpk bin
cd vbuild/go/linux/bin

./rpk container start -n 3
./rpk topic create tipical-topic

Check that the topic was created successfully:

./rpk topic describe tipical-topic               
  Name                tipical-topic  
  Internal            false          
  Cleanup policy      delete         
  Config:             
  Name                Value          Read-only  Sensitive  
  partition_count     1              false      false      
  replication_factor  1              false      false      
  cleanup.policy      delete         false      false      
  Partitions          1 - 1 out of 1  
  Partition           Leader          Replicas   In-Sync Replicas  High Watermark  
  0                   0               [0]        [0]               1               

Scenario 1

./rpk topic consume tipical-topic

Yields:

Unable to consume topic 'topic', partition 1 at offset -2
Error: kafka: invalid configuration (That topic/partition is already being consumed)

Scenario 2 (--partitions)

./rpk topic consume tipical-topic --partitions 0

Yields:

Got an error consuming topic 'tipical-topic', partition 0: EOF
Got an error consuming topic 'tipical-topic', partition 0: EOF
Got an error consuming topic 'tipical-topic', partition 0: EOF
...
@0x5d
Copy link
Contributor Author

0x5d commented Mar 23, 2021

Downgrading http://github.com/Shopify/sarama to v1.27.2 fixed it, but it was updated in 578a1fa precisely to fix rpk consume.

@emaxerrno
Copy link
Contributor

can you use latest?

@BenPope
Copy link
Member

BenPope commented Mar 23, 2021

Does rpk container start use the newly built docker image? If not, it doesn't include this fix: #890 - which I think is required because Sarama was ignoring the min 3, max 10 for fetch and just using 11.

@0x5d
Copy link
Contributor Author

0x5d commented Mar 23, 2021

This is a version mismatch error, seemingly only visible for dev rpk builds. I'm closing this.

@0x5d 0x5d closed this as completed Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants