【问题标题】:Cannot access embedded PostgreSQL database of Cloudera Manager无法访问 Cloudera Manager 的嵌入式 PostgreSQL 数据库
【发布时间】:2016-05-11 22:50:25
【问题描述】:

由于嵌入式 PostgreSQL 数据库出现问题,我在访问 Cloudera Manager UI 时遇到问题。

Web UI 向我展示了:

HTTP 错误 500

访问 /cmf/home 时出现问题。原因:

org.hibernate.exception.GenericJDBCException: Could not open connection Caused by:

javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException:无法打开 连接(...)

这似乎是因为我在/var/log/cloudera-scm-server/db.log:

FATAL:  password authentication failed for user "scm"

我已经尝试删除/etc/cloudera-scm-server-db/db.*和/var/lib/cloudera-scm-server-db/data/,并重新启动cloudera-scm-server-db服务,但无济于事。

奇怪的是我可以使用以下方法访问数据库:

psql -U scm -p 7432 -h localhost -d scm

使用/etc/cloudera-scm-server-db/db.properties生成的密码。

我也可以使用用户cloudera-scm 和/var/lib/cloudera-scm-server-db/data/generated_password.txt 中生成的密码毫无问题地访问。

感谢任何想法。

【问题讨论】:

  • 我也有同样的问题。

标签: cloudera cloudera-cdh cloudera-manager


【解决方案1】:

The password in generated_password.txt is for different user i.e. cloudera-scm

  1. 运行以下命令并输入在/var/lib/cloudera-scm-server-db/data/generated_password.txt中找到的密码

    psql -U cloudera-scm -p 7432 -h localhost -d postgres

  2. 运行 \l 以确定数据库和所有者名称: postgres=# \l List of databases Name | Owner | Encoding | Collation | Ctype | Access privileges
    -----------+--------------+----------+------------+------------+----------------------------------- amon | amon | UTF8 | en_US.UTF8 | en_US.UTF8 | hive | hive | UTF8 | en_US.UTF8 | en_US.UTF8 | nav | nav | UTF8 | en_US.UTF8 | en_US.UTF8 | navms | navms | UTF8 | en_US.UTF8 | en_US.UTF8 | postgres | cloudera-scm | UTF8 | en_US.UTF8 | en_US.UTF8 | rman | rman | UTF8 | en_US.UTF8 | en_US.UTF8 | scm | scm | UTF8 | en_US.UTF8 | en_US.UTF8 | template0 | cloudera-scm | UTF8 | en_US.UTF8 | en_US.UTF8 | =c/"cloudera-scm" : "cloudera-scm"=CTc/"cloudera-scm" template1 | cloudera-scm | UTF8 | en_US.UTF8 | en_US.UTF8 | =c/"cloudera-scm" : "cloudera-scm"=CTc/"cloudera-scm" (9 rows)

  3. 使用 \password 命令为所有者设置密码。例如,要为 scm 所有者设置密码,请执行以下操作:

    postgres=# \password amon Enter new password: Enter it again:

这样你就可以修改scm用户的密码了。

PS。很抱歉格式不好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多