Support Questions

Find answers, ask questions, and share your expertise

ERROR main:com.cloudera.server.cmf.Main:Server failed

avatar
Explorer
Hi.
It is my first time using CDH and CM.I use centos 6.3 64bit in VMware Workstation9.
I am confused about my problems.The cloudera-scm-server.log is following:
JAVA_HOME=/usr/java/jdk1.7.0_79
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.cloudera.server.cmf.TrialState': Cannot resolve reference to bean 'entityManagerFactoryBean' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactoryBean': FactoryBean threw exception on object creation; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: cmf.server] Unable to build EntityManagerFactory
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:616)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at com.cloudera.server.cmf.Main.bootstrapSpringContext(Main.java:347)
at com.cloudera.server.cmf.Main.<init>(Main.java:213)
at com.cloudera.server.cmf.Main.main(Main.java:196)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactoryBean': FactoryBean threw exception on object creation; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: cmf.server] Unable to build EntityManagerFactory
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1440)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:247)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 17 more
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: cmf.server] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:924)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:59)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
at com.cloudera.enterprise.CommonMain.setupHibernate(CommonMain.java:171)
at com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean.getObject(EntityManagerFactoryBean.java:105)
at com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean.getObject(EntityManagerFactoryBean.java:58)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
... 22 more
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3486)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXmlQueue(Configuration.java:3475)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3463)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1355)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1756)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
... 29 more
Caused by: org.hibernate.MappingException: class demo.fabric.Employee not found while looking for property: id
at org.hibernate.internal.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:232)
at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:324)
at org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:450)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:383)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:323)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:174)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3483)
... 35 more
Caused by: java.lang.ClassNotFoundException: demo.fabric.Employee
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at org.hibernate.internal.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.internal.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:228)
... 41 more
7 REPLIES 7

avatar
Expert Contributor

Have you considered using the Cloudera Quickstart VM as a first step?

It is basically a single node Hadoop cluster that runs in a VMWare VM - it is already configured with Hadoop ecosystem tools.

 

All you have to do is download it, and launch the VM on your laptop.

More information here: http://www.cloudera.com/content/www/en-us/downloads/quickstart_vms/5-4.html

avatar
Explorer
I did it again today. Not follow your advice.But i stay Status "Acquiring installation lock..."all the time. The log said it was not wrong. So what's wrong?

avatar
Expert Contributor

It seems that you prefer to install and configure CDH rather than using the Cloudera Quickstart VM. 

 

I checked the supported OS versions and do not see Centos 6.3 listed for CDH 5.4. I recommend using one of the supported versions.

More information can be found here:

http://www.cloudera.com/content/www/en-us/downloads/cdh/5-4-0.html

 

... and here:

http://www.cloudera.com/content/www/en-us/documentation/enterprise/latest/topics/installation_reqts....

 

Instructions for Cloudera Manager Deployment, or unmanaged deployment, are here:

http://www.cloudera.com/content/www/en-us/documentation/enterprise/latest/topics/installation_instal...

avatar
Explorer
Thanks for your advice.
But i installed it on my VMware workstation9.0.
By the time ,my problem is that i can't upload file or create dirrctory to /user/hdfs by Hue UI.
Can u give me some advice?

avatar
Explorer
Following is the notes:
Cannot perform operation. Note: you are a Hue admin but not a HDFS superuser (which is "hdfs").

AccessControlException: Permission denied: user=admin, access=WRITE, inode="/user/hdfs":hdfs:supergroup:drwxr-xr-x (error 403)

avatar
Explorer

Late in answering though , the issue happenes because PostGRESql or any other database has not been set , and CDH server tries to look for default mysql database . To resolve it I followed below steps :

 

1. Installed PostGRESql database following steps in this link :  http://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_embed_pstgrs.html#cmig_topic_5_...

 

2. The above link however assumes that you do not need to configure the database , but if you're following Path B , you still need to configure the database like an extenal PostGRESQl database instructions . To configure I followed steps in this link :

http://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_extrnl_pstgrs.html#cmig_topic_5...

 

3. Once it's configured then you run this command to initilize the parameters files :

 

$ /usr/share/cmf/schema/scm_prepare_database.sh postgresql scm scm scm

 

After this once you start the the server using command :

sudo service cloudera-scm-server start

 

You should be able to open the cloudera manager server using URL http://<host>:7180 .

 

Regards

Rahul

avatar
New Contributor

That was the solution for me.

I just forgot to run this "connecting" command after system restart

 

 sudo /opt/cloudera/cm/schema/scm_prepare_database.sh postgresql scm scm

 

...Dummy in Linux and Cloudera