Page MenuHomePhorge

Unable to arc-diff against this install
Closed, ResolvedPublic

Description

[2023-05-15 19:46:10] EXCEPTION: (PhabricatorClusterStrandedException) Unable to establish a connection to any database host (while trying "phabricator_config"). All masters and replicas are completely unreachable.

AphrontConnectionQueryException: Attempt to connect to root@localhost failed with error #1698: Access denied for user 'root'@'localhost'. at [<phorge>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:177]
arcanist(head=master, ref.master=c14785c3795c), phorge(head=nonemp, ref.master=2df7ea13a387, ref.nonemp=3d995b30f534)
  #0 PhabricatorLiskDAO::raiseUnreachable(string, AphrontConnectionQueryException) called at [<phorge>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:134]
  #1 PhabricatorLiskDAO::newClusterConnection(string, string, string) called at [<phorge>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:69]
  #2 PhabricatorLiskDAO::establishLiveConnection(string) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:856]
  #3 LiskDAO::establishConnection(string) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:521]
  #4 LiskDAO::loadRawDataWhere(string, string) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:481]
  #5 LiskDAO::loadAllWhere(string, string) called at [<phorge>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:17]
  #6 PhabricatorConfigDatabaseSource::loadConfig(string) called at [<phorge>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7]
  #7 PhabricatorConfigDatabaseSource::__construct(string) called at [<phorge>/src/infrastructure/env/PhabricatorEnv.php:262]
  #8 PhabricatorEnv::buildConfigurationSourceStack(boolean) called at [<phorge>/src/infrastructure/env/PhabricatorEnv.php:95]
  #9 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [<phorge>/src/infrastructure/env/PhabricatorEnv.php:75]
  #10 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [<phorge>/scripts/init/lib.php:26]
  #11 init_phabricator_script(array) called at [<phorge>/scripts/init/init-script.php:7]
  #12 require_once(string) called at [<phorge>/scripts/__init_script__.php:3]
  #13 require_once(string) called at [<phorge>/src/infrastructure/testing/PhabricatorTestCase.php:62]
  #14 PhabricatorTestCase::willRunTestCases(array) called at [<arcanist>/src/unit/engine/PhutilUnitTestEngine.php:64]
  #15 PhutilUnitTestEngine::run() called at [<arcanist>/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php:148]
  #16 ArcanistConfigurationDrivenUnitTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:170]
  #17 ArcanistUnitWorkflow::run() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1231]
  #18 ArcanistDiffWorkflow::runUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1133]
  #19 ArcanistDiffWorkflow::runLintUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:363]
  #20 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:427]

Event Timeline

Are you 100% sure that you are communicating with this upstream?

To me, it seems that you are using root@localhost and so you are contacting your local installation

I say this, since we are receiving Diffs from many other people without issues it seems:

https://we.phorge.it/differential/query/all/

Pretty sure, here's the full --trace output, you can see it's trying to talk to we.phorge.it (also, I see we.phorge.it in my ~/.arcrc)

arc diff --trace master
 ARGV  /home/arnold/devtools/arcanist/bin/arc diff --trace master
 LOAD  Loading library from "/home/arnold/builds/phorge/src"...
>>> [1] (+0) <exec> $ php -f /home/arnold/devtools/arcanist/scripts/arcanist.php -- diff --trace master
 ARGV  /home/arnold/devtools/arcanist/scripts/arcanist.php diff --trace master
 LOAD  Loaded "arcanist" from "/home/arnold/devtools/arcanist/src".
Config: Reading user configuration file "/home/arnold/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Reading .arcconfig from "/home/arnold/builds/phorge/.arcconfig".
Working Copy: Path "/home/arnold/builds/phorge" is part of `git` working copy "/home/arnold/builds/phorge".
Working Copy: Project root is at "/home/arnold/builds/phorge".
Config: Did not find local configuration at "/home/arnold/builds/phorge/.git/arc/config".
Loading phutil library from '/home/arnold/builds/phorge/src'...
>>> [1] (+0) <http> https://we.phorge.it/api/user.whoami
<<< [1] (+103) <http> 103,210 us
>>> [2] (+105) <exec> $ git --version
<<< [2] (+107) <exec> 2,585 us
>>> [3] (+107) <exec> $ git status --porcelain=2 -z
<<< [3] (+120) <exec> 12,738 us
>>> [4] (+120) <event> diff.didCollectChanges <listeners = 0>
<<< [4] (+120) <event> 25 us
>>> [5] (+120) <exec> $ git rev-parse HEAD
<<< [5] (+122) <exec> 2,002 us
>>> [6] (+122) <exec> $ git merge-base -- master 3d995b30f5348cc6282175f9e091482ecf01c4b9
<<< [6] (+126) <exec> 3,227 us
>>> [7] (+126) <exec> $ git log --first-parent --format=medium 2df7ea13a3877250354556f08f40e26ccc727144..3d995b30f5348cc6282175f9e091482ecf01c4b9 --
<<< [7] (+128) <exec> 2,118 us
>>> [8] (+129) <exec> $ git log 3d995b30f5348cc6282175f9e091482ecf01c4b9 --not 2df7ea13a3877250354556f08f40e26ccc727144 --format='%H%x01%T%x01%P%x01%at%x01%an%x01%aE%x01%s%x01%s%n%n%b%x02' --
<<< [8] (+131) <exec> 1,660 us
>>> [9] (+131) <http> https://we.phorge.it/api/differential.query
<<< [9] (+189) <http> 58,418 us
>>> [10] (+189) <exec> $ git rev-parse --git-dir
<<< [10] (+191) <exec> 2,155 us
>>> [11] (+192) <exec> $ git log 3d995b30f5348cc6282175f9e091482ecf01c4b9 --not 2df7ea13a3877250354556f08f40e26ccc727144 --format='%H%x01%T%x01%P%x01%at%x01%an%x01%aE%x01%s%x01%s%n%n%b%x02' --
<<< [11] (+194) <exec> 2,224 us
>>> [12] (+194) <http> https://we.phorge.it/api/differential.parsecommitmessage
<<< [12] (+256) <http> 61,626 us
>>> [13] (+256) <event> diff.willBuildMessage <listeners = 0>
<<< [13] (+256) <event> 19 us
>>> [14] (+256) <http> https://we.phorge.it/api/differential.getcommitmessage
<<< [14] (+325) <http> 69,010 us
>>> [15] (+325) <exec> $ git symbolic-ref --quiet HEAD
<<< [15] (+328) <exec> 2,778 us
>>> [16] (+328) <exec> $ which editor
<<< [16] (+330) <exec> 2,093 us
Launching editor "editor"...
Provide the details for a new revision, then save and exit.
>>> [17] (+331) <exec> $ editor /tmp/edit.9szq01wvonk888ws/new-commit
<<< [17] (+2,164) <exec> 1,833,498 us
>>> [18] (+2,165) <http> https://we.phorge.it/api/differential.parsecommitmessage
<<< [18] (+2,241) <http> 76,545 us
>>> [19] (+2,242) <http> https://we.phorge.it/api/user.query
<<< [19] (+2,288) <http> 46,049 us
>>> [20] (+2,288) <event> diff.didBuildMessage <listeners = 0>
<<< [20] (+2,288) <event> 19 us
Linting...
>>> [21] (+2,289) <exec> $ git rev-parse HEAD
<<< [21] (+2,292) <exec> 2,640 us
>>> [22] (+2,292) <exec> $ git merge-base -- 2df7ea13a3877250354556f08f40e26ccc727144 3d995b30f5348cc6282175f9e091482ecf01c4b9
<<< [22] (+2,294) <exec> 2,327 us
>>> [23] (+2,294) <exec> $ git diff --no-ext-diff --no-textconv --submodule=short --raw 2df7ea13a3877250354556f08f40e26ccc727144 HEAD --
<<< [23] (+2,296) <exec> 2,359 us
>>> [24] (+2,297) <exec> $ git -c 'diff.suppressBlankEmpty=false' diff --no-ext-diff --no-textconv --submodule=short --no-color --src-prefix=a/ --dst-prefix=b/ -U32767 -M -C 2df7ea13a3877250354556f08f40e26ccc727144 --
<<< [24] (+2,302) <exec> 5,235 us
Examining paths for linter 'chmod'.
Found 1 matching paths for linter 'chmod'.
Examining paths for linter 'filename'.
Found 1 matching paths for linter 'filename'.
Examining paths for linter 'generated'.
Found 1 matching paths for linter 'generated'.
Examining paths for linter 'javelin'.
Found 0 matching paths for linter 'javelin'.
Examining paths for linter 'jshint-browser'.
Found 0 matching paths for linter 'jshint-browser'.
Examining paths for linter 'jshint-node'.
Found 0 matching paths for linter 'jshint-node'.
Examining paths for linter 'json'.
Found 0 matching paths for linter 'json'.
Examining paths for linter 'merge-conflict'.
Found 1 matching paths for linter 'merge-conflict'.
Examining paths for linter 'nolint'.
Found 1 matching paths for linter 'nolint'.
Examining paths for linter 'phutil-library'.
Found 1 matching paths for linter 'phutil-library'.
Examining paths for linter 'spelling'.
Found 1 matching paths for linter 'spelling'.
Examining paths for linter 'text'.
Found 1 matching paths for linter 'text'.
Examining paths for linter 'text-without-length'.
Found 0 matching paths for linter 'text-without-length'.
Examining paths for linter 'xhpast'.
Found 1 matching paths for linter 'xhpast'.
>>> [25] (+2,310) <exec> $ which javelinsymbols
<<< [25] (+2,312) <exec> 2,051 us
>>> [26] (+2,312) <exec> $ which jshint
<<< [26] (+2,314) <exec> 2,082 us
>>> [27] (+2,314) <exec> $ which jshint
<<< [27] (+2,316) <exec> 2,095 us
>>> [28] (+2,317) <exec> $ /home/arnold/devtools/arcanist/src/parser/xhpast/bin/xhpast --version
<<< [28] (+2,320) <exec> 3,460 us
>>> [29] (+2,320) <lint> Generated Code <paths = 1>
<<< [29] (+2,320) <lint> 21 us
>>> [30] (+2,320) <lint> Lint Disabler <paths = 1>
<<< [30] (+2,320) <lint> 9 us
>>> [31] (+2,320) <lint> Basic Text Linter <paths = 1>
<<< [31] (+2,320) <lint> 49 us
>>> [32] (+2,320) <lint> Chmod <paths = 1>
<<< [32] (+2,320) <lint> 6 us
>>> [33] (+2,320) <lint> Filename <paths = 1>
<<< [33] (+2,320) <lint> 8 us
>>> [34] (+2,320) <lint> Merge Conflicts <paths = 1>
<<< [34] (+2,320) <lint> 15 us
>>> [35] (+2,320) <lint> Spellchecker <paths = 1>
<<< [35] (+2,321) <lint> 934 us
>>> [36] (+2,321) <lint> XHPAST Lint <paths = 1>
<<< [36] (+2,321) <lint> 21 us
>>> [37] (+2,321) <lint> Phutil Library Linter <paths = 1>
>>> [38] (+2,322) <exec> $ php -f /home/arnold/devtools/arcanist/src/moduleutils/../../support/lib/extract-symbols.php -- --ugly --builtins -- 
<<< [38] (+2,355) <exec> 33,588 us
>>> [39] (+2,356) <exec> $ which find
<<< [39] (+2,358) <exec> 1,813 us
>>> [40] (+2,358) <exec> $ find . "(" -path '*/.*' ")" -prune -o -type f "(" -name '*.php' ")" -print0
<<< [40] (+2,363) <exec> 4,388 us
>>> [41] (+2,374) <exec> $ which find
<<< [41] (+2,376) <exec> 1,913 us
>>> [42] (+2,376) <exec> $ find . "(" -path '*/.*' ")" -prune -o -type f "(" -name '*.php' ")" -print0
<<< [42] (+2,393) <exec> 17,311 us
<<< [37] (+2,475) <lint> 153,557 us
>>> [43] (+2,475) <lint> Generated Code <paths = 1>
<<< [43] (+2,475) <lint> 10 us
>>> [44] (+2,475) <lint> Lint Disabler <paths = 1>
<<< [44] (+2,475) <lint> 5 us
>>> [45] (+2,475) <lint> Basic Text Linter <paths = 1>
<<< [45] (+2,475) <lint> 5 us
>>> [46] (+2,475) <lint> Chmod <paths = 1>
<<< [46] (+2,475) <lint> 5 us
>>> [47] (+2,475) <lint> Filename <paths = 1>
<<< [47] (+2,475) <lint> 5 us
>>> [48] (+2,475) <lint> Merge Conflicts <paths = 1>
<<< [48] (+2,475) <lint> 5 us
>>> [49] (+2,475) <lint> Spellchecker <paths = 1>
<<< [49] (+2,475) <lint> 5 us
>>> [50] (+2,475) <lint> XHPAST Lint <paths = 1>
>>> [51] (+2,475) <exec> $ /home/arnold/devtools/arcanist/src/parser/xhpast/bin/xhpast
<<< [51] (+2,478) <exec> 2,689 us
<<< [50] (+2,485) <lint> 9,629 us
>>> [52] (+2,485) <lint> Phutil Library Linter <paths = 1>
<<< [52] (+2,485) <lint> 9 us
 OKAY  No lint messages.
 LINT OKAY  No lint problems.
