2017-07-21 4 views
0

Wenn ich versuche, meine Symfony App zu implementieren die Bereitstellung Heroku schlägt fehl, weil es nicht mit der Datenbank verbinden kann. Ich habe eine parameters.dist.yml-Datei erstellt, die von dem Komponisten während der Bereitstellung gelesen wird, um die parameters.yml Datei zu erstellen. Ich habe bestätigt, dass die Parameter korrekt sind und können auf meine JawsDB Datenbank von meinem lokalen Rechner verbinden. Was könnte ich falsch machen?Kann nicht meine Symfony App Heroku bereitstellen

Bitte beachten Sie die Antwort von Heroku unter:

git push heroku master 
Counting objects: 736, done. 
Compressing objects: 100% (351/351), done. 
Writing objects: 100% (698/698), 808.13 KiB | 0 bytes/s, done. 
Total 698 (delta 340), reused 597 (delta 285) 
remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: -----> PHP app detected 
remote: -----> Bootstrapping... 
remote: -----> Installing platform packages... 
remote:  - php (7.1.3) 
remote:  - apache (2.4.20) 
remote:  - nginx (1.8.1) 
remote: 
remote: !  WARNING: Your 'composer.lock' is not up to date with the latest 
remote:  changes in 'composer.json'. To ensure you are not getting stale 
remote:  dependencies, run 'composer update' on your machine and commit 
remote:  any changes to Git before pushing again. 
remote: 
remote: -----> Installing dependencies... 
remote:  Composer version 1.4.1 2017-03-10 09:29:45 
remote:  Loading composer repositories with package information 
remote:  Installing dependencies from lock file 
remote:  Package operations: 48 installs, 0 updates, 0 removals 
remote:   - Installing crell/api-problem (2.0): Downloading (100%) 
remote:   - Installing doctrine/lexer (v1.0.1): Loading from cache 
remote:   - Installing doctrine/annotations (v1.2.7): Loading from cache 
remote:   - Installing twig/twig (v1.32.0): Downloading (100%) 
remote:   - Installing symfony/polyfill-util (v1.3.0): Downloading (100%) 
remote:   - Installing paragonie/random_compat (v2.0.9): Downloading (100%) 
remote:   - Installing symfony/polyfill-php70 (v1.3.0): Downloading (100%) 
remote:   - Installing symfony/polyfill-php56 (v1.3.0): Downloading (100%) 
remote:   - Installing symfony/polyfill-mbstring (v1.3.0): Downloading (100%) 
remote:   - Installing symfony/symfony (v3.1.10): Downloading (100%) 
remote:   - Installing symfony/polyfill-intl-icu (v1.3.0): Downloading (100%) 
remote:   - Installing psr/log (1.0.2): Loading from cache 
remote:   - Installing psr/cache (1.0.1): Loading from cache 
remote:   - Installing doctrine/inflector (v1.1.0): Loading from cache 
remote:   - Installing doctrine/collections (v1.3.0): Loading from cache 
remote:   - Installing doctrine/cache (v1.6.1): Loading from cache 
remote:   - Installing doctrine/common (v2.6.2): Downloading (100%) 
remote:   - Installing doctrine/doctrine-cache-bundle (1.3.0): Loading from cache 
remote:   - Installing zendframework/zend-eventmanager (3.0.1): Downloading (100%) 
remote:   - Installing zendframework/zend-code (2.6.3): Downloading (100%) 
remote:   - Installing ocramius/proxy-manager (1.0.2): Downloading (100%) 
remote:   - Installing doctrine/dbal (v2.5.12): Downloading (100%) 
remote:   - Installing doctrine/migrations (v1.5.0): Downloading (100%) 
remote:   - Installing jdorn/sql-formatter (v1.2.17): Loading from cache 
remote:   - Installing doctrine/doctrine-bundle (1.6.7): Downloading (100%) 
remote:   - Installing doctrine/doctrine-migrations-bundle (v1.2.1): Downloading (100%) 
remote:   - Installing doctrine/instantiator (1.0.5): Loading from cache 
remote:   - Installing doctrine/orm (v2.5.6): Downloading (100%) 
remote:   - Installing willdurand/negotiation (v2.2.1): Downloading (100%) 
remote:   - Installing willdurand/jsonp-callback-validator (v1.1.0): Downloading (100%) 
remote:   - Installing friendsofsymfony/rest-bundle (2.1.1): Downloading (100%) 
remote:   - Installing incenteev/composer-parameter-handler (v2.1.2): Loading from cache 
remote:   - Installing jms/metadata (1.6.0): Downloading (100%) 
remote:   - Installing phpoption/phpoption (1.5.0): Downloading (100%) 
remote:   - Installing jms/parser-lib (1.0.0): Downloading (100%) 
remote:   - Installing phpcollection/phpcollection (0.5.0): Downloading (100%) 
remote:   - Installing jms/serializer (1.5.0): Downloading (100%) 
remote:   - Installing jms/serializer-bundle (1.2.0): Downloading (100%) 
remote:   - Installing michelf/php-markdown (1.7.0): Downloading (100%) 
remote:   - Installing nelmio/api-doc-bundle (2.13.1): Downloading (100%) 
remote:   - Installing sensiolabs/security-checker (v4.0.1): Downloading (100%) 
remote:   - Installing sensio/distribution-bundle (v5.0.18): Downloading (100%) 
remote:   - Installing sensio/framework-extra-bundle (v3.0.23): Downloading (100%) 
remote:   - Installing monolog/monolog (1.22.0): Downloading (100%) 
remote:   - Installing symfony/monolog-bundle (v2.12.1): Downloading (100%) 
remote:   - Installing symfony/polyfill-apcu (v1.3.0): Downloading (100%) 
remote:   - Installing swiftmailer/swiftmailer (v5.4.6): Downloading (100%) 
remote:   - Installing symfony/swiftmailer-bundle (v2.5.3): Downloading (100%) 
remote:  Generating optimized autoload files 
remote:  > Incenteev\ParameterHandler\ScriptHandler::buildParameters 
remote:  Creating the "app/config/parameters.yml" file 
remote:  > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap 
remote:  > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache 
remote: 
remote: 
remote:   [Doctrine\DBAL\Exception\ConnectionException] 
remote:   An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused 
remote: 
remote: 
remote: 
remote:   [Doctrine\DBAL\Driver\PDOException] 
remote:   SQLSTATE[HY000] [2002] Connection refused 
remote: 
remote: 
remote: 
remote:   [PDOException] 
remote:   SQLSTATE[HY000] [2002] Connection refused 
remote: 
remote: 
remote:  Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception 
remote: 
remote: 
remote:   [RuntimeException] 
remote:   An error occurred when executing the "'cache:clear --no-warmup'" command: 
remote: 
remote:   [Doctrine\DBAL\Exception\ConnectionException] 
remote:   An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused 
remote: 
remote: 
remote:   [Doctrine\DBAL\Driver\PDOException] 
remote:   SQLSTATE[HY000] [2002] Connection refused 
remote: 
remote: 
remote:   [PDOException] 
remote:   SQLSTATE[HY000] [2002] Connection refused 
remote: 
remote:   . 
remote: 
remote: 
remote:  install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]... 
remote: 
remote: !  Push rejected, failed to compile PHP app. 
remote: 
remote: !  Push failed 

SQLSTATE[HY000] [2002] Connection refused scheint darauf hinzudeuten, dass es auf localhost zu verbinden versucht, aber in meiner parameters.yml Datei habe ich die richtigen Verbindungsdaten enthält.

Antwort

0

Sieht aus wie ich den Master-Zweig einzusetzen versuchte, anstelle der aktiven Zweig herkou. So stellen Sie eine Filiale angeben Ich lief:

git push heroku <branch>:master 
Verwandte Themen