Trying to install a Kafka Connect connector via a jar file using Docker, installation gives errors - apache-kafka-connect

I have am using docker-compose along with a Dockerfile to install a connector. I have been successful in installing connectors from Confluent Hub, but not my own jar files.
Here is what I did:
Went to https://search.maven.org/artifact/io.aiven/aiven-kafka-connect-gcs/0.7.0/jar and in the upper right corner, pressed Downloads and clicked on "jar"
Placed this file in the same folder as my Dockerfile
Ran my Dockerfile:
ENV CONNECT_PLUGIN_PATH="/usr/share/java,/usr/share/confluent-hub-components"
USER root
COPY --chown=appuser:appuser aiven-kafka-connect-gcs-0.7.0.jar /usr/share/confluent-hub-components
USER appuser
RUN confluent-hub install --no-prompt aiven/kafka-connect-gcs:0.7.0
I have also tried various confluent-hub install commands, including:
RUN confluent-hub install --no-prompt aiven-kafka-connect-gcs:0.7.0
RUN confluent-hub install --no-prompt confluent-hub-components/aiven-kafka-connect-gcs-0.7.0.jar
RUN confluent-hub install --no-prompt aiven-kafka-connect-gcs-0.7.0.jar
all to no avail. I did try other directories like /etc/kafka-connect/jars and I just keep getting the same issue.
What am I doing wrong? Syntax? Missing additional mounting commands? Something else?

confluent-hub doesn't "install" local JAR files
By default, it uses its arguments to do an HTTP lookup against the Confluent Hub website and return the according response. If it's a valid connector, it'll extract it to the plugin path, otherwise, you'll get an error
If you give it a local ZIP, that will work
path to a local ZIP file that was downloaded from Confluent Hub

This is how I did it:
RUN wget -O /set/your/path/here/<connector name here>.tar https://url-of-connector-here/<connector name and version here>.tar
RUN tar -xvf /set/your/path/here/<connector name here>.tar --directory /path/to/connect/plugins/here/
and it worked.

Related

I am trying to install Lombok in my Ubuntu 22 version. It is for eclipse. When I am running command, it is giving permission denied

I am trying to install Lombok in my Ubuntu 22(latest version) for eclipse.
When I am running command
sudo java -jar lombok.jar
Error shown in Lombok installer
I am running above command by going into Downloads directory because my Lombok jar is there.
My eclipse location is this:-
eclipse.home.location=file:/snap/eclipse/61/
I have also tried going to snap/eclipse directory , moved the Lombok.jar file there with sudo su but that isn't also working.
When I tried this command in sudo su mode:-
cp -R /home/satya123/Downloads/lombok.jar /snap/eclipse/61/
It is giving this error:-
cp: cannot create regular file '/snap/eclipse/61/lombok.jar': Read-only file system
I tried this command so that my eclipse and lombok remains in same directory with root permission but this also not worked.
What should I do?
You can not modify a snap app, they are essentially containerized. You'll need a download from downloads.eclipse.org to be able to modify it with lombok.

failed to compute cache key: failed to create hash for <DIR>: operation not supported

while attempting to build an image in Docker/macOS, I get the following error:
failed to compute cache key: failed to create hash for
/app-temp/client/dist: operation not supported
My Dockerfile looks like this:
FROM node:lts-alpine as ui-build
WORKDIR /app-temp
COPY client/ ./client/
RUN cd client && npm install
RUN cd client && npm run build
FROM node:lts-alpine as api-build
WORKDIR /app
COPY --from=ui-build /app-temp/client/dist ./client/dist
COPY server/ ./server/
RUN cd server && npm install
EXPOSE 3000
CMD ["node", "/app/server/src/index.js"]
And the docker command that I am using is:
docker build -t test-image .
Now, note that the image is successfully built in a Linux machine. However, the above-mentioned error persists in a macOS machine.
I am running macOS Big Sur 11.2.1.
Any ideas as to how solve this problem?
Thanks in advance.
just in case someone else finds himself here
Look in your .dockerignore file if dist is in the list
Also, try building with BUILDKIT disabled
DOCKER_BUILDKIT=0 docker build ....
Im gonna throw my solution out there.
Setup: .net 5 web app with docker enabled, contains a dockerfile that was created by visual studio.
There was a step where the docker file was saying to copy my csproj up to the parent folder. I edited the source directory to from parent/myproject.csproj to myproject.csproj then I ran docker build and it worked.
Im assuming that when I run docker build I was down one level in the child folder where the dockerfile lives, and the paths just werent lining up.

how to setup WordNet on red hat openshift

I need to access a WordNet db to enable synonym search in my application that I'm hosting on OpenShift by Red Hat. How can I install it on Openshift?
You could try downloading the WordNet files to your $OPENSHIFT_DATA_DIR and then try installing it locally inside that directory.
ssh into your gear with rhc ssh <appname
cd into your $OPENSHIFT_DATA_DIR
then wget the files wget http://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.bz2
untar them tar -xvf WordNet-3.0.tar.bz2
Try to install.
Note: I've never tried to install it myself but due to the way OpenShift is configured you may have trouble standing this up in the same gear as your web application. Therefore I would recommend creating a Openshift DIY application and then doing the steps above.

Installing MULE ESB mule-standalone-3.3.1

Can some guide me .. for installing Mule ESB(mule-standalone-3.3.1) in Ubuntu . I am unable to find any documentation for installing. i want to automate it through Chef.
It's can be as simple as downloading and unpacking the archive file from: http://dist.codehaus.org/mule/distributions/mule-standalone-3.3.1.zip
Note: You need jdk 6/7 installed first.
Here's a chef cookbook that does this: https://github.com/ryandcarter/mule-cookbook
And here's a Vagrant script for running the mule cookbook on ubuntu etc: https://github.com/ryandcarter/vagrant-mule
It is very simple.
Download and unpacking the archive file from: http://dist.codehaus.org/mule/distributions/mule-standalone-3.3.1.zip or whatever version you want to install.
put this unpack file to anywhere where you want like /opt/ or /usr/local/
put you mule application inside apps folder.
& go to bin directory and run ./mule start command. Now mule server is running. You can also check mule log inside log folder mule.log file
This is an old question, but in case there are others who are looking.
You want to install Mule as a Ubuntu Service, so that it restarts when The server restarts. There are a couple of basic steps to this
I detailed out instructions and installation files at my github repository
https://github.com/jamesontriplett/mule_linux_service_install
Steps in general:
Install a startup script in /etc/init.d
Install a startup parameter file in /etc/mule
Customize parameters in the wrapper.conf file in /conf/wrapper.conf
Install the license file onto the server if using enterprise
Add the startup script to the run levels.
To test, you want to reboot the linux service to make sure that it will come back after a reboot. If it doesn't you have a reliability issue.

How to Create a configuration File For MongoDB

I have installed mongodb for mac os through 10gen and I have gone through the documentation to do so. Everything seems fine apart from the configuration file. I can not see it in /etc/mongod.config. Do I have to manually create this config file? And if so how can I go about it?
cheers
The default path for brew installed mongodb on Mac OS X is /usr/local/etc/mongod.conf
Unless you have installed a packaged version of MongoDB (for example, using Homebrew or Mac Ports) you will have to create a config file manually, or just pass the appropriate command line parameters when starting up MongoDB.
If you want a commented example of a config file to start with, the mongodb.conf in the Debian/Ubuntu package should be a good starting point. Important options to check are the dbpath and logpath which will likely be different for you.
It would also be worth looking at the Homebrew mongodb formula which includes setting up a LaunchAgent script to manage the mongod service.
Yes, unless you install via a package manager (like apt or yum on Linux) you have to create this manually. Then, When you start mongod you simply need to specify where the config file is, for example:
./mongod -f /path/to/mongod.conf
For how that file should look, just take a look here:
http://docs.mongodb.org/manual/reference/configuration-options/
You can also see the aforementioned Linux config files from the packages on github:
https://github.com/mongodb/mongo/blob/master/rpm/mongod.conf
https://github.com/mongodb/mongo/blob/master/debian/mongodb.conf
In the case you installed MongoDB without Homebrew, i.e. downloaded the TGZ package directly from MongoDB Download Center, you will can add the configuration file:
sudo nano /etc/mongod.conf
Please use only spaces (no tabs) in the file and leave a space after the key. For example:
security:
authorization: enabled
net:
port: 27017
bindIp: 0.0.0.0
And then run the instance with the configuration flag:
mongod -f /etc/mongod.conf
I wrote a post about installing MongoDB Community Edition directly from the TGZ archive.

Resources