ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-12279) Oozie Rolling Upgrade Fails Due To Missing Database JAR
Date Sun, 05 Jul 2015 00:50:04 GMT
Jonathan Hurley created AMBARI-12279:
----------------------------------------

             Summary: Oozie Rolling Upgrade Fails Due To Missing Database JAR
                 Key: AMBARI-12279
                 URL: https://issues.apache.org/jira/browse/AMBARI-12279
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.1.0
            Reporter: Jonathan Hurley
            Assignee: Jonathan Hurley
            Priority: Blocker
             Fix For: 2.1.0


During a rolling upgrade form HDP 2.2 to HDP 2.3, Oozie's prepare step will fail when trying
to upgrade the database. The failure is due to a missing MySQL JAR when Oozie is setup to
use an existing database:

{code}
Traceback (most recent call last):\
  File \"/var/lib/ambari-agent/cache/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py\",
line 297, in <module>\
    OozieUpgrade().execute()\
  File \"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py\",
line 216, in execute\
    method(env)\
  File \"/var/lib/ambari-agent/cache/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py\",
line 234, in upgrade_oozie_database_and_sharelib\
    Execute(database_upgrade_command, user=params.oozie_user, logoutput=True)\
  File \"/usr/lib/python2.6/site-packages/resource_management/core/base.py\", line 157, in
__init__\
    self.env.run()\
  File \"/usr/lib/python2.6/site-packages/resource_management/core/environment.py\", line
152, in run\
    self.run_action(resource, action)\
  File \"/usr/lib/python2.6/site-packages/resource_management/core/environment.py\", line
118, in run_action\
    provider_action()\
  File \"/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py\",
line 254, in action_run\
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)\
  File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 70, in
inner\
    result = function(command, **kwargs)\
  File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 92, in
checked_call\
    tries=tries, try_sleep=try_sleep)\
  File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 140, in
_call_wrapper\
    result = _call(command, **kwargs_copy)\
  File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 291, in
_call\
    raise Fail(err_msg)\
resource_management.core.exceptions.Fail: Execution of \\'/usr/hdp/2.3.0.0-2511/oozie/bin/ooziedb.sh
upgrade -run\\' returned 1.   setting OOZIE_CONFIG=${OOZIE_CONFIG:-/etc/oozie/conf}\
  setting CATALINA_BASE=${CATALINA_BASE:-/usr/hdp/current/oozie-server/oozie-server}\
  setting CATALINA_TMPDIR=${CATALINA_TMPDIR:-/var/tmp/oozie}\
  setting OOZIE_CATALINA_HOME=/usr/lib/bigtop-tomcat\
  setting JAVA_HOME=/usr/jdk64/jdk1.7.0_67\
  setting JRE_HOME=${JAVA_HOME}\
  setting OOZIE_LOG=/grid/0/log/oozie\
  setting CATALINA_PID=/var/run/oozie/oozie.pid\
  setting OOZIE_DATA=/grid/0/hadoop/oozie/data\
  setting OOZIE_HTTP_PORT=11000\
  setting OOZIE_ADMIN_PORT=11001\
  setting JAVA_LIBRARY_PATH=/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64\
  setting OOZIE_CLIENT_OPTS=\"${OOZIE_CLIENT_OPTS} -Doozie.connection.retry.count=5 \"\
  setting CATALINA_OPTS=\"${CATALINA_OPTS} -Xmx2048m -XX:MaxPermSize=256m \"\
  setting OOZIE_CONFIG=${OOZIE_CONFIG:-/etc/oozie/conf}\
  setting CATALINA_BASE=${CATALINA_BASE:-/usr/hdp/current/oozie-server/oozie-server}\
  setting CATALINA_TMPDIR=${CATALINA_TMPDIR:-/var/tmp/oozie}\
  setting OOZIE_CATALINA_HOME=/usr/lib/bigtop-tomcat\
  setting JAVA_HOME=/usr/jdk64/jdk1.7.0_67\
  setting JRE_HOME=${JAVA_HOME}\
  setting OOZIE_LOG=/grid/0/log/oozie\
  setting CATALINA_PID=/var/run/oozie/oozie.pid\
  setting OOZIE_DATA=/grid/0/hadoop/oozie/data\
  setting OOZIE_HTTP_PORT=11000\
  setting OOZIE_ADMIN_PORT=11001\
  setting JAVA_LIBRARY_PATH=/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64\
  setting OOZIE_CLIENT_OPTS=\"${OOZIE_CLIENT_OPTS} -Doozie.connection.retry.count=5 \"\
  setting CATALINA_OPTS=\"${CATALINA_OPTS} -Xmx2048m -XX:MaxPermSize=256m \"\
\
Validate DB Connection\
SLF4J: Class path contains multiple SLF4J bindings.\
SLF4J: Found binding in [jar:file:/grid/0/hdp/2.3.0.0-2511/oozie/libserver/slf4j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]\
SLF4J: Found binding in [jar:file:/grid/0/hdp/2.3.0.0-2511/oozie/lib/slf4j-simple-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]\
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.\
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]\
\
Error: Could not connect to the database: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver\
\
Stack trace for the error was (for debug purposes):\
--------------------------------------\
java.lang.Exception: Could not connect to the database: java.lang.ClassNotFoundException:
com.mysql.jdbc.Driver\
\\tat org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:955)\
\\tat org.apache.oozie.tools.OozieDBCLI.upgradeDB(OozieDBCLI.java:207)\
\\tat org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:131)\
\\tat org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:79)\
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver\
\\tat java.net.URLClassLoader$1.run(URLClassLoader.java:366)\
\\tat java.net.URLClassLoader$1.run(URLClassLoader.java:355)\
\\tat java.security.AccessController.doPrivileged(Native Method)\
\\tat java.net.URLClassLoader.findClass(URLClassLoader.java:354)\
\\tat java.lang.ClassLoader.loadClass(ClassLoader.java:425)\
\\tat sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)\
\\tat java.lang.ClassLoader.loadClass(ClassLoader.java:358)\
\\tat java.lang.Class.forName0(Native Method)\
\\tat java.lang.Class.forName(Class.java:190)\
\\tat org.apache.oozie.tools.OozieDBCLI.createConnection(OozieDBCLI.java:944)\
\\tat org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:951)\
\\t... 3 more\
--------------------------------------')
2015-07-02 05:28:21,388 - Command: /usr/bin/ambari-python-wrap /var/lib/ambari-agent/cache/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
upgrade_oozie_database_and_sharelib /var/lib/ambari-agent/data/command-2258.json /var/lib/ambari-agent/cache/custom_actions
/var/lib/ambari-agent/data/structured-out-2258.json INFO /var/lib/ambari-agent/data/tmp
Code: 1, Out: 2015-07-02 05:28:18,392 - call['conf-select set-conf-dir --package hadoop --stack-version
2.3.0.0-2511 --conf-version 0'] {'logoutput': False, 'quiet': False}
2015-07-02 05:28:18,435 - call returned (0, '/usr/hdp/2.3.0.0-2511/hadoop/conf -> /etc/hadoop/2.3.0.0-2511/0')
2015-07-02 05:28:18,444 - Execute['/usr/bin/kinit -kt /etc/security/keytabs/oozie.service.keytab
oozie/os-r6-xriqss-c2dalsec-10.openstacklocal@EXAMPLE.COM'] {'logoutput': True, 'user': 'oozie'}
2015-07-02 05:28:18,656 - Upgrading the Oozie database...
2015-07-02 05:28:18,656 - Execute['/usr/hdp/2.3.0.0-2511/oozie/bin/ooziedb.sh upgrade -run']
{'logoutput': True, 'user': 'oozie'}
  setting OOZIE_CONFIG=${OOZIE_CONFIG:-/etc/oozie/conf}
  setting CATALINA_BASE=${CATALINA_BASE:-/usr/hdp/current/oozie-server/oozie-server}
  setting CATALINA_TMPDIR=${CATALINA_TMPDIR:-/var/tmp/oozie}
  setting OOZIE_CATALINA_HOME=/usr/lib/bigtop-tomcat
  setting JAVA_HOME=/usr/jdk64/jdk1.7.0_67
  setting JRE_HOME=${JAVA_HOME}
  setting OOZIE_LOG=/grid/0/log/oozie
  setting CATALINA_PID=/var/run/oozie/oozie.pid
  setting OOZIE_DATA=/grid/0/hadoop/oozie/data
  setting OOZIE_HTTP_PORT=11000
  setting OOZIE_ADMIN_PORT=11001
  setting JAVA_LIBRARY_PATH=/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64
  setting OOZIE_CLIENT_OPTS=\"${OOZIE_CLIENT_OPTS} -Doozie.connection.retry.count=5 \"
  setting CATALINA_OPTS=\"${CATALINA_OPTS} -Xmx2048m -XX:MaxPermSize=256m \"
  setting OOZIE_CONFIG=${OOZIE_CONFIG:-/etc/oozie/conf}
  setting CATALINA_BASE=${CATALINA_BASE:-/usr/hdp/current/oozie-server/oozie-server}
  setting CATALINA_TMPDIR=${CATALINA_TMPDIR:-/var/tmp/oozie}
  setting OOZIE_CATALINA_HOME=/usr/lib/bigtop-tomcat
  setting JAVA_HOME=/usr/jdk64/jdk1.7.0_67
  setting JRE_HOME=${JAVA_HOME}
  setting OOZIE_LOG=/grid/0/log/oozie
  setting CATALINA_PID=/var/run/oozie/oozie.pid
  setting OOZIE_DATA=/grid/0/hadoop/oozie/data
  setting OOZIE_HTTP_PORT=11000
  setting OOZIE_ADMIN_PORT=11001
  setting JAVA_LIBRARY_PATH=/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64
  setting OOZIE_CLIENT_OPTS=\"${OOZIE_CLIENT_OPTS} -Doozie.connection.retry.count=5 \"
  setting CATALINA_OPTS=\"${CATALINA_OPTS} -Xmx2048m -XX:MaxPermSize=256m \"

Validate DB Connection
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/grid/0/hdp/2.3.0.0-2511/oozie/libserver/slf4j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/grid/0/hdp/2.3.0.0-2511/oozie/lib/slf4j-simple-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

Error: Could not connect to the database: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Stack trace for the error was (for debug purposes):
--------------------------------------
java.lang.Exception: Could not connect to the database: java.lang.ClassNotFoundException:
com.mysql.jdbc.Driver
\tat org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:955)
\tat org.apache.oozie.tools.OozieDBCLI.upgradeDB(OozieDBCLI.java:207)
\tat org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:131)
\tat org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:79)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
\tat java.net.URLClassLoader$1.run(URLClassLoader.java:366)
\tat java.net.URLClassLoader$1.run(URLClassLoader.java:355)
\tat java.security.AccessController.doPrivileged(Native Method)
\tat java.net.URLClassLoader.findClass(URLClassLoader.java:354)
\tat java.lang.ClassLoader.loadClass(ClassLoader.java:425)
\tat sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
\tat java.lang.ClassLoader.loadClass(ClassLoader.java:358)
\tat java.lang.Class.forName0(Native Method)
\tat java.lang.Class.forName(Class.java:190)
\tat org.apache.oozie.tools.OozieDBCLI.createConnection(OozieDBCLI.java:944)
\tat org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:951)
\t... 3 more
--------------------------------------

Traceback (most recent call last):
  File \"/var/lib/ambari-agent/cache/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py\",
line 297, in <module>
    OozieUpgrade().execute()
  File \"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py\",
line 216, in execute
    method(env)
  File \"/var/lib/ambari-agent/cache/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py\",
line 234, in upgrade_oozie_database_and_sharelib
    Execute(database_upgrade_command, user=params.oozie_user, logoutput=True)
  File \"/usr/lib/python2.6/site-packages/resource_management/core/base.py\", line 157, in
__init__
    self.env.run()
  File \"/usr/lib/python2.6/site-packages/resource_management/core/environment.py\", line
152, in run
    self.run_action(resource, action)
  File \"/usr/lib/python2.6/site-packages/resource_management/core/environment.py\", line
118, in run_action
    provider_action()
  File \"/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py\",
line 254, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 70, in
inner
    result = function(command, **kwargs)
  File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 92, in
checked_call
    tries=tries, try_sleep=try_sleep)
  File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 140, in
_call_wrapper
    result = _call(command, **kwargs_copy)
  File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 291, in
_call
    raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of '/usr/hdp/2.3.0.0-2511/oozie/bin/ooziedb.sh
upgrade -run' returned 1.   setting OOZIE_CONFIG=${OOZIE_CONFIG:-/etc/oozie/conf}
  setting CATALINA_BASE=${CATALINA_BASE:-/usr/hdp/current/oozie-server/oozie-server}
  setting CATALINA_TMPDIR=${CATALINA_TMPDIR:-/var/tmp/oozie}
  setting OOZIE_CATALINA_HOME=/usr/lib/bigtop-tomcat
  setting JAVA_HOME=/usr/jdk64/jdk1.7.0_67
  setting JRE_HOME=${JAVA_HOME}
  setting OOZIE_LOG=/grid/0/log/oozie
  setting CATALINA_PID=/var/run/oozie/oozie.pid
  setting OOZIE_DATA=/grid/0/hadoop/oozie/data
  setting OOZIE_HTTP_PORT=11000
  setting OOZIE_ADMIN_PORT=11001
  setting JAVA_LIBRARY_PATH=/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64
  setting OOZIE_CLIENT_OPTS=\"${OOZIE_CLIENT_OPTS} -Doozie.connection.retry.count=5 \"
  setting CATALINA_OPTS=\"${CATALINA_OPTS} -Xmx2048m -XX:MaxPermSize=256m \"
  setting OOZIE_CONFIG=${OOZIE_CONFIG:-/etc/oozie/conf}
  setting CATALINA_BASE=${CATALINA_BASE:-/usr/hdp/current/oozie-server/oozie-server}
  setting CATALINA_TMPDIR=${CATALINA_TMPDIR:-/var/tmp/oozie}
  setting OOZIE_CATALINA_HOME=/usr/lib/bigtop-tomcat
  setting JAVA_HOME=/usr/jdk64/jdk1.7.0_67
  setting JRE_HOME=${JAVA_HOME}
  setting OOZIE_LOG=/grid/0/log/oozie
  setting CATALINA_PID=/var/run/oozie/oozie.pid
  setting OOZIE_DATA=/grid/0/hadoop/oozie/data
  setting OOZIE_HTTP_PORT=11000
  setting OOZIE_ADMIN_PORT=11001
  setting JAVA_LIBRARY_PATH=/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64
  setting OOZIE_CLIENT_OPTS=\"${OOZIE_CLIENT_OPTS} -Doozie.connection.retry.count=5 \"
  setting CATALINA_OPTS=\"${CATALINA_OPTS} -Xmx2048m -XX:MaxPermSize=256m \"

