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

Offloading fails #2697

Closed
macthestack opened this issue Oct 2, 2018 · 10 comments
Closed

Offloading fails #2697

macthestack opened this issue Oct 2, 2018 · 10 comments
Labels
area/tieredstorage deprecated/question Questions should happened in GitHub Discussions type/bug The PR fixed a bug or issue reported a bug

Comments

@macthestack
Copy link

macthestack commented Oct 2, 2018

The following happens when I try to offload manually using: pulsar-admin topics offload --size-threshold 0 public/default/my-topic && pulsar-admin topics offload-status -w public/default/my-topic

Offload triggered for persistent://public/default/my-topic for messages before 6:0:-1
Error in offload
null

Reason: Error offloading: org.apache.bookkeeper.mledger.ManagedLedgerException: java.util.concurrent.CompletionException: java.lang.UnsupportedOperationException
command terminated with exit code 1

The last broker log regarding offloading:

INFO org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl - [public/default/persistent/my-topic] Metadata prepared for offload of ledger 4 with uuid da861b42-3d30-4158-babd-f8a73e5850b7

Everything else about the cluster seems to be running fine by the looks of logs and grafana.

Steps to reproduce

Spin up a new kubernetes cluster on gcp and try offloading to tiered storage following the cookbook

I have tried both the helm deployment and the gcp specific one and I have also tried both gcp and aws-s3 storage.

System configuration

Pulsar version: 2.1.1

@sijie sijie added type/bug The PR fixed a bug or issue reported a bug area/tieredstorage deprecated/question Questions should happened in GitHub Discussions triage/week-40 labels Oct 2, 2018
@ivankelly
Copy link
Contributor

Have you configured an offload driver? What does your broker configuration look like?

@macthestack
Copy link
Author

macthestack commented Oct 4, 2018

### --- Ledger Offloading --- ###

# Driver to use to offload old data to long term storage (Possible values: S3)
managedLedgerOffloadDriver=aws-s3

# Maximum number of thread pool threads for ledger offloading
managedLedgerOffloadMaxThreads=2

# For Amazon S3 ledger offload, AWS region
s3ManagedLedgerOffloadRegion=eu-west-1

# For Amazon S3 ledger offload, Bucket to place offloadedledger into
s3ManagedLedgerOffloadBucket=pulsar-topic-offload

# For Amazon S3 ledger offload, Alternative endpoint to connect to (useful for testing)
s3ManagedLedgerOffloadServiceEndpoint=

# For Amazon S3 ledger offload, Max block size in bytes. (64MB by default, 5MB minimum)
s3ManagedLedgerOffloadMaxBlockSizeInBytes=67108864

# For Amazon S3 ledger offload, Read buffer size in bytes(1MB by default)
s3ManagedLedgerOffloadReadBufferSizeInBytes=1048576

I'm also setting the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY

@ivankelly
Copy link
Contributor

@macthestack did you restart the broker after updating the configuration? UnsupportedOperationException looks like its coming from the Null offloader.
https://github.com/apache/pulsar/blob/master/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/NullLedgerOffloader.java

@macthestack
Copy link
Author

I actually set it before the broker start in this sequence:

bin/apply-config-from-env.py conf/broker.conf &&
bin/apply-config-from-env.py conf/pulsar_env.sh &&
bin/pulsar broker

@ivankelly
Copy link
Contributor

Could you post the full broker log?

@macthestack
Copy link
Author

sure, I'll spin up a fresh cluster, thanks for the help

@macthestack
Copy link
Author

macthestack commented Oct 4, 2018

Here we go:

stderr
stdout

Sorry for the format. jq --raw-output '.textPayload' stdout.json -j is helpful

@ivankelly
Copy link
Contributor

@macthestack

# Driver to use to offload old data to long term storage (Possible values: S3)
managedLedgerOffloadDriver=aws-s3

For 2.1.1-incubating, only 'S3' is supported as a driver. It looks like the 2.1.1-incubating version of the docs on the site is out of sync with what is in the codebase :/

Try with S3 as the driver. I'll look into the documentation issue.

ivankelly added a commit to ivankelly/pulsar that referenced this issue Oct 5, 2018
Some extra logging for offloader loading and initialization which
would have been useful when debugging apache#2697.
@macthestack
Copy link
Author

Thanks @ivankelly, that did the trick

@ivankelly
Copy link
Contributor

I'm glad to hear it. Let us know if you have more trouble.

ivankelly added a commit that referenced this issue Nov 28, 2018
Some extra logging for offloader loading and initialization which
would have been useful when debugging #2697.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tieredstorage deprecated/question Questions should happened in GitHub Discussions type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

No branches or pull requests

3 participants