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

Schema registry doesnt start doe to snappy compression error #766

Closed
avinashsingh77 opened this issue Nov 29, 2023 · 4 comments · Fixed by #773
Closed

Schema registry doesnt start doe to snappy compression error #766

avinashsingh77 opened this issue Nov 29, 2023 · 4 comments · Fixed by #773

Comments

@avinashsingh77
Copy link

What happened?

When I try to launch a container using ghcr.io/aiven-open/karapace:latest, I get an error.
Snippet of the error as follows:

karapace.schema_reader schema-reader ERROR Unexpected exception in schema reader loop
Traceback (most recent call last):
File "/venv/lib/python3.10/site-packages/karapace/schema_reader.py", line 228, in run
self.handle_messages()
File "/venv/lib/python3.10/site-packages/karapace/schema_reader.py", line 295, in handle_messages
raw_msgs = self.consumer.poll(timeout_ms=self.timeout_ms)
File "/venv/lib/python3.10/site-packages/kafka/consumer/group.py", line 659, in poll
records = self._poll_once(remaining, max_records, update_offsets=update_offsets)
File "/venv/lib/python3.10/site-packages/kafka/consumer/group.py", line 690, in _poll_once
records, partial = self._fetcher.fetched_records(max_records, update_offsets=update_offsets)
File "/venv/lib/python3.10/site-packages/kafka/consumer/fetcher.py", line 344, in fetched_records
self._next_partition_records = self._parse_fetched_data(completion)
File "/venv/lib/python3.10/site-packages/kafka/consumer/fetcher.py", line 818, in _parse_fetched_data
unpacked = list(self._unpack_message_set(tp, records))
File "/venv/lib/python3.10/site-packages/kafka/consumer/fetcher.py", line 467, in _unpack_message_set
for record in batch:
File "/venv/lib/python3.10/site-packages/kafka/record/default_records.py", line 276, in iter
self._maybe_uncompress()
File "/venv/lib/python3.10/site-packages/kafka/record/default_records.py", line 183, in _maybe_uncompress
self._assert_has_codec(compression_type)
File "/venv/lib/python3.10/site-packages/kafka/record/default_records.py", line 118, in _assert_has_codec
raise UnsupportedCodecError(
kafka.errors.UnsupportedCodecError: UnsupportedCodecError: Libraries for snappy compression codec not found

What did you expect to happen?

I expected schema registry to be up and running on my local on specified port.

What else do we need to know?

If I add the following
"libsnappy-dev" in Dockerfile line no. 38
"python-snappy==0.6.1" in requirements.in and requirements.txt
and build the image again locally and use the local copy of image, it works fine.
Schema registry in up and running on my local.

If this is a recommended fix, I can submit a PR.

tvainika added a commit that referenced this issue Dec 1, 2023
Require kafka codec compression dependencies always instead of
optionally, and add unit test to verify the environment. Fixes: #766
@avinashsingh77
Copy link
Author

Hey @tvainika , any idea when will the PR #773 be merged? I want to test this issue.

@avinashsingh77
Copy link
Author

@matyaskuti I see develop tag was built after this issue was closed. When do we expect latest tag to have this fix?

@matyaskuti
Copy link
Contributor

@avinashsingh77 let me get back to you soon about the next release.

@matyaskuti
Copy link
Contributor

@avinashsingh77 I just published a new release, the latest image should contain the relevant fix now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants