Reply
Explorer
Posts: 12
Registered: ‎01-01-2016
Accepted Solution

Custom CSD error after upgrade to CM 5.7 -- logging

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,

 

Cloudera Employee
Posts: 293
Registered: ‎07-08-2013

Re: Custom CSD error after upgrade to CM 5.7 -- logging

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.

Explorer
Posts: 12
Registered: ‎01-01-2016

Re: Custom CSD error after upgrade to CM 5.7 -- logging

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

Explorer
Posts: 12
Registered: ‎01-01-2016

Re: Custom CSD error after upgrade to CM 5.7 -- logging

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"
    }

 

 

Cloudera Employee
Posts: 293
Registered: ‎07-08-2013

Re: Custom CSD error after upgrade to CM 5.7 -- logging

[ Edited ]

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

Highlighted
New Contributor
Posts: 3
Registered: ‎05-19-2016

Re: Custom CSD error after upgrade to CM 5.7 -- logging

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!