Support Questions

Find answers, ask questions, and share your expertise

log4j:ERROR Could not find value for key log4j.appender.A

avatar
Expert Contributor

I am setting up a Pre prod cluster from Path B. I ran the command "/usr/share/cmf/schema/scm_prepare_database.sh mysql -h mysqldatabase scm temp password" to check the database status. I am getting the error of log4j however the SCM database is configured correctly. Please find the below error and suggest any workaround for this error.

[root@clouderamanage cloudera-scm-server]# /usr/share/cmf/schema/scm_prepare_database.sh mysql -h webserver scmmysqldatabase password
JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
Verifying that we can write to /etc/cloudera-scm-server
Creating SCM configuration file in /etc/cloudera-scm-server
Executing: /usr/java/jdk1.7.0_67-cloudera/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/java/postgresql-connector-java.jar:/usr/share/cmf/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
log4j: ERROR Could not find value for key log4j.appender.A
log4j: ERROR Could not instantiate appender named "A".
[2020-07-27 10:20:19,893] INFO 0[main] - com.cloudera.enterprise.dbutil.DbCommandExecutor.testDbConnection(DbCommandExecutor.java) - Successfully connected to database.
All done, your SCM database is configured correctly!

1 ACCEPTED SOLUTION

avatar
Master Guru

@HanzalaShaikh This seems a very old cosmetic issue in CM. What version you are using? 

 

It appears in older versions we had some early bugs caused by the addition of a new jar file in the classpath directory (/usr/share/cmf/schema/../lib/* ) used by the scm_prepare_db.sh script. This new jar contained a log4j.properties file that was not configured to use the log4j appender A, and overwrote the original properties from the proper log4j.properties file in the original jar file.


Cheers!
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

View solution in original post

4 REPLIES 4

avatar
Master Guru

@HanzalaShaikh This seems a very old cosmetic issue in CM. What version you are using? 

 

It appears in older versions we had some early bugs caused by the addition of a new jar file in the classpath directory (/usr/share/cmf/schema/../lib/* ) used by the scm_prepare_db.sh script. This new jar contained a log4j.properties file that was not configured to use the log4j appender A, and overwrote the original properties from the proper log4j.properties file in the original jar file.


Cheers!
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Expert Contributor

Thanks a lot for your quick reply and for providing a detailed explanation, really appreciated. I was using a 5.14.1 version of Cloudera. Yes, there is a bug in the older version I realized soon after that, but your explanation has made me understand the reason behind the error.

avatar
New Contributor

how to solve this? 

avatar
Community Manager

Welcome to the community @supersonic-2021 . As this is an older post, we recommend starting a new thread. The new thread will provide the opportunity to provide details specific to your environment that could aid others in providing a more accurate answer to your question.


Cy Jervis, Manager, Community Program
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.