Page MenuHomePhabricator

undefined method Exception::getClass() on HEAD when git-http-backend is missing
Closed, ResolvedPublic

Description

After an update to our setup (todays HEAD is at rP55f607e397e0b240de5518ad0374b591628e2296), i encountered a weird error when trying to git push something over HTTP.
During the setup, i git cloned a fresh phabricator directory and run storage upgrade on it. In the proccess i forgot to symlink the git-http-backend binary so it wasn't in the path.

That was obviously my mistake, but the error wasn't helpfull.

I got:

remote: >>> UNRECOVERABLE FATAL ERROR <<<
remote: 
remote: Call to undefined method Exception::getClass()
remote: 
remote: /srv/phabricator/src/applications/diffusion/controller/DiffusionServeController.php:103
remote: 
remote: 
remote: ┻━┻ ︵ ¯\_(ツ)_/¯ ︵ ┻━┻
fatal: unable to access 'https://phab.noc.grnet.gr/diffusion/PR/puppet.git/': The requested URL returned error: 500

After figuring out when that change was made (D15127) i did a git reset before that. Git pushing now gave that message in nginx error log:

2016/02/09 19:23:16 [error] 20763#0: *352357 upstream sent too big header while reading response header from upstream, client: 2001:648:2340:0:96de:80ff:fe61:d1c, server:   phab.noc.grnet.gr, request: "GET /diffusion/PR/puppet.git/info/refs?service=git-receive-pack HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm-phab.sock:", host:   "phab.noc.grnet.gr"
2016/02/09 19:23:33 [error] 20763#0: *352360 FastCGI sent in stderr: "PHP message: [2016-02-09 19:23:33] EXCEPTION: (Exception) Unable to find `git-http-backend` in $PATH!   at [<phabricator>/src/applications/diffusion/controller/DiffusionServeController.php:330]
PHP message: arcanist(head=master, ref.master=57f6fb59d739), phabricator(head=master, ref.master=958333c46dd9), phutil(head=master, ref.master=c3fd3a8bb2c3)
PHP message:   #0 <#2> DiffusionServeController::serveGitRequest(PhabricatorRepository, PhabricatorUser) called at   [<phabricator>/src/applications/diffusion/controller/DiffusionServeController.php:250]
PHP message:   #1 <#2> DiffusionServeController::serveVCSRequest(PhabricatorRepository, PhabricatorUser) called at   [<phabricator>/src/applications/diffusion/controller/DiffusionServeController.php:194]
PHP message:   #2 <#2> DiffusionServeController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/AphrontController.php:71]
PHP message:   #3 <#2> AphrontController::delegateToController(DiffusionServeController) called at [<phabricator>/src/applications/diffusion/controller/DiffusionController.php:27]
PHP message:   #4 <#2> DiffusionController::willBeginExecution() called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:224]
PHP message:   #5 phlog(Exception) called at [<phabricator>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:32]
PHP message:   #6 PhabricatorDefaultRequestExceptionHandler::handleRequestException(AphrontRequest, Exception) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:632]
PHP message:   #7 AphrontApplicationConfiguration::handleException(Exception) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:242]
PHP message:   #8 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:149]

So from this i figured the problem, redid the symlink and went back to HEAD. Everything works fine now. Just thought that I'd report this.