[KAFKA-41] Fix confluent-hub mongo connector install fails with unknown error upon unzipping file to standard hub component directory Created: 09/Jul/19  Updated: 28/Oct/23  Resolved: 24/Jul/19

Status: Closed
Project: Kafka Connector
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2

Type: Bug Priority: Critical - P2
Reporter: Mike Frencl Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Comments   
Comment by Githook User [ 24/Jul/19 ]

Author:

{'name': 'Ross Lawley', 'username': 'rozza', 'email': 'ross.lawley@gmail.com'}

Message: Fix confluent archive format

KAFKA-41
Branch: master
https://github.com/mongodb/mongo-kafka/commit/cd7bf1d84142d62fe812b227d4846f57db7d169e

Comment by Ross Lawley [ 18/Jul/19 ]

Hi mike.frencl@chrobinson.com, thanks for the bug report.

This will be fixed in 0.2 in the meantime the connector will have to be manually installed by unzipping the zip file into the Kafka connect plugin directory.

Ross

Comment by Ross Lawley [ 18/Jul/19 ]

https://github.com/rozza/mongo-kafka/pull/3

Comment by Scott L'Hommedieu (Inactive) [ 17/Jul/19 ]

Steps to resolve this issue below.

The archive file is missing a top-level directory. See the example at:
https://docs.confluent.io/current/connect/managing/confluent-hub/component-archive.html

It's not mentioned in the spec but the name of that top-level directory should match the archive and it should follow the convention:

${componentOwner}${componentName}${componentVersion}.zip

Comment by Mike Frencl [ 09/Jul/19 ]

Verbose output below.  Occurs when running confluent-hub install mongodb/kafka-connect-mongodb:0.1 on RHEL7 or when building docker container.  Destination path ends up containing files extracted from the zip file, but they are not in the standard directory paths of other components installed with confluent-hub command (i.e. assets, doc, etc, lib).  Uncertain if this is the cause or effect of the error.

Running in a verbose mode
Running in a "--no-prompt" mode
Installation type is: ARCHIVE
Implicit acceptance of the license below:
The Apache License, Version 2.0
https://www.apache.org/licenses/LICENSE-2.0
Implicit confirmation of the question: You are about to install 'kafka-connect-mongodb' from MongoDB, as published on Confluent Hub.
Downloading component MongoDB Connector for Apache Kafka 0.1, provided by MongoDB from Confluent Hub and installing into /usr/share/confluent-hub-components
Scanning path /usr/share/confluent-hub-components
Installation state for the kafka-connect-mongodb in the /usr/share/confluent-hub-components is IMMEDIATE_DIRECTORY
Implicit confirmation of the question: Do you want to uninstall existing version 0.1?
Uninstalling kafka-connect-mongodb from /usr/share/confluent-hub-components
Deleting /usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb
Creating temporary directory
Created temporary directory: /tmp/confluent-hub-tmp7450249767724837947
Copying data from input stream to file /tmp/confluent-hub-tmp7450249767724837947/mongodb-kafka-connect-mongodb-0.1.zip
1971998 bytes saved to disk
Creating directory recursively: /usr/share/confluent-hub-components
Unzipping file /tmp/confluent-hub-tmp7450249767724837947/mongodb-kafka-connect-mongodb-0.1.zip to /usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb
Creating directory recursively: /usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb
Creating directory recursively: /usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb
Creating directory recursively: /usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb
Creating directory recursively: /usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb
Creating directory recursively: /usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb
Creating directory recursively: /usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb
Creating directory recursively: /usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb
String index out of range: -1
Failed to unzip '/tmp/confluent-hub-tmp7450249767724837947/mongodb-kafka-connect-mongodb-0.1.zip' into '/usr/share/confluent-hub-components/mongodb-kafka-connect-mongodb'

Error: Unknown error

Generated at Thu Feb 08 09:05:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.