Support Questions

Find answers, ask questions, and share your expertise

Sqoop2 metastore configuration error

avatar
Expert Contributor

Hi ,

I am trying to configure postgres metastore from sqoop2 but getting error whiel starting the sqoop2

Sqoop server failed to start
java.lang.RuntimeException: Failure in server initialization
	at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:63)
	at org.apache.sqoop.server.ServerInitializer.contextInitialized(ServerInitializer.java:41)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:802)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:944)
	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:779)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:505)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1068)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.apache.sqoop.common.SqoopException: REPO_0002:Repository structures are not in suitable state, might require upgrade
	at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:130)
	at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:78)
	at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:56)
	... 25 more



I have created the sqoop db in postgres 

followed doc 

https://www.cloudera.com/documentation/enterprise/5-5-x/topics/install_sqoop_ext_db.html

 

 

List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
sqoop | sqoop | UTF8 | en_US.UTF8 | en_US.UTF8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF8 | en_US.UTF8 |
(4 rows)

 

1 ACCEPTED SOLUTION

avatar
Rising Star
This problem was caused because the Sqoop tables hadn't been created in PostgreSQL. To solve this problem, please go to CM > Sqoop 2 service, click on Actions button and then choose "Create Sqoop Database". After that, please try to start Sqoop2 service again.

View solution in original post

3 REPLIES 3

avatar
Champion

Could you let me know the CDH version you are using . 

because it is forcing you to upgrade sqoop 2 version . ? 

avatar
Expert Contributor
CDH 5.7.5

avatar
Rising Star
This problem was caused because the Sqoop tables hadn't been created in PostgreSQL. To solve this problem, please go to CM > Sqoop 2 service, click on Actions button and then choose "Create Sqoop Database". After that, please try to start Sqoop2 service again.