Hi Yanting,

Could you go to your sqoop.properties file and check whether there is an option named "org.apache.sqoop.connector.autoupgrade" ?

Mengwei


On Thu, Sep 12, 2013 at 12:07 AM, Yanting Chen <mx.alexender@gmail.com> wrote:
Hi Mengwei

The followings are logs:

localhost-2013-09-12.log:
Sep 12, 2013 9:20:02 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.apache.sqoop.server.ServerInitializer
java.lang.RuntimeException: Failure in server initialization
        at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:57)
        at org.apache.sqoop.server.ServerInitializer.contextInitialized(ServerInitializer.java:36)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
        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:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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: CONN_0007:Connector registration failed
        at org.apache.sqoop.connector.ConnectorManager.registerConnectors(ConnectorManager.java:234)
        at org.apache.sqoop.connector.ConnectorManager.initialize(ConnectorManager.java:195)
        at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:51)
        ... 25 more
Caused by: org.apache.sqoop.common.SqoopException: JDBCREPO_0026:Upgrade required but not allowed - Connector: generic-jdbc-connector
        at org.apache.sqoop.repository.JdbcRepository$3.doIt(JdbcRepository.java:176)
        at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:90)
        at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:61)
        at org.apache.sqoop.repository.JdbcRepository.registerConnector(JdbcRepository.java:156)
        at org.apache.sqoop.connector.ConnectorManager.registerConnectors(ConnectorManager.java:214)
        ... 27 more

Sep 12, 2013 9:20:02 AM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.apache.sqoop.server.ServerInitializer
java.lang.NullPointerException
        at org.apache.sqoop.framework.JobManager.destroy(JobManager.java:176)
        at org.apache.sqoop.core.SqoopServer.destroy(SqoopServer.java:36)
        at org.apache.sqoop.server.ServerInitializer.contextDestroyed(ServerInitializer.java:32)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4245)
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4886)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4750)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
        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:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Another log: sqoop-cmf-sqoop2-SQOOP_SERVER-NN1.lab.log.out
2013-09-12 09:20:00,735 INFO org.apache.sqoop.core.SqoopServer: Booting up Sqoop server
2013-09-12 09:20:00,743 INFO org.apache.sqoop.core.PropertiesConfigurationProvider: Starting config file poller thread
2013-09-12 09:20:00,745 INFO org.apache.sqoop.audit.AuditLoggerManager: Begin audit logger manager initialization
2013-09-12 09:20:00,747 INFO org.apache.sqoop.audit.AuditLoggerManager: Audit logger manager initialized: OK
2013-09-12 09:20:00,748 INFO org.apache.sqoop.repository.RepositoryManager: Setting system properties: {derby.stream.error.file=/var/log/sqoop2/derbyrepo.log}
2013-09-12 09:20:00,760 INFO org.apache.sqoop.repository.JdbcRepositoryContext: [repo-ctx] handler=org.apache.sqoop.repository.derby.DerbyRepositoryHandler, conn-url=jdbc:derby:/var/lib/sqoop2/repository/db;create=true, driver=org.apache.derby.jdbc.EmbeddedDriver, user=null, password=*****, jdbc-props={}, tx-isolation=READ_COMMITTED, max-conn=10
2013-09-12 09:20:01,106 INFO org.apache.sqoop.repository.derby.DerbyRepositoryHandler: DerbyRepositoryHandler initialized.
2013-09-12 09:20:01,108 INFO org.apache.sqoop.repository.JdbcRepositoryProvider: JdbcRepositoryProvider initialized
2013-09-12 09:20:01,108 INFO org.apache.sqoop.repository.JdbcRepositoryProvider: JdbcRepository initialized.
2013-09-12 09:20:01,109 INFO org.apache.sqoop.repository.RepositoryManager: Creating or upgrading on disk structures if necessary
2013-09-12 09:20:01,453 INFO org.apache.sqoop.repository.JdbcRepository: Creating repository schema objects
2013-09-12 09:20:01,861 INFO org.apache.sqoop.repository.JdbcRepositoryTransaction: Attempting transaction commit
2013-09-12 09:20:01,890 INFO org.apache.sqoop.repository.JdbcRepositoryTransaction: Attempting transaction commit
2013-09-12 09:20:01,891 INFO org.apache.sqoop.repository.RepositoryManager: Repository initialized: OK
2013-09-12 09:20:01,892 INFO org.apache.sqoop.connector.ConnectorManager: Connector config urls: [jar:file:/opt/cloudera/parcels/CDH-4.4.0-1.cdh4.4.0.p0.39/lib/sqoop2/webapps/sqoop/WEB-INF/lib/sqoop-connector-generic-jdbc-1.99.2-cdh4.4.0.jar!/sqoopconnector.properties]
2013-09-12 09:20:01,945 INFO org.apache.sqoop.connector.ConnectorHandler: Connector [org.apache.sqoop.connector.jdbc.GenericJdbcConnector] initialized.
2013-09-12 09:20:02,021 WARN org.apache.sqoop.repository.JdbcRepositoryTransaction: Marking transaction for rollback
2013-09-12 09:20:02,022 INFO org.apache.sqoop.repository.JdbcRepositoryTransaction: Attempting transaction roll-back
2013-09-12 09:20:02,023 ERROR org.apache.sqoop.core.SqoopServer: Server startup failure
org.apache.sqoop.common.SqoopException: CONN_0007:Connector registration failed
        at org.apache.sqoop.connector.ConnectorManager.registerConnectors(ConnectorManager.java:234)
        at org.apache.sqoop.connector.ConnectorManager.initialize(ConnectorManager.java:195)
        at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:51)
        at org.apache.sqoop.server.ServerInitializer.contextInitialized(ServerInitializer.java:36)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
        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:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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: JDBCREPO_0026:Upgrade required but not allowed - Connector: generic-jdbc-connector
        at org.apache.sqoop.repository.JdbcRepository$3.doIt(JdbcRepository.java:176)
        at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:90)
        at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:61)
        at org.apache.sqoop.repository.JdbcRepository.registerConnector(JdbcRepository.java:156)
        at org.apache.sqoop.connector.ConnectorManager.registerConnectors(ConnectorManager.java:214)
        ... 27 more
