Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25584

Running setup wizard after the upgrade to 5.4.x, raises a fatal error

    Details

    • Type: Bug Bug
    • Status: Confirmed
    • Priority: High High
    • Resolution: Unresolved
    • Affects Version/s: 5.4.5, 5.4.6, 5.4.9
    • Fix Version/s: QA tracked issues
    • Component/s: Install
    • Labels:
    • Environment:

      Operating System: Debian7
      PHP Version: 5.4.4
      Database and version: MySQL 5.5
      Browser (and version): Firefox 44

      Description

      On the 5.4.x update process, customers might follow two approaches:
      1 - Untar 5.4.0, install it and then proceed to upgrade to latest version (5.4.6-rc in this case).
      2 - Untar 5.4.0, proceed to upgrade to latest version (5.4.6-rc) and then try to install it

      While the option (1) works as expected, the process (2) fails with a fatal error, because the installation tries to access database "none", that do not exist. The error can be seen on prod.log:

      [2016-03-15 12:13:53] app.NOTICE: Siteaccess not matched against configuration, returning default siteaccess. [] []
      [2016-03-15 12:13:53] request.INFO: Matched route "ezpublishSetup". {"route_parameters":{"_controller":"ezpublish_legacy.setup.controller:init","_route":"ezpublishSetup"},"request_uri":"http://ezp54.paulo/ezsetup"} []
      [2016-03-15 12:13:53] request.CRITICAL: Uncaught PHP Exception RuntimeException: "Database error" at /var/www/ezp54/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php line 316 {"exception":"[object] (RuntimeException: Database error at /var/www/ezp54/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php:316, Doctrine\\DBAL\\Exception\\ConnectionException: An exception occured in driver: SQLSTATE[42000] [1049] Unknown database 'none' at /var/www/ezp54/ezpublish5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:103, Doctrine\\DBAL\\Driver\\PDOException: SQLSTATE[42000] [1049] Unknown database 'none' at /var/www/ezp54/ezpublish5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47, PDOException: SQLSTATE[42000] [1049] Unknown database 'none' at /var/www/ezp54/ezpublish5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43)"} []
      

        Issue Links

          Activity

          Hide
          Paulo Nunes (Inactive) added a comment - - edited

          This issue also happens if a git installation is done, using "5.4" branch. Due that, i'll raise the issue priority, since QA is currently unable to install git versions of 5.4.x

          Show
          Paulo Nunes (Inactive) added a comment - - edited This issue also happens if a git installation is done, using " 5.4 " branch. Due that, i'll raise the issue priority, since QA is currently unable to install git versions of 5.4.x
          Hide
          André Rømcke added a comment -

          Full stack trace possible?

          Show
          André Rømcke added a comment - Full stack trace possible?
          Hide
          Paulo Nunes (Inactive) added a comment - - edited

          Additional information:

          • If I access with dev environment, then the error do not appear and I can proceed with SW
          • If I edit ezpublish_setup.yml and change dbname to an existing database, then I can proceed with SW as well (as prod) EDIT: just realized now that the DB I used in this sentence was not empty. If I use an empty one, then it fails as well.

          Regarding the stack trace, I haven't got any logged info in apache log. I can't either see anything accessing as dev, because i have no problem when entering as dev.
          The only log I have is the one from ezpublish/log/prod.log

          [2016-04-01 11:23:58] app.NOTICE: Siteaccess not matched against configuration, returning default siteaccess. [] []
          [2016-04-01 11:23:58] request.INFO: Matched route "ezpublishSetup". {"route_parameters":{"_controller":"ezpublish_legacy.setup.controller:init","_route":"ezpublishSetup"},"request_uri":"http://ezp54.paulo/ezsetup"} []
          [2016-04-01 11:23:58] request.CRITICAL: Uncaught PHP Exception RuntimeException: "Database error" at /var/www/ezp54/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php line 316 {"exception":"[object] (RuntimeException(code: 0): Database error at /var/www/ezp54/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php:316, Doctrine\\DBAL\\Exception\\ConnectionException(code: 0): An exception occured in driver: SQLSTATE[42000] [1049] Unknown database 'none' at /var/www/ezp54/ezpublish5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:103, Doctrine\\DBAL\\Driver\\PDOException(code: 1049): SQLSTATE[42000] [1049] Unknown database 'none' at /var/www/ezp54/ezpublish5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47, PDOException(code: 1049): SQLSTATE[42000] [1049] Unknown database 'none' at /var/www/ezp54/ezpublish5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43)"} []
          

          meanwhile, i'll decrease the priority. Since there is an alternative to install 5.4, then this is no longer a blocker.

          Show
          Paulo Nunes (Inactive) added a comment - - edited Additional information: If I access with dev environment, then the error do not appear and I can proceed with SW If I edit ezpublish_setup.yml and change dbname to an existing database, then I can proceed with SW as well (as prod) EDIT: just realized now that the DB I used in this sentence was not empty. If I use an empty one, then it fails as well. Regarding the stack trace, I haven't got any logged info in apache log. I can't either see anything accessing as dev , because i have no problem when entering as dev. The only log I have is the one from ezpublish/log/prod.log [2016-04-01 11:23:58] app.NOTICE: Siteaccess not matched against configuration, returning default siteaccess. [] [] [2016-04-01 11:23:58] request.INFO: Matched route "ezpublishSetup". {"route_parameters":{"_controller":"ezpublish_legacy.setup.controller:init","_route":"ezpublishSetup"},"request_uri":"http://ezp54.paulo/ezsetup"} [] [2016-04-01 11:23:58] request.CRITICAL: Uncaught PHP Exception RuntimeException: "Database error" at /var/www/ezp54/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php line 316 {"exception":"[object] (RuntimeException(code: 0): Database error at /var/www/ezp54/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php:316, Doctrine\\DBAL\\Exception\\ConnectionException(code: 0): An exception occured in driver: SQLSTATE[42000] [1049] Unknown database 'none' at /var/www/ezp54/ezpublish5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:103, Doctrine\\DBAL\\Driver\\PDOException(code: 1049): SQLSTATE[42000] [1049] Unknown database 'none' at /var/www/ezp54/ezpublish5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47, PDOException(code: 1049): SQLSTATE[42000] [1049] Unknown database 'none' at /var/www/ezp54/ezpublish5/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43)"} [] meanwhile, i'll decrease the priority. Since there is an alternative to install 5.4, then this is no longer a blocker.
          Hide
          Bertrand Dunogier added a comment -

          The issue is that it tries to connect to the database in prod, because it tries to generate a user hash, if there is a session.

          QA, could you confirm that it only happens when you have an active session ?
          In my opinion, it doesn't make sense to run the setup in production. The route should even not be available in prod, as a matter of fact (it's typically a dev task).

          Show
          Bertrand Dunogier added a comment - The issue is that it tries to connect to the database in prod, because it tries to generate a user hash, if there is a session . QA, could you confirm that it only happens when you have an active session ? In my opinion, it doesn't make sense to run the setup in production. The route should even not be available in prod, as a matter of fact (it's typically a dev task).

            People

            • Assignee:
              Unassigned
              Reporter:
              Paulo Nunes (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: