Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Custom CSD error after upgrade to CM 5.7 -- logging

avatar
Contributor

Hi,

 

after upgrading Cloudera Manager from 5.5 to 5.7 our custom role failed to start due to the following error:

Role failed to start due to error java.lang.IllegalStateException: The archive already contains log4j.properties.



here is a log message in the cloudera-scm-server log:

 

2016-05-06 10:41:42,024 INFO CommandPusher:com.cloudera.cmf.service.GenericBring
UpRoleCommand: BringUp command (2866) has finished on service test for role
 55/test-MASTER-1d1313da90923719ced954c04b73e153, with status FAI
LURE and message MessageWithArgs{messageId=message.command.role.bringUp.failedTo
Start, args=[java.lang.IllegalStateException: The archive already contains log4j
.properties]}
2016-05-06 10:41

 

I have a second role that starts correctly. The above role uses the following logging instruction:

      "logging" : {
        "dir" : "/var/log/test",
        "filename" : "all.log",
        "modifiable" : true,
        "configName" : "log.dir",
        "loggingType" : "log4j"
      },

thanks,

 

1 ACCEPTED SOLUTION

avatar
Master Collaborator

Thanks for confirming, seems like you're hitting the same issue.

 

Workaround options;

- do not use SPARK_ON_YARN dependecy and make sure your role is pointing to an existing up-to-date /etc/spark/conf dir

- in the service.sdl rename default log4j.properties as set by configFilename [1] to a different name (ie: real-log4j.properties). Then, in the control.sh script, move the log4j.properties file to the spark-conf dir where it belongs, and move the real-log4j.properties to be renamed as log4j.properties.

 

 

 

[1] https://github.com/cloudera/cm_ext/wiki/Service-Descriptor-Language-Reference#logging

View solution in original post

5 REPLIES 5

avatar
Master Collaborator

would you be able to list your 'serviceDependencies', there's a know issue that we've identified with SPARK/CSD - just wanted to confirm if you're running into the same.

avatar
Contributor

How do I list the serviceDependencies ? Regardless, our CSD depends on Spark. 

avatar
Contributor

Hi Michalis, 

 

here are our dependencies:

  "parcel" : {
    "requiredTags" : ["test", "cdh"],
    "optionalTags" : ["test-plugin"]
  },
  "serviceDependencies" : [
    { "name" : "YARN", "required" : "true" },
    { "name" : "SPARK_ON_YARN", "required" : "true" },
    { "name" : "ZOOKEEPER"}
  ],
  "dependencyExtensions" : [
    {
      "extensionId" : "yarnAuxService",
      "name": "monitor",
      "className" : "com.test.monitoring.YarnMonitoringService",
      "type" : "classAndConfigs"
    }

 

 

avatar
Master Collaborator

Thanks for confirming, seems like you're hitting the same issue.

 

Workaround options;

- do not use SPARK_ON_YARN dependecy and make sure your role is pointing to an existing up-to-date /etc/spark/conf dir

- in the service.sdl rename default log4j.properties as set by configFilename [1] to a different name (ie: real-log4j.properties). Then, in the control.sh script, move the log4j.properties file to the spark-conf dir where it belongs, and move the real-log4j.properties to be renamed as log4j.properties.

 

 

 

[1] https://github.com/cloudera/cm_ext/wiki/Service-Descriptor-Language-Reference#logging

avatar
Visitor

Hi :

I also encountered same issue, also I have to declared spark_on_yarn dependency, how to fix it or workaround it?could you give the solution example,thanks!