carlalexander / debops-wordpress

Your superpowered WordPress server in three commands.
GNU General Public License v3.0
439 stars 65 forks source link

debops.mariadb : Create databases Fail #76

Closed andrewgoodnz closed 8 years ago

andrewgoodnz commented 8 years ago

On a new server I am getting the following....

TASK [debops.mariadb : Create databases] *************************************** failed: [www.fqdn.com.au] (item={u'name': u'wordpress'}) => {"item": {"name": "wordpress"}, "msg": "Failed to connect to the host via ssh.", "unreachable": true} fatal: [www.fqdn.com.au]: UNREACHABLE! => {"changed": false, "msg": "All items completed", "results": [{"_ansible_item_result": true, "item": {"name": "wordpress"}, "msg": "Failed to connect to the host via ssh.", "unreachable": true}]}

I see debops.mariadb has been updated since I ran the WP install on another machine, could there be another conflict here?

carlalexander commented 8 years ago

If you've updated debops recently, @drybjed made a breaking change to debops.mariadb and debops.mariadb_server. I made updates to the project to support it, but you had the ticket for that issue. 😉

That said, I'm not sure this is the issue here. Did you see this issue by any chance? debops.mariadb needs www.fqdn.com.au to be accessible via SSH from the server.

andrewgoodnz commented 8 years ago

Thanks @carlalexander, yes I thought a few more changes had been made since that last ticket :)

Reading through the other issue now, the fqdn is already pointing toward the IP address so shouldnt be an issue here?

just ran debops wordpress -u ubuntu -vvvv and in that same place it shows the following. Bit concerned about the first part ESTABLISH SSH CONNECTION FOR USER: None all the other tasks show ESTABLISH SSH CONNECTION FOR USER: ubuntu

`TASK [debops.mariadb : Create databases] *** task path: /Users/andrewgood/Library/Application Support/debops/debops-playbooks/roles/debops.mariadb/tasks/manage_contents.yml:12

ESTABLISH SSH CONNECTION FOR USER: None SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/andrewgood/.ansible/cp/ansible-ssh-%h-%p-%r fqdn.com.au '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1465214081.28-243152080430700 `" && echo ansible-tmp-1465214081.28-243152080430700="` echo $HOME/.ansible/tmp/ansible-tmp-1465214081.28-243152080430700 `" ) && sleep 0'"'"'' failed: [www.fqdn.com.au] (item={u'name': u'wordpress'}) => {"item": {"name": "wordpress"}, "msg": "Failed to connect to the host via ssh.", "unreachable": true} fatal: [www.fqdn.com.au]: UNREACHABLE! => {"changed": false, "msg": "All items completed", "results": [{"_ansible_item_result": true, "item": {"name": "wordpress"}, "msg": "Failed to connect to the host via ssh.", "unreachable": true}]}` BTW I have replaced my actual domain with fqdn.com.au P.S. You deserve some thanks for this great project and the support you are giving it!
carlalexander commented 8 years ago

Thanks! Project still has some rough edges, but I really want it to be easy to use. Good support is part of that. 😄

I realized you were sanitizing the fqdn, but I wasn't sure if you were giving Ansible just an IP or something else. The user None is weird. I can't remember if it did that before.

I'm seeing that @drybjed did more changes to the role since I fixed things. It's possible that something else is broken now. I'll update everything tonight and run some tests and get back to you.

carlalexander commented 8 years ago

Alright, I updated everything, but everything was already pretty much up-to-date. I didn't run into any issues. Here are a few potential things we can look at.

carlalexander commented 8 years ago

Are you still having issues?

cezarneaga commented 8 years ago

have the same ESTABLISH SSH CONNECTION FOR USER: None issue

bjornoss commented 8 years ago

Hi I also had the same problem and I use a non-standard SSH port on the host. This is usually not a problem when running playbooks, but it seems that delegate_to is not using the SSH port from the var ansible_ssh_port? The solution was to update the SSH configon the control machine:

Host www.fqdn.com
  Port 42022

When I ran the playbook again it worked. @drybjed: is this a problem related to ansible delegate_toor debops mariadb ?

cezarneaga commented 8 years ago

i have 22

cezarneaga commented 8 years ago

i solved my problem. on aws the default hostname is something like ip-53-23-23-139 after creating the instance i did the following (verbose for the beginners like me): sudo vi /etc/hosts entered [elastic_ip] web.example.com web as second line under 127.0.0.1 localhost then: sudo vi /etc/hostname entered web.example.com

finally sudo reboot

after this i run debops -u ubuntu --private-key=~/.ssh/yourkey.pem and debops wordpress -u ubuntu --private-key=~/.ssh/yourkey.pem

best, C

carlalexander commented 8 years ago

I'm assuming this is working now?

cezarneaga commented 8 years ago

yes :) the only thing that is still a bit funky comparing to digital ocean installation is that ubuntu user cannot ftp even if added to www-data group.

carlalexander commented 8 years ago

He doesn't have folder access?

cezarneaga commented 8 years ago

none at all. no. it can view but no write

cezarneaga commented 8 years ago

most annoying on both digital ocean and aws is that if i do website setup stuff eg: download from s3:// or quickly upload multiple files through ssh or browse many pages very quickly (which on this setup i can :) - its 60% faster for me - so thank you) it locks my ip out.

any idea how i can solve this?

drybjed commented 8 years ago

The debops.ferm role contains some variables that rate limit SYN connections to the host. You might want to change these parameters or disable them if you feel that they are not high enough for your needs.

cezarneaga commented 8 years ago

thanks @drybjed! i see. could you point me to a page that explains how i perform this?

drybjed commented 8 years ago

Sure, the SYN filtering is configured using these variables. Just se the values you want in the Ansible inventory and re-run the role, or the playbook.

carlalexander commented 8 years ago

I'll close this since we're not discussing the initial issue anymore. Feel free to open another issue about debops.ferm @cezarneaga 😄

cezarneaga commented 8 years ago

sorry. thanks for moderating this to keep stuff clean.

carlalexander commented 8 years ago

Yeah, it's ok. Just doing my best lol On Thu, Jun 23, 2016 at 9:57 AM Cezar Neaga notifications@github.com wrote:

sorry. thanks for moderating this to keep stuff clean.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/carlalexander/debops-wordpress/issues/76#issuecomment-227976952, or mute the thread https://github.com/notifications/unsubscribe/AAn9XGeWmzoZQ8vbTxVi6c2VWmKsiVzQks5qOjxYgaJpZM4IuzQG .