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

Error processing /etc/kafka/zookeeper.properties.scale-5.pzoo-1 #335

Open
jaeyj2 opened this issue Oct 30, 2020 · 5 comments
Open

Error processing /etc/kafka/zookeeper.properties.scale-5.pzoo-1 #335

jaeyj2 opened this issue Oct 30, 2020 · 5 comments

Comments

@jaeyj2
Copy link

jaeyj2 commented Oct 30, 2020

There is the same issue here, but it has been closed and has been reposted.
I followed the guide, and I got to the Pod's starting state normally.
However, the pod status fails.

NAME READY STATUS RESTARTS AGE
kafka-0 0/1 CrashLoopBackOff 45 3h35m
kafka-1 0/1 CrashLoopBackOff 45 3h35m
kafka-2 0/1 CrashLoopBackOff 45 3h35m
pzoo-0 0/1 CrashLoopBackOff 10 28m
pzoo-1 0/1 CrashLoopBackOff 10 28m
pzoo-2 0/1 CrashLoopBackOff 10 28m
zoo-0 0/1 CrashLoopBackOff 10 28m
zoo-1 0/1 CrashLoopBackOff 10 28m

The pod log.
[root@pstest01 kafka2]# kubectl logs pzoo-1 -n kafka2
[2020-10-30 08:41:02,645] INFO Reading configuration from: /etc/kafka/zookeeper.properties.scale-5.pzoo-1 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-10-30 08:41:02,647] ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing /etc/kafka/zookeeper.properties.scale-5.pzoo-1
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:156)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:113)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:82)
Caused by: java.lang.IllegalArgumentException: /etc/kafka/zookeeper.properties.scale-5.pzoo-1 file is missing
at org.apache.zookeeper.server.util.VerifyingFileFactory.doFailForNonExistingPath(VerifyingFileFactory.java:51)
at org.apache.zookeeper.server.util.VerifyingFileFactory.validate(VerifyingFileFactory.java:45)
at org.apache.zookeeper.server.util.VerifyingFileFactory.create(VerifyingFileFactory.java:40)
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:141)
... 2 more

It seems that we need to modify the zookeeper.properties related part of configmap.
But I don't know which of the many lines is the problem. Because the log only came out missing files.

zookeeper-config.yml was applied as it is.

@jaeyj2
Copy link
Author

jaeyj2 commented Nov 2, 2020

/etc/kafka/zookeeper.properties.scale-5.pzoo-1
org.apache.zookeeper.server.util.VerifyingFileFactory.doFailForNonExistingPath

I don't know why zookeeper.properties is not getting this file from log.

@uluzox
Copy link

uluzox commented Nov 2, 2020

I am having the same issue

The logs of the init-config container of zoo-1 Pod are:

+ '[' '!' -d /var/lib/zookeeper/data ']'
+ '[' -z 4 ']'
+ export ZOOKEEPER_SERVER_ID=5
+ ZOOKEEPER_SERVER_ID=5
+ echo 5
+ tee /var/lib/zookeeper/data/myid
5
+ cp -Lur /etc/kafka-configmap/init.sh /etc/kafka-configmap/log4j.properties /etc/kafka-configmap/zookeeper.properties /etc/kafka/
+ '[' '!' -z '' ']'
+ ln -s /etc/kafka/zookeeper.properties /etc/kafka/zookeeper.properties.scale-.zoo-1

From 10zookeeper-config.yml $REPLICAS does not seem to be get set...

ln -s /etc/kafka/zookeeper.properties /etc/kafka/zookeeper.properties.scale-$REPLICAS.$POD_NAME

Im running on k3s and rancher

@jaeyj2
Copy link
Author

jaeyj2 commented Nov 3, 2020

C:\Users\jae\Downloads\111\kafka_2.11-2.4.0\kafka_2.11-2.4.0\bin
C:\Users\jae\Downloads\111\kafka_2.11-2.4.0\kafka_2.11-2.4.0\config

kafka2.4.1's directory is bin and config.
but this configmap targeting is /etc/kafka.

Maybe this need to fix real directory

What is the real path of the docker image's config and bin directory?

@uluzox
Copy link

uluzox commented Nov 3, 2020

Changing ln -s /etc/kafka/zookeeper.properties /etc/kafka/zookeeper.properties.scale-$REPLICAS.$POD_NAME to
ln -s /etc/kafka/zookeeper.properties /etc/kafka/zookeeper.properties.scale-5.$POD_NAME in 10zookeeper-config.yml seems to have solved the issue...
I did this because both 51zoo.yml and 50pzoo.yml run this command:

command:
        - ./bin/zookeeper-server-start.sh
        - /etc/kafka/zookeeper.properties.scale-5.$(POD_NAME)

However this is not a real solution, is it?

@jaeyj2
Copy link
Author

jaeyj2 commented Nov 4, 2020

After zookeeper-config.yml modification, it was started normally. Thank you.

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

2 participants