2013-09-12 09:20:02,032 INFO org.apache.sqoop.core.SqoopServer: Shutting down Sqoop server                                                                                          


 

On Thu, Sep 12, 2013 at 10:51 AM, Mengwei Ding <mengwei.ding@gmail.com> wrote:
Hi Yanting,

Yes, the @LOGDIR@ is the default directory where the sqoop server log file locates. You should find it in your Sqoop2 installation directory.

The log file location should be specified in sqoop.properties like this: org.apache.sqoop.repository.sysprop.derby.stream.error.file=@LOGDIR@/derbyrepo.log

Mengwei


On Wed, Sep 11, 2013 at 9:28 PM, Yanting Chen <mx.alexender@gmail.com> wrote:
Hi Mengwei

What do you mean by @LOGDIR@? Is it a directory name, or where can I get the location in my setting?

P.S. My Sqoop server is installed with CDH. 

Thanks a lot
Yanting


On Thu, Sep 12, 2013 at 12:36 AM, Mengwei Ding <mengwei.ding@gmail.com> wrote:
Hi,

The most probable reason is the sqoop sever failed to be satarted. Can you please show the system log, which should be in a directory "@LOGDIR@", if you did not make changes to the config file.

Mengwei


On Wed, Sep 11, 2013 at 4:15 AM, Yanting Chen <mx.alexender@gmail.com> wrote:

Today I upgraded Sqoop 2 from 1.99.1 to 1.99.2.
Then, when I execute the command, "show job -a", I got the error messages below.

sqoop:000> show job -a
Exception has occurred during processing command 
Exception: com.sun.jersey.api.client.UniformInterfaceException Message: GET http://MY_IP:12000/sqoop/v1/job/all returned a response status of 404 Not Found

I found others may already meet this problem, but no one give explicit answers to it.

Next, I went to search the log files and saw the exceptions.
org.apache.sqoop.common.SqoopException: CONN_0007:Connector registration failed
        at org.apache.sqoop.connector.ConnectorManager.registerConnectors(ConnectorManager.java:234)
        at org.apache.sqoop.connector.ConnectorManager.initialize(ConnectorManager.java:195)
        at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:51)
        at org.apache.sqoop.server.ServerInitializer.contextInitialized(ServerInitializer.java:36)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
        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:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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: JDBCREPO_0026:Upgrade required but not allowed - Connector: generic-jdbc-connector
        at org.apache.sqoop.repository.JdbcRepository$3.doIt(JdbcRepository.java:176)
        at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:90)
        at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:61)
        at org.apache.sqoop.repository.JdbcRepository.registerConnector(JdbcRepository.java:156)
        at org.apache.sqoop.connector.ConnectorManager.registerConnectors(ConnectorManager.java:214)
        ... 27 more
2013-09-11 14:35:06,240 INFO org.apache.sqoop.core.SqoopServer: Shutting down Sqoop server

Does anyone know what happens to this situation and how to address it?

Thanks a lot!