无法建立到任何数据库主机的连接

时间:2022-07-05 18:54:53

I've been trying to install Phabricator on Centos 6.8 and Ubuntu 14.04. On both attempts, when configuring MySQL with phab, I get the following errors:

我一直在为Centos 6.8和Ubuntu 14.04安装Phabricator。在两次尝试中,使用phab配置MySQL时,我都有以下错误:

    EXCEPTION: (PhabricatorClusterStrandedException) Unable to establish a connection to any database host (while trying "phabricator_config"). All masters and replicas are completely unreachable. at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:140]
arcanist(head=master, ref.master=fad85844314b), phabricator(head=master, ref.master=4dadad53ae5d), phutil(head=master, ref.master=086df1ba443c)
    #0 PhabricatorLiskDAO::raiseUnreachable(string) called at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:111]
    #1 PhabricatorLiskDAO::newClusterConnection(string, string, string) called at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:66]
    #2 PhabricatorLiskDAO::establishLiveConnection(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1008]
    #3 LiskDAO::establishConnection(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:516]
    #4 LiskDAO::loadRawDataWhere(string, string)
    #5 call_user_func_array(array, array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:476]
    #6 LiskDAO::loadAllWhere(string, string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:19]
    #7 PhabricatorConfigDatabaseSource::loadConfig(string) called at [<phabricator>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7]
    #8 PhabricatorConfigDatabaseSource::__construct(string) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:249]
    #9 PhabricatorEnv::buildConfigurationSourceStack(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:95]
    #10 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:75]
    #11 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [<phabricator>/scripts/init/lib.php:22]
    #12 init_phabricator_script(array) called at [<phabricator>/scripts/init/init-setup.php:12]
    #13 require_once(string) called at [<phabricator>/scripts/sql/manage_storage.php:5]

I've been following this installation guide: https://secure.phabricator.com/book/phabricator/article/configuration_guide/

我一直在遵循这个安装指南:https://secure.phabricator.com/book/phabricator/article/configuration_guide/

I've also attempted to follow others online, with no success. The command attempted was

我也尝试在网上追随别人,但没有成功。命令是未遂

./bin/storage upgrade

/ bin /存储升级

I've also attempted

我也尝试

./bin/storage upgrade --user --password

。/ bin /存储升级——用户密码

And other commands such as setting the host or user on ./bin/config, but all seem to cause the same error.

以及其他命令,如设置主机或用户on ./bin/config,但所有这些似乎都导致相同的错误。

I'm not sure what to do at this point, I've been playing with every config I can find.

我不知道现在该怎么做,我一直在使用我能找到的每一个配置。

1 个解决方案

#1


2  

I was hitting the same exception today while running 'bin/config set mysql.host localhost'. I suspect that there might be a bug with the latest phabricator code (as of 2016/11/23), so I switched to an earlier snapshot and things work just fine.

我今天在运行bin/config set mysql时遇到了同样的问题。主机主机”。我怀疑最新的phabricator代码可能存在bug(从2016年11月23日开始),所以我切换到更早的快照,一切正常。

#1


2  

I was hitting the same exception today while running 'bin/config set mysql.host localhost'. I suspect that there might be a bug with the latest phabricator code (as of 2016/11/23), so I switched to an earlier snapshot and things work just fine.

我今天在运行bin/config set mysql时遇到了同样的问题。主机主机”。我怀疑最新的phabricator代码可能存在bug(从2016年11月23日开始),所以我切换到更早的快照,一切正常。