Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis CI Drupal site install failing after 8.6.10 upgrade #990

Closed
geerlingguy opened this issue Jan 16, 2017 · 1 comment
Closed

Travis CI Drupal site install failing after 8.6.10 upgrade #990

geerlingguy opened this issue Jan 16, 2017 · 1 comment

Comments

@geerlingguy
Copy link
Contributor

My system information:

  • Operating system type: macOS
  • Operating system version: 10.12.2
  • BLT version: 8.6.10

When I run this command:

  • A deploy on Travis CI (after updating the travis setup with blt ci:travis:init).

I get the following output:

    [drush] Changing working directory back to /home/travis/build/acquia-pso/projectname/vendor/acquia/blt/phing.
     [echo] Installing Drupal...
    [drush] Changing working directory to: /home/travis/build/acquia-pso/projectname/docroot
    [drush] Executing: /home/travis/build/acquia-pso/projectname/vendor/bin/drush @projectname.ci --site-name="Community Health Network" --site-mail="no-reply@acquia.com" --account-name="admin" --account-pass="admin" --account-mail="no-reply@acquia.com" --uri=default --yes --verbose site-install "lightning" "install_configure_form.update_status_module='array(FALSE,FALSE)'"
Loaded alias @projectname.ci from file                                         [notice]
/home/travis/build/acquia-pso/projectname/docroot/../drush/site-aliases/aliases.drushrc.php
Executing: mysql --defaults-extra-file=/tmp/drush_JA5N3G --database=drupal --host=localhost --port=3306 --silent  < /tmp/drush_T16hOp > /dev/null
You are about to DROP all tables in your 'drupal' database. Do you want to continue? (y/n): y
Sites directory                                                         [notice]
/home/travis/build/acquia-pso/projectname/docroot/sites/default already
exists - proceeding.
Executing: mysql --defaults-extra-file=/tmp/drush_yTTLBf --database=drupal --host=localhost --port=3306 --silent  < /tmp/drush_bpdMkY > /dev/null
Executing: mysql --defaults-extra-file=/tmp/drush_nEU8bO --database=drupal --host=localhost --port=3306 --silent  < /tmp/drush_JvGWTw
Starting Drupal installation. This takes a while. Consider using the [ok]
--notify global option.
exception 'Drupal\Core\Installer\Exception\AlreadyInstalledException'[error]
with message '<ul>
<li>To start over, you must empty your existing database and copy
<em>default.settings.php</em> over <em>settings.php</em>.</li>
<li>To upgrade an existing installation, proceed to the <a
href="/update.php">update script</a>.</li>
<li>View your <a href="http://default">existing site</a>.</li>
</ul>' in
/home/travis/build/acquia-pso/projectname/docroot/core/includes/install.core.inc:493
Stack trace:
#0
/home/travis/build/acquia-pso/projectname/docroot/core/includes/install.core.inc(112):
install_begin_request(Object(Composer\Autoload\ClassLoader), Array)
#1
/home/travis/build/acquia-pso/projectname/vendor/drush/drush/includes/drush.inc(726):
install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#2
/home/travis/build/acquia-pso/projectname/vendor/drush/drush/includes/drush.inc(711):
drush_call_user_func_array('install_drupal', Array)
#3
/home/travis/build/acquia-pso/projectname/vendor/drush/drush/commands/core/drupal/site_install.inc(80):
drush_op('install_drupal', Object(Composer\Autoload\ClassLoader),
Array)
#4
/home/travis/build/acquia-pso/projectname/vendor/drush/drush/commands/core/site_install.drush.inc(249):
drush_core_site_install_version('lightning', Array)
#5 [internal function]: drush_core_site_install('lightning',
'install_configu...')
#6
/home/travis/build/acquia-pso/projectname/vendor/drush/drush/includes/command.inc(422):
call_user_func_array('drush_core_site...', Array)
#7
/home/travis/build/acquia-pso/projectname/vendor/drush/drush/includes/command.inc(231):
_drush_invoke_hooks(Array, Array)
#8 [internal function]: drush_command('lightning',
'install_configu...')
#9
/home/travis/build/acquia-pso/projectname/vendor/drush/drush/includes/command.inc(199):
call_user_func_array('drush_command', Array)
#10
/home/travis/build/acquia-pso/projectname/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#11
/home/travis/build/acquia-pso/projectname/vendor/drush/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#12
/home/travis/build/acquia-pso/projectname/vendor/drush/drush/drush.php(12):
drush_main()
#13 {main}
Command dispatch complete                                               [notice]
    [drush] Changing working directory back to /home/travis/build/acquia-pso/projectname/vendor/acquia/blt/phing.
[phingcall] /home/travis/build/acquia-pso/projectname/vendor/acquia/blt/phing/tasks/setup.xml:176:19: Drush exited with code 1

And I expected this to happen:

The site-install command should run successfully.

Other notes:

Maybe it's the canary for another Travis rollout that breaks the build because of a MySQL issue, similar to #720?

@geerlingguy
Copy link
Contributor Author

It looks like the problem was the database connection configuration inside default.local.settings.php.

The original was:

$databases = array(
  'default' =>
  array(
    'default' =>
    array(
      'database' => 'drupal',
      'username' => 'drupal',
      'password' => 'drupal',
      'host' => 'localhost',
      'port' => '3306',
      'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);

But after I updated the host to an IP, things worked (it must've been trying to connect via socket instead of TCP or something):

      'host' => '127.0.0.1',

The default settings file was not updated by the BLT update, so I guess that's where the issue was for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant