Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Unreachable, Permission Denied on Debops bootstrap #141

Closed
borg13 opened this issue Feb 8, 2017 · 12 comments
Closed

Unreachable, Permission Denied on Debops bootstrap #141

borg13 opened this issue Feb 8, 2017 · 12 comments

Comments

@borg13
Copy link

borg13 commented Feb 8, 2017

Hi, I can't figure out what I am doing wrong here. Your help would be greatly appreciated. Thanks a lot :) The Domain I want to install this on pings and points to the correct IP and I even added it to the machines hosts file with the correct IP.

`
root@atfdesigns-fra1:~/debops-wordpress# debops bootstrap -u root -vvv
Running Ansible playbook from:
/root/.local/share/debops/debops-playbooks/playbooks/bootstrap.yml ...
Using /root/debops-wordpress/ansible.cfg as config file
statically included: /root/.local/share/debops/debops-playbooks/roles/debops.bootstrap/tasks/admin_accounts.yml

PLAYBOOK: bootstrap.yml ********************************************************
2 plays in /root/.local/share/debops/debops-playbooks/playbooks/bootstrap.yml

PLAY [Bootstrap Python support on a host] **************************************

TASK [debops.bootstrap/raw : Update APT repositories, install mandatory packages] ***
task path: /root/.local/share/debops/debops-playbooks/roles/debops.bootstrap/raw/tasks/main.yml:3
<atfdesigns.com> ESTABLISH SSH CONNECTION FOR USER: root
<atfdesigns.com> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r -tt atfdesigns.com 'apt-get update ; apt-get --no-install-recommends -yq install python python-apt'
fatal: [atfdesigns.com]: UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied (password).\r\n",
"unreachable": true
}
to retry, use: --limit @/root/.local/share/debops/debops-playbooks/playbooks/bootstrap.retry

PLAY RECAP *********************************************************************
atfdesigns.com : ok=0 changed=0 unreachable=1 failed=0

TASK: debops.bootstrap/raw : Update APT repositories, install mandatory packages --- 0.17s
`

@carlalexander
Copy link
Owner

It seems from the error that the server isn't configured to use a SSH key. Is it possible that it uses password login?

@borg13
Copy link
Author

borg13 commented Feb 9, 2017

I apologize already when my question is stupid now :)

I am running things on the machine that I want to install it on, do I need to run it from a remote server? SSH is using password login as I had no way to use ssh-keygen on my local windows machine, expected it to not matter as I run everything local on the Droplet.

@borg13
Copy link
Author

borg13 commented Feb 9, 2017

So I generated the SSH keys on the Droplet, authorized the public one, changed SSH to only allow connections by key identification and the Droplet was able to SSH into itself lol.

After that the initial error reported here was gone and the next one was something with Ansible, I google it and it was a common problem with the Ansible version that I had installed so I uninstalled that one and installed the latest from Github and that problem was gone too.

It is still installing but it seems to be all ok now ( fingers crossed ), so is it better to take a second Droplet to install from or is how I did it now ok too ?

@carlalexander
Copy link
Owner

There are no stupid questions here. 😃

You don't have to run debops from a remote server. You can do it from your computer if you have a Mac or Linux computer. Since you're with Windows, you have to use a VM with Linux or a droplet (like you did). Both are fine as far as I'm concerned, but I don't have a lot of experience with Windows anymore so I might be wrong lol

@borg13
Copy link
Author

borg13 commented Feb 9, 2017

Thanks so much for your patience with the newbie questions :) And also thanks a lot for this great project.

After some more issues that I was able to fix with Google I finally have everything up and running but I do have 2 problems.

  1. Varnish doesn't work. I checked the headers but it is not in there and also in Wordpress it says:

We did not find Varnish active for this domain.
Your sever IP setup looks just fine. If you are using a proxy (like Sucuri or Cloudflare or Fastly) please double check that configuration and make sure to add a custom Varnish IP .
Your site is compressing content and making the internet faster.

I also used the config from the Wiki for Woocommerce and the Purge button. How can I activate Varnish for the domain?

  1. I changed the config to use letsencrypt to enable SSL and it works but only for atfdesigns.com not for www.atfdesigns.com . I tried adding www.atfdesigns.com to inventory/hosts but that did not fix it either.

Looking forward to your help :)

@borg13
Copy link
Author

borg13 commented Feb 10, 2017

After reading over all the Issues post to this topic, I pointed server.atfdesigns.com to the Droplets IP. I changed the Droplets hostname to server.atfdesigns.com . I ran Debops and Debops Wordpress again but it is still only atfdesigns.com working with https. www and also server both return NET::ERR_CERT_COMMON_NAME_INVALID

Oh yeah I also changed the inventory/hosts to server.atfdesigns.com for the first part and I also made a new vars.yml in debops-wordpress/inventory/host_vars/server.atfdesigns.com/

@borg13
Copy link
Author

borg13 commented Feb 11, 2017

I give up lol, made several droplets tried everything I could think of but nothing works. Last try I used 2 Droplets, one to install from on second fresh Droplet. Now the SSL Certificate got both domain and www.domain BUT it is a unsigned Certificate. Guess I just buy one before I lose my mind.

@borg13
Copy link
Author

borg13 commented Feb 11, 2017

Well not the preferred method but since I could not get it to work otherwise I used the certbot from letsencrypt and added the working certificates to the nginx config. Now SSL works just fine for me for www and non www.

Then I had the problem that www.atfdesigns.com wasnt redirected to atfdesigns.com. Fixed that by adding an redirect based on if $host = www.atfdesigns.com

Now finally I am not sure if Varnish is running or not ? The plugin says it is not, all checks I find online tell me there must be varnish mentioned in the header. When I check a domain I have with Dreamhost I have

X-Cacheable: YES:Forced
Date: Sat, 11 Feb 2017 11:18:30 GMT
X-Varnish: 2041432958
Age: 0
Via: 1.1 varnish

In the header and when I check the new setup I have only

Age: 2
X-Cache: HIT
X-Cache-Hits: 1

Does it still mean Varnish is running and the output just looks different than expected ?

@carlalexander
Copy link
Owner

carlalexander commented Feb 13, 2017

Sorry I couldn't answer sooner and that you had all these issue. Let me go over a few things.

After reading over all the Issues post to this topic, I pointed server.atfdesigns.com to the Droplets IP. I changed the Droplets hostname to server.atfdesigns.com . I ran Debops and Debops Wordpress again but it is still only atfdesigns.com working with https. www and also server both return NET::ERR_CERT_COMMON_NAME_INVALID

I don't think you can just reconfigure an existing droplet like that without issues. You needed to create a new droplet with the proper server name and configure it.

Now the SSL Certificate got both domain and www.domain BUT it is a unsigned Certificate.

This is a known issue that I think I have a solution for. I just need to finish this issue first. There's a way to force a new attempt at creating the certificates. Also sometimes it takes a minute or two for the process to happen.

Does it still mean Varnish is running and the output just looks different than expected ?

That's exactly it. I might add more verbose messages in the future.

@carlalexander
Copy link
Owner

Is this issue still affecting you?

@borg13
Copy link
Author

borg13 commented Mar 10, 2017

No it doesn't. Thanks 👍

@carlalexander
Copy link
Owner

Awesome!

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

No branches or pull requests

2 participants