BDB0091 DB_VERSION_MISMATCH:数据库环境版本与 Ambari 2.4.2 不匹配

问题描述 投票:0回答:2

我正在通过 Ambari 2.4.2 在 Centos 7.2 主机上部署 hadoop 服务。当我进入过程中的“安装、启动和测试”阶段时,出现以下错误:

Execution of '/usr/bin/yum -d 0 -e 0 -y install hdp-select' returned 1. 
error: db5 error(-30969) from dbenv->open: BDB0091
DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 -  (-30969)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

但是,如果我在代理节点上手动运行相同的命令,它就可以正常工作。请查看附件中的完整日志。

stderr: 
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/hook.py", line 37, in <module>
    BeforeInstallHook().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/hook.py", line 34, in hook
    install_packages()
  File "/mnt/disk0/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/shared_initialization.py", line 37, in install_packages
    retry_count=params.agent_stack_retry_count)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 54, in action_install
    self.install_package(package_name, self.resource.use_repos, self.resource.skip_repos)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 51, in install_package
    self.checked_call_with_retries(cmd, sudo=True, logoutput=self.get_logoutput())
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 86, in checked_call_with_retries
    return self._call_with_retries(cmd, is_checked=True, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 98, in _call_with_retries
    code, out = func(cmd, **kwargs)
  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 293, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/bin/yum -d 0 -e 0 -y install hdp-select' returned 1. error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 -  (-30969)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
 stdout:
2017-02-10 09:43:55,680 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2017-02-10 09:43:55,681 - Group['hadoop'] {}
2017-02-10 09:43:55,682 - Group['users'] {}
2017-02-10 09:43:55,683 - User['hive'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-02-10 09:43:55,683 - User['infra-solr'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-02-10 09:43:55,684 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-02-10 09:43:55,684 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-02-10 09:43:55,685 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']}
2017-02-10 09:43:55,685 - User['tez'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']}
2017-02-10 09:43:55,686 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-02-10 09:43:55,686 - User['yarn'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-02-10 09:43:55,687 - User['hcat'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-02-10 09:43:55,687 - User['mapred'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-02-10 09:43:55,688 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2017-02-10 09:43:55,689 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'}
2017-02-10 09:43:55,695 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] due to not_if
2017-02-10 09:43:55,695 - Group['hdfs'] {}
2017-02-10 09:43:55,696 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': [u'hadoop', u'hdfs']}
2017-02-10 09:43:55,696 - FS Type: 
2017-02-10 09:43:55,696 - Directory['/etc/hadoop'] {'mode': 0755}
2017-02-10 09:43:55,697 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 01777}
2017-02-10 09:43:55,697 - Changing owner for /var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir from 0 to hdfs
2017-02-10 09:43:55,712 - Initializing 2 repositories
2017-02-10 09:43:55,712 - Repository['HDP-2.4'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.3.0/', 'action': ['create'], 'components': [u'HDP', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP', 'mirror_list': None}
2017-02-10 09:43:55,719 - File['/etc/yum.repos.d/HDP.repo'] {'content': '[HDP-2.4]\nname=HDP-2.4\nbaseurl=http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.4.3.0/\n\npath=/\nenabled=1\ngpgcheck=0'}
2017-02-10 09:43:55,720 - Repository['HDP-UTILS-1.1.0.20'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7', 'action': ['create'], 'components': [u'HDP-UTILS', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-UTILS', 'mirror_list': None}
2017-02-10 09:43:55,723 - File['/etc/yum.repos.d/HDP-UTILS.repo'] {'content': '[HDP-UTILS-1.1.0.20]\nname=HDP-UTILS-1.1.0.20\nbaseurl=http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7\n\npath=/\nenabled=1\ngpgcheck=0'}
2017-02-10 09:43:55,723 - Package['unzip'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2017-02-10 09:43:55,795 - Skipping installation of existing package unzip
2017-02-10 09:43:55,795 - Package['curl'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2017-02-10 09:43:55,803 - Skipping installation of existing package curl
2017-02-10 09:43:55,803 - Package['hdp-select'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2017-02-10 09:43:55,811 - Installing package hdp-select ('/usr/bin/yum -d 0 -e 0 -y install hdp-select')
2017-02-10 09:43:55,922 - Execution of '/usr/bin/yum -d 0 -e 0 -y install hdp-select' returned 1. error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 -  (-30969)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
2017-02-10 09:43:55,923 - Failed to install package hdp-select. Executing '/usr/bin/yum clean metadata'
2017-02-10 09:43:56,036 - Execution of '['/usr/bin/yum', 'clean', 'metadata']' returned 1. error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 -  (-30969)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
2017-02-10 09:43:56,037 - Retrying to install package hdp-select after 30 seconds

Command failed after 1 tries

hadoop hadoop2 centos7 ambari
2个回答
0
投票

由于 DC/OS 与我的集群计算机上的 Ambari 一起运行,我找到了暂时取消设置 LD_LIBRARY_PATH 环境变量的解决方案。如https://dcosjira.atlassian.net/browse/DCOS-586中所述,问题的原因是 DC/OS 安装程序将 LD_LIBRARY_PATH 修改为 /opt/mesosphere/lib。在下一版本的 DC/OS (1.9) 中,默认情况下将不再修改路径。


0
投票

就我而言,当 Spinnaker 烘焙阶段失败时,我遇到了以下问题。

googlecompute: RPM: error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
googlecompute: RPM: error: cannot open Packages index using db5 -  (-30969)
googlecompute: RPM: error: cannot open Packages database in /var/lib/rpm
googlecompute: The downloaded packages were saved in cache until the next successful transaction.

失败原因:我在 Spinnaker 部署阶段错误地使用了“环境”标签值作为“阶段”而不是“产品”。由于我尝试在 Prod 项目中部署,因此失败并出现上述错误。

一旦我将环境值更新为“prod”,我的管道就完成了。

© www.soinside.com 2019 - 2024. All rights reserved.