Expert Contributor
Posts: 113
Registered: ‎02-15-2016
Accepted Solution

Sqoop2 metastore configuration error

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(
	at org.apache.sqoop.server.ServerInitializer.contextInitialized(
	at org.apache.catalina.core.StandardContext.listenerStart(
	at org.apache.catalina.core.StandardContext.start(
	at org.apache.catalina.core.ContainerBase.addChildInternal(
	at org.apache.catalina.core.ContainerBase.addChild(
	at org.apache.catalina.core.StandardHost.addChild(
	at org.apache.catalina.startup.HostConfig.deployWAR(
	at org.apache.catalina.startup.HostConfig.deployWARs(
	at org.apache.catalina.startup.HostConfig.deployApps(
	at org.apache.catalina.startup.HostConfig.start(
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
	at org.apache.catalina.core.ContainerBase.start(
	at org.apache.catalina.core.StandardHost.start(
	at org.apache.catalina.core.ContainerBase.start(
	at org.apache.catalina.core.StandardEngine.start(
	at org.apache.catalina.core.StandardService.start(
	at org.apache.catalina.core.StandardServer.start(
	at org.apache.catalina.startup.Catalina.start(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.apache.catalina.startup.Bootstrap.start(
	at org.apache.catalina.startup.Bootstrap.main(
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(
	at org.apache.sqoop.repository.RepositoryManager.initialize(
	at org.apache.sqoop.core.SqoopServer.initialize(
	... 25 more

I have created the sqoop db in postgres 

followed doc



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)


Posts: 776
Registered: ‎05-16-2016

Re: Sqoop2 metastore configuration error

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

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

Expert Contributor
Posts: 113
Registered: ‎02-15-2016

Re: Sqoop2 metastore configuration error

CDH 5.7.5
Cloudera Employee
Posts: 35
Registered: ‎08-18-2014

Re: Sqoop2 metastore configuration error

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.