Closed Tupoun closed 7 years ago
ansible 2.0.0.2
Did you follow the README and install the requirements?
Yes, I did it. I think I used wrong command to list it ( pip show $(< requirements.txt) ). So the complete list is below (created by pip list):
adal (0.4.5)
ansible (2.2.0.0)
apache-libcloud (1.5.0)
appdirs (1.4.3)
asn1crypto (0.22.0)
azure (2.0.0rc5)
azure-batch (0.30.0rc5)
azure-common (1.1.4)
azure-graphrbac (0.30.0rc5)
azure-mgmt (0.30.0rc5)
azure-mgmt-authorization (0.30.0rc5)
azure-mgmt-batch (0.30.0rc5)
azure-mgmt-cdn (0.30.0rc5)
azure-mgmt-cognitiveservices (0.30.0rc5)
azure-mgmt-commerce (0.30.0rc5)
azure-mgmt-compute (0.30.0rc5)
azure-mgmt-keyvault (0.30.0rc5)
azure-mgmt-logic (0.30.0rc5)
azure-mgmt-network (0.30.0rc5)
azure-mgmt-notificationhubs (0.30.0rc5)
azure-mgmt-nspkg (2.0.0)
azure-mgmt-powerbiembedded (0.30.0rc5)
azure-mgmt-redis (0.30.0rc5)
azure-mgmt-resource (0.30.0rc5)
azure-mgmt-scheduler (0.30.0rc5)
azure-mgmt-storage (0.30.0rc5)
azure-mgmt-web (0.30.0rc5)
azure-nspkg (2.0.0)
azure-servicebus (0.20.2)
azure-servicemanagement-legacy (0.20.3)
azure-storage (0.32.0)
boto (2.46.1)
boto3 (1.4.4)
botocore (1.5.39)
certifi (2017.1.23)
cffi (1.10.0)
chardet (3.0.2)
cryptography (1.8.1)
docutils (0.13.1)
dopy (0.3.5)
enum34 (1.1.6)
futures (3.1.1)
idna (2.5)
ipaddress (1.0.18)
isodate (0.5.4)
Jinja2 (2.8)
jmespath (0.9.2)
keyring (10.3.2)
MarkupSafe (1.0)
msrest (0.4.1)
msrestazure (0.4.7)
oauthlib (2.0.2)
packaging (16.8)
paramiko (2.1.2)
pip (9.0.1)
pkg-resources (0.0.0)
pyasn1 (0.2.3)
pycparser (2.17)
pycrypto (2.6.1)
PyJWT (1.4.2)
pyOpenSSL (16.2.0)
pyparsing (2.2.0)
python-dateutil (2.6.0)
PyYAML (3.12)
requests (2.13.0)
requests-oauthlib (0.8.0)
s3transfer (0.1.10)
SecretStorage (2.3.1)
setuptools (34.4.1)
six (1.10.0)
wheel (0.30.0a0)
What are the permissions on the .pem file you use to ssh to your machine?
Permissions of the .pem file are 0600. I have only algo.pem file on ~/.ssh. I tried command ssh ubuntu@xx.xx.xx.xx -i ~/.ssh/algo.pem with the same error message Permission denied (publickey).
I tried to Install Algo to Digital Ocean cloud and it went through without problems. The error is on EC2 cloud only.
What are the permissions of your public key on the EC2 cloud instance?
FYI, you might want to not put your public ip address out there.
Tupoun, I'd give 400 a shot.
edit: This should not be the issue, here's a link to AWS's troubeshooting of this error.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html Find the section titled: Error: Host key not found, Permission denied (publickey), or Authentication failed, permission denied
FWIT I have seen this several times (definitely intermittent). A redeploy has always worked for me.
Is the message possibly misleading?
fatal: [35.156.181.105]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '35.156.181.105' (ECDSA) to the list of known hosts.\r\nPermission denied (publickey).\r\n", "unreachable": true}
It says Permission denied (publickey)
and also "unreachable": true
. Is unreachable
the real issue?
@aboutte
The message is complaining that it can't read the public key on the remote system because the permissions don't allow it. Using 'chmod 600' or 400 will work if applied to all files within the ".ssh" directory, assuming the user:group permissions are correct.
If the permissions are there, then make sure that the ".ssh" directory is set with 700. "chmod 700 .ssh"
I check the permissions of the ".ssh" directory is set to 700, the permissions of the .pem file is 600. If I change it to 400 error is the same (file permissions).
So I decide to start the installation from the scratch. I found one interesting thing. I'm not able to install algo to EC2 in case I choose server eu-central-1 (Frankfurt). In this case I always stop with the error message describe above.
I assume the new instance is add to EC2 before the error message occure (as I see from the log). But the instance is not add to EC2 and this should be way the server return the error message "Failed to connect....."
But if I choose the default server us-east-1 US East (N. Virginia) everything is installed properly.
It seems the problem is with the different server then default one. I use AWS free tire. Could you please someone confirm it?
OS / Environment
Ubuntu 16.04.2 LTS
Ansible version
ansible 2.0.0.2
Version of components from
requirements.txt
Summary of the problem
Instalation to the EC2 end with error
Steps to reproduce the behavior
Step 1 to 6 from Deploy the Algo server
The way of deployment (cloud or local)
Cloud EC2
Expected behavior
Installed
Actual behavior
Not Installed
Full log