Running unit tests...
>>> [53] (+2,496) <connect> phabricator_config
<<< [53] (+2,496) <connect> 319 us

[2023-05-17 15:01:10] EXCEPTION: (PhabricatorClusterStrandedException) Unable to establish a connection to any database host (while trying "phabricator_config"). All masters and replicas are completely unreachable.

AphrontConnectionQueryException: Attempt to connect to root@localhost failed with error #1698: Access denied for user 'root'@'localhost'. at [<phorge>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:177]
arcanist(head=master, ref.master=c14785c3795c), phorge(head=nonemp, ref.master=2df7ea13a387, ref.nonemp=3d995b30f534)
  #0 PhabricatorLiskDAO::raiseUnreachable(string, AphrontConnectionQueryException) called at [<phorge>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:134]
  #1 PhabricatorLiskDAO::newClusterConnection(string, string, string) called at [<phorge>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:69]
  #2 PhabricatorLiskDAO::establishLiveConnection(string) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:856]
  #3 LiskDAO::establishConnection(string) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:521]
  #4 LiskDAO::loadRawDataWhere(string, string) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:481]
  #5 LiskDAO::loadAllWhere(string, string) called at [<phorge>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:17]
  #6 PhabricatorConfigDatabaseSource::loadConfig(string) called at [<phorge>/src/infrastructure/env/PhabricatorConfigDatabaseSource.php:7]
  #7 PhabricatorConfigDatabaseSource::__construct(string) called at [<phorge>/src/infrastructure/env/PhabricatorEnv.php:262]
  #8 PhabricatorEnv::buildConfigurationSourceStack(boolean) called at [<phorge>/src/infrastructure/env/PhabricatorEnv.php:95]
  #9 PhabricatorEnv::initializeCommonEnvironment(boolean) called at [<phorge>/src/infrastructure/env/PhabricatorEnv.php:75]
  #10 PhabricatorEnv::initializeScriptEnvironment(boolean) called at [<phorge>/scripts/init/lib.php:26]
  #11 init_phabricator_script(array) called at [<phorge>/scripts/init/init-script.php:7]
  #12 require_once(string) called at [<phorge>/scripts/__init_script__.php:3]
  #13 require_once(string) called at [<phorge>/src/infrastructure/testing/PhabricatorTestCase.php:62]
  #14 PhabricatorTestCase::willRunTestCases(array) called at [<arcanist>/src/unit/engine/PhutilUnitTestEngine.php:64]
  #15 PhutilUnitTestEngine::run() called at [<arcanist>/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php:148]
  #16 ArcanistConfigurationDrivenUnitTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:170]
  #17 ArcanistUnitWorkflow::run() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1231]
  #18 ArcanistDiffWorkflow::runUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1133]
  #19 ArcanistDiffWorkflow::runLintUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:363]
  #20 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:427]
<<< [1] (+2,533) <exec> 2,533,776 us
a@c:~/builds/phorge(nonemp)$

(Unless there's some PHP 8.2 bug in my arc invocation... )

Running unit tests...

OK fortunately this is not a bug with upstream. It just means that arc diff is executing the unit tests. To do unit tests, you need to have valid MySQL credentials in your settings.

You can skip unit tests of course with arc diff --nounit but I strongly recommend to setup your local Phorge, so that you can test things

arnold claimed this task.

Issue on my end, will try to get the Mysql credentials set up for running tests