我一直在尝试在 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]
我一直在关注这个安装指南:https://secure.phabricator.com/book/phabricator/article/configuration_guide/
我也尝试在网上关注其他人,但没有成功。
尝试的命令是
我也尝试过
和其他命令,例如在 ./bin/config 上设置主机或用户,但似乎都导致相同的错误。
我不知道此时该做什么,我一直在玩我能找到的每个配置。
最佳答案
我今天在运行“bin/config set mysql.host localhost”时遇到了同样的异常。我怀疑最新的 phabricator 代码可能存在错误(截至 2016 年 11 月 23 日),所以我切换到较早的快照并且一切正常。
关于php - 无法与任何数据库主机建立连接,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40759269/