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

Command [/usr/local/bin/dub path /var/lib/kafka/data writable] FAILED ! #131

Closed
SarthakGhosh16 opened this issue Dec 21, 2021 · 13 comments
Closed

Comments

@SarthakGhosh16
Copy link

SarthakGhosh16 commented Dec 21, 2021

I'm using kafka image v6.1.4-2-ubi8 pulled from https://hub.docker.com/layers/confluentinc/cp-kafka/6.1.4-2-ubi8/images/sha256-f3edca939e7484f5930eb91a8a42c5a30bf0b8e2556400c6677509b20cb26510?context=explore

Building my own Docker using above and using it in a kubernetes pod

While trying to run the image, I am getting the mentioned error

===> User
uid=1000670000(1000670000) gid=0(root) groups=0(root),1000670000
===> Configuring ...
SSL is enabled.
===> Running preflight checks ...
===> Check if /var/lib/kafka/data is writable ...
Command [/usr/local/bin/dub path /var/lib/kafka/data writable] FAILED !

I tried a lot of changes but nothing seems to work

USER root

RUN yum -y update --disableplugin=subscription-manager && \ 
	yum -y upgrade --disableplugin=subscription-manager && \
	groupadd -g 1001 fcigroup && \
  useradd -u 1001 -g 1001 -m fciuser && \
  chown -R fciuser: /var/lib/kafka && \
  chown -R fciuser: /home && \
  chown -R fciuser: /etc && \
  chown -R fciuser: /var/lib/kafka/data && \
  chmod -R 777 /var/log/kafka && \
  chmod -R 777 /home && \
  chmod -R 777 /etc/kafka && \
  chmod -R 777 /var/lib/kafka && \
  chmod -R 777 /var/lib/kafka/data

USER 1001

I even removed USER 1001 but even that didn't seem to solve my issue

USER root

RUN yum -y update --disableplugin=subscription-manager && \ 
	yum -y upgrade --disableplugin=subscription-manager && \
  chmod -R a+rwx /var/log/kafka && \
  chmod -R a+rx /home && \
  chmod -R a+rwx /var/lib/kafka && \
  chmod -R a+rwx /var/lib/kafka/data && \
  chmod -R a+rwx /etc/kafka

I had to add /etc/kafka because earlier even that was throwing similar error

Any help is appreciated

@jon-king-mindbodyonline

Same as closed #127 which says to open new issues if still encountering.
I'm also getting this today, with docker.io/confluentinc/cp-kafka-connect-base:5.5.7@sha256:41129d946c983f874fbf79586ea0aa6dd9f5dc6cf11509a5b8ec6efe8b558245 which is the latest for 5.5.7

@andrewegel
Copy link
Contributor

andrewegel commented Jan 3, 2022

uid=1000670000(1000670000) gid=0(root) groups=0(root),1000670000

This looks like you're using things in openshift akin to: https://cloud.redhat.com/blog/a-guide-to-openshift-and-uids and this discussion here: confluentinc/schema-registry-images#48 (comment)

If so, I'll be working on these fixes in the coming weeks. If not, please provide some more details or a minimal docker-compose.yaml or equivalent docker run command so we can investigate things further.

@SarthakGhosh16
Copy link
Author

Hi @andrewegel
yes, we are deploying on an openshift cluster and the DISCUSSION you shared captures the issue perfectly.

Is there an issue I can track or will you be using this one?

@andrewegel
Copy link
Contributor

yes, we are deploying on an openshift cluster... Is there an issue I can track or will you be using this one?

Great, thanks for confirming - We can track things here. I have some in-flight PRs I'll list here that I believe will resolve things:

Internally we're testing these changes to validate things are resolved before we merge & do mass rebuilds & re-releases of images. ETA is within the next couple of weeks. I will update things here as we make progress.

@andrewegel
Copy link
Contributor

andrewegel commented Jan 10, 2022

Hello folks-

After verifying these fixes worked in an OpenShift cluster with a random-uid-but-root-group runAs user, we have verified that this issue is no longer present. For the time being, I have pushed new a new 6.2.2-3-ub8 tag, and updated the 6.2.2 tag to these new images.

The following releases will also see this update something this week (I will update this issue as we release them):

  • 5.4.6
  • 5.5.7
  • 6.0.5
  • 6.1.4
  • 7.0.1

[Edit]

  • Pushed new tags 5.4.6, 5.4.6-3-deb8, 5.4.6-3-deb9, 5.4.6-3-ubi8 on 01-10-2022
  • Pushed new tags 5.5.7, 5.5.7-3-deb8, 5.5.7-3-deb9, 5.5.7-3-ubi8 on 01-10-2022
  • Pushed new tags 6.0.5, 6.0.5-3-ubi8 on 01-11-2022
  • Pushed new tags 6.1.4, 6.1.4-3-ubi8 on 01-11-2022
  • Pushed new tags 6.2.2, 6.2.2-3-ubi8 on 01-10-22
  • Pushed new tags 7.0.1, 7.0.1-3-ubi8, latest, latest-ubi8 on 1-11-2022

@andrewegel
Copy link
Contributor

I believe this issue to be resolved - Please ensure you pull the latest sem-ver tag off of DockerHub, or use one of the -3-ubi8 suffixed tags.

Please report any further issues here - I'll close out the issue in apox one week if I don't see anything further reported here.

@SarthakGhosh16
Copy link
Author

Thanks for fixing the issue @andrewegel
I tested 6.1.4-3-ubi8 on my openshift cluster and it is working fine now. We are good to close this issue.

@shitaljoshi
Copy link

I am still seeing this error.
===> User
uid=1001 gid=1001 groups=1001
===> Configuring ...
Command [/usr/local/bin/dub path /etc/kafka-connect/ writable] FAILED !
I am using confluentinc/cp-kafka-connect-base:7.0.1-3-ubi8

@jinnabaalu
Copy link

jinnabaalu commented Jun 10, 2022

Update your docker-compose with user:root, this will resolve the issues.

kafka-connect:
    image: confluentinc/cp-kafka-connect-base:6.2.0
    container_name: kafka-connect
    user: root
   ......

@CoinCoderBuffalo
Copy link

This issue is still not fixed.

@sugan2111
Copy link

I am still seeing this error. ===> User uid=1001 gid=1001 groups=1001 ===> Configuring ... Command [/usr/local/bin/dub path /etc/kafka-connect/ writable] FAILED ! I am using confluentinc/cp-kafka-connect-base:7.0.1-3-ubi8

Hi @shitaljoshi , I am also facing this similar issue, did you get it to work?

@DilLip-Chowdary-Codes
Copy link

@sugan2111 @shitaljoshi @buffaloDeveloper Did you find any fix for this?

@lucasramosdev
Copy link

Update your docker-compose with user:root, this will resolve the issues.

kafka-connect:
    image: confluentinc/cp-kafka-connect-base:6.2.0
    container_name: kafka-connect
    user: root
   ......

Worked for me! :D

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

No branches or pull requests

9 participants