Cloudera Manager did fail as well, but that seemed to be due to my security group settings. I changed the configuration and restarted the service on the host, but the restart always failed with this error:
Caused by: java.io.FileNotFoundException: /usr/share/cmf/python/Lib/site$py.class (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.
at org.hibernate.ejb.packaging.ExplodedJarVisitor.getClassNamesInTree(ExplodedJarVisitor.java:126)
at org.hibernate.ejb.packaging.ExplodedJarVisitor.getClassNamesInTree(ExplodedJarVisitor.java:134)
at org.hibernate.ejb.packaging.ExplodedJarVisitor.getClassNamesInTree(ExplodedJarVisitor.java:134)
at org.hibernate.ejb.packaging.ExplodedJarVisitor.doProcessElements(ExplodedJarVisitor.java:92)
at org.hibernate.ejb.packaging.AbstractJarVisitor.getMatchingEntries(AbstractJarVisitor.java:149)
at org.hibernate.ejb.packaging.NativeScanner.getClassesInJar(NativeScanner.java:128)
... 31 more
Odd, I thought, since by default the service runs as root and should have free rein. So I poked around in that Python library directory, and lo and behold:
I chmod'ed 644 the .class files (in /usr/share/cmf/python/Lib and /usr/share/cmf/python/Lib/simplejson) and sure enough everything is working again.
Hopefully this is helpful to somebody.
Under normal circumstances, these class files will never be created because the directory is owned by root and CM runs as an unprivileged user (cloudera-scm by default). For CM to have created the files, it must have been run as root at one point, and then subsequently run as the unprivileged user. Does that seem possible? You should simply delete the class files to get back to normal.
ReplyDeleteThanks. It's possible that's what happened. I'll check.
ReplyDeleteI am also facing the same issue. Can you help me in resolving this .When I try to start cloudera manager service, it is failing. I see Caused by: java.io.FileNotFoundException: /usr/share/cmf/python/Lib/ServerLogSearcher$py.class (Permission denied)
ReplyDeleteat java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:146)
at org.hibernate.ejb.packaging.ExplodedJarVisitor.getClassNamesInTree(ExplodedJarVisitor.java:126)
in the log file
Make sure the service is always started and owned by the same Unix user.
DeleteThank You very much. This helped me get my Cloudera Manager running back again which started failing after running it as root once and then, trying to run it back as cloudera-scm.
ReplyDelete