Validate DB Connection
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/grid/0/hdp/2.3.0.0-2511/oozie/libserver/slf4j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/grid/0/hdp/2.3.0.0-2511/oozie/lib/slf4j-simple-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

Error: Could not connect to the database: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Stack trace for the error was (for debug purposes):
--------------------------------------
java.lang.Exception: Could not connect to the database: java.lang.ClassNotFoundException:
com.mysql.jdbc.Driver
\tat org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:955)
\tat org.apache.oozie.tools.OozieDBCLI.upgradeDB(OozieDBCLI.java:207)
\tat org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:131)
\tat org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:79)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
\tat java.net.URLClassLoader$1.run(URLClassLoader.java:366)
\tat java.net.URLClassLoader$1.run(URLClassLoader.java:355)
\tat java.security.AccessController.doPrivileged(Native Method)
\tat java.net.URLClassLoader.findClass(URLClassLoader.java:354)
\tat java.lang.ClassLoader.loadClass(ClassLoader.java:425)
\tat sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
\tat java.lang.ClassLoader.loadClass(ClassLoader.java:358)
\tat java.lang.Class.forName0(Native Method)
\tat java.lang.Class.forName(Class.java:190)
\tat org.apache.oozie.tools.OozieDBCLI.createConnection(OozieDBCLI.java:944)
\tat org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:951)
\t... 3 more
--------------------------------------
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message