You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried editing "Create MySQL" with my root credentials in main.yml, but it didn't work, and I'm pretty sure it was a ditch effort since the provision script should be creating a new user attributed to deploy, no?
It's running fine locally, no errors in provisioning vagrant
I've created a user "deploy" on my server, and have given it root access
cap staging genesis:ssh and cap production genesis:ssh work fine
I've added all the DNS records for my domain
I get this error during the provision script: ** [out :: ******.******.*****.**] unable to resolve host ***My host****, but it continues
I get this error, which might be the most useful, but it also continues even though it seems a little more severe:
Can't call method "set" on an undefined value at /usr/share/perl5/Debconf/FrontEnd.pm line 126, <GEN0> line 5.
Use of uninitialized value $ret in scalar chomp at /usr/share/perl5/Debconf/Client/ConfModule.pm line 132, <STDIN> line 4.
Use of uninitialized value $ret in split at /usr/share/perl5/Debconf/Client/ConfModule.pm line 133, <STDIN> line 4.
Use of uninitialized value $ret[0] in string eq at /usr/share/perl5/Debconf/Client/ConfModule.pm line 134, <STDIN> line 4.
Use of uninitialized value $ret[0] in string eq at /usr/bin/debconf-apt-progress line 350, <STDIN> line 4.
tasksel: aptitude failed (255)
When you run apt-get install lamp-server^ (which should be functionally equivalent to tasksel install lamp-server), are you still prefixing it with DEBIAN_FRONTEND=noninteractive?
We did the noninteractive to avoid prompting for a root password on install, which gives us a local root mysql user with a blank password. This is what the mysql_db task should be using by default, according to the ansible docs.
Can you test whether you are able to log in to mysql as root?
If your mysql install has a "root"@"localhost" user with a non-empty password, that would explain why it's failing to create the database. When did you set that password, if not during the lamp-server install?
That still wouldn't explain why tasksel failed in the first place, though. Can you run tasksel -t install lamp-server and respond with its output? (The -t is a test flag, it shouldn't actually change anything)
I set it when I first set up my server a while back. Is there a place I can edit in genesis where I can set my root password? Also, isn't it bad security practice to have an empty root password?
For a server used by multiple people, or used for multiple purposes, a blank root password for mysql would be a bad practice.
We're using genesis on single-use servers, with the only way to access them being as root or deploy (which requires an ssh private key); hence the provisioning process installing everything from scratch. Once someone has gained shell access to the box, we're pretty much assuming they're supposed to be there. (Also, see #71 for our pending firewall hardening).
You can manually specify a mysql password in two ways; by defining credentials in /home/deploy/my.cnf, or by adding a login_password to the file provisioning/roles/wordpress/tasks/main.yml:
- name: Create MySQL databasemysql_db: name=${mysql.name} login_password=opensesame
@connorblack Any word back on this one? This sounds like an issue that exists because of an existing machine that's already been provisioned, which isn't quite something we're anticipating here.
Activity
connorblack commentedon Dec 7, 2013
Additional info:
main.yml, but it didn't work, and I'm pretty sure it was a ditch effort since the provision script should be creating a new user attributed to deploy, no?cap staging genesis:sshandcap production genesis:sshwork fineprovisionscript:** [out :: ******.******.*****.**] unable to resolve host ***My host****, but it continuesAnd also this:
/bower_components/genesis-wordpress/provisioning/roles/common/tasks/main.ymlwas failing ontasksel install lamp-server:So I fixed it by switching it out with
apt-get install lamp-server^.I'm at my wits/googling ability's end, so I'm going to reinstall everything and try again- I'll get his thread updated with anything I find.
EvanK commentedon Dec 9, 2013
Do you have the exact error message(s) from the failure of
tasksel install lamp-server?connorblack commentedon Dec 9, 2013
I do:
Could this change be causing some issues?
EvanK commentedon Dec 9, 2013
When you run
apt-get install lamp-server^(which should be functionally equivalent totasksel install lamp-server), are you still prefixing it withDEBIAN_FRONTEND=noninteractive?We did the noninteractive to avoid prompting for a root password on install, which gives us a local root mysql user with a blank password. This is what the mysql_db task should be using by default, according to the ansible docs.
Can you test whether you are able to log in to mysql as root?
connorblack commentedon Dec 9, 2013
Yes, I left in
DEBIAN_FRONTEND=noninteractive, just changed out the actual command.And yes I can sign in to mysql but I use:
and enter my password I set for root.
EvanK commentedon Dec 9, 2013
If your mysql install has a "root"@"localhost" user with a non-empty password, that would explain why it's failing to create the database. When did you set that password, if not during the
lamp-serverinstall?That still wouldn't explain why
taskselfailed in the first place, though. Can you runtasksel -t install lamp-serverand respond with its output? (The-tis a test flag, it shouldn't actually change anything)connorblack commentedon Dec 9, 2013
I set it when I first set up my server a while back. Is there a place I can edit in genesis where I can set my root password? Also, isn't it bad security practice to have an empty root password?
Here's my output for that command:
EvanK commentedon Dec 9, 2013
For a server used by multiple people, or used for multiple purposes, a blank root password for mysql would be a bad practice.
We're using genesis on single-use servers, with the only way to access them being as
rootordeploy(which requires an ssh private key); hence the provisioning process installing everything from scratch. Once someone has gained shell access to the box, we're pretty much assuming they're supposed to be there. (Also, see #71 for our pending firewall hardening).You can manually specify a mysql password in two ways; by defining credentials in
/home/deploy/my.cnf, or by adding alogin_passwordto the fileprovisioning/roles/wordpress/tasks/main.yml:connorblack commentedon Dec 9, 2013
Awesome, thanks! I'll try it out by specifying a password.
EvanK commentedon Dec 9, 2013
Upon double-checking my work, I got the filename wrong: it should be
/home/deploy/.my.cnfericclemmons commentedon Dec 16, 2013
@connorblack Any word back on this one? This sounds like an issue that exists because of an existing machine that's already been provisioned, which isn't quite something we're anticipating here.