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

Streisand on Amazon Error #181

Open
Keridoo opened this issue May 1, 2019 · 0 comments
Open

Streisand on Amazon Error #181

Keridoo opened this issue May 1, 2019 · 0 comments

Comments

@Keridoo
Copy link

Keridoo commented May 1, 2019

During trying to setup Streisand on Amazon I get the following error message. What's going wrong? How can it be fixed?

`TASK [ec2-security-group : Create the EC2 security group] ********************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ClientError: An error occurred (AuthFailure) when calling the DescribeSecurityGroups operation: Authorization header or parameters are not formatted correctly.
fatal: [localhost]: FAILED! => {"boto3_version": "1.9.139", "botocore_version": "1.12.139", "changed": false, "error": {"code": "AuthFailure", "message": "Authorization header or parameters are not formatted correctly."}, "msg": "Error in describe_security_groups: An error occurred (AuthFailure) when calling the DescribeSecurityGroups operation: Authorization header or parameters are not formatted correctly.", "response_metadata": {"http_headers": {"date": "Wed, 01 May 2019 09:46:32 GMT", "server": "AmazonEC2", "transfer-encoding": "chunked"}, "http_status_code": 401, "request_id": "3b118fed-bf8f-4ea3-9dda-4f31baba4382", "retry_attempts": 0}}
to retry, use: --limit @/home/mint/streisand/playbooks/amazon.retry

PLAY RECAP *******************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1`

By the way, I used the following tutorial to set up the "AWS IAM role and policy setup":
https://github.com/StreisandEffect/streisand/blob/master/documentation/AWS.md

When using an AWS IAM role with full administrator access, I don't run into this problem. However, I receive the following error.

TASK [common : Purge unneeded services] **************************************** fatal: [**.***.***.**]: FAILED! => {"changed": false, "msg": "'apt-get remove 'lxd' 'snapd'' failed: E: Sub-process /usr/bin/dpkg returned an error code (1)\n", "rc": 100, "stderr": "E: Sub-process /usr/bin/dpkg returned an error code (1)\n", "stderr_lines": ["E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following packages will be REMOVED:\n lxd* snapd* ubuntu-core-launcher*\n0 upgraded, 0 newly installed, 3 to remove and 39 not upgraded.\nAfter this operation, 112 MB disk space will be freed.\n(Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 58863 files and directories currently installed.)\r\nRemoving lxd (2.0.11-0ubuntu1~16.04.4) ...\r\nWarning: Stopping lxd.service, but it can still be activated by:\r\n lxd.socket\r\nPurging configuration files for lxd (2.0.11-0ubuntu1~16.04.4) ...\r\nFailed to stop lxd.service: Unit lxd.service not loaded.\r\ndpkg: warning: while removing lxd, directory '/var/lib/lxd' not empty so not removed\r\nRemoving ubuntu-core-launcher (2.37.4ubuntu0.1) ...\r\nRemoving snapd (2.37.4ubuntu0.1) ...\r\nPurging configuration files for snapd (2.37.4ubuntu0.1) ...\r\nStopping snap.amazon-ssm-agent.amazon-ssm-agent.service\r\nStopping unit snap.amazon-ssm-agent.amazon-ssm-agent.service\r\nWaiting until unit snap.amazon-ssm-agent.amazon-ssm-agent.service is stopped [attempt 1]\r\nsnap.amazon-ssm-agent.amazon-ssm-agent.service is stopped.\r\nRemoving snap.amazon-ssm-agent.amazon-ssm-agent.service\r\nStopping snap-amazon\\x2dssm\\x2dagent-1068.mount\r\nStopping unit snap-amazon\\x2dssm\\x2dagent-1068.mount\r\nWaiting until unit snap-amazon\\x2dssm\\x2dagent-1068.mount is stopped [attempt 1]\r\nsnap-amazon\\x2dssm\\x2dagent-1068.mount is stopped.\r\nRemoving snap amazon-ssm-agent and revision 1068\r\nRemoving snap-amazon\\x2dssm\\x2dagent-1068.mount\r\nStopping snap-core-6673.mount\r\nStopping unit snap-core-6673.mount\r\nWaiting until unit snap-core-6673.mount is stopped [attempt 1]\r\nsnap-core-6673.mount is stopped.\r\nRemoving snap core and revision 6673\r\nRemoving snap-core-6673.mount\r\nFinal directory cleanup\r\nDiscarding preserved snap namespaces\r\nRemoving extra snap-confine apparmor rules\r\nRemoving snapd cache\r\nrm: cannot remove '/var/cache/snapd/aux': Is a directory\r\ndpkg: error processing package snapd (--purge):\r\n subprocess installed post-removal script returned error exit status 1\r\nProcessing triggers for man-db (2.7.5-1) ...\r\nProcessing triggers for mime-support (3.59ubuntu1) ...\r\nErrors were encountered while processing:\r\n snapd\r\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following packages will be REMOVED:", " lxd* snapd* ubuntu-core-launcher*", "0 upgraded, 0 newly installed, 3 to remove and 39 not upgraded.", "After this operation, 112 MB disk space will be freed.", "(Reading database ... ", "(Reading database ... 5%", "(Reading database ... 10%", "(Reading database ... 15%", "(Reading database ... 20%", "(Reading database ... 25%", "(Reading database ... 30%", "(Reading database ... 35%", "(Reading database ... 40%", "(Reading database ... 45%", "(Reading database ... 50%", "(Reading database ... 55%", "(Reading database ... 60%", "(Reading database ... 65%", "(Reading database ... 70%", "(Reading database ... 75%", "(Reading database ... 80%", "(Reading database ... 85%", "(Reading database ... 90%", "(Reading database ... 95%", "(Reading database ... 100%", "(Reading database ... 58863 files and directories currently installed.)", "Removing lxd (2.0.11-0ubuntu1~16.04.4) ...", "Warning: Stopping lxd.service, but it can still be activated by:", " lxd.socket", "Purging configuration files for lxd (2.0.11-0ubuntu1~16.04.4) ...", "Failed to stop lxd.service: Unit lxd.service not loaded.", "dpkg: warning: while removing lxd, directory '/var/lib/lxd' not empty so not removed", "Removing ubuntu-core-launcher (2.37.4ubuntu0.1) ...", "Removing snapd (2.37.4ubuntu0.1) ...", "Purging configuration files for snapd (2.37.4ubuntu0.1) ...", "Stopping snap.amazon-ssm-agent.amazon-ssm-agent.service", "Stopping unit snap.amazon-ssm-agent.amazon-ssm-agent.service", "Waiting until unit snap.amazon-ssm-agent.amazon-ssm-agent.service is stopped [attempt 1]", "snap.amazon-ssm-agent.amazon-ssm-agent.service is stopped.", "Removing snap.amazon-ssm-agent.amazon-ssm-agent.service", "Stopping snap-amazon\\x2dssm\\x2dagent-1068.mount", "Stopping unit snap-amazon\\x2dssm\\x2dagent-1068.mount", "Waiting until unit snap-amazon\\x2dssm\\x2dagent-1068.mount is stopped [attempt 1]", "snap-amazon\\x2dssm\\x2dagent-1068.mount is stopped.", "Removing snap amazon-ssm-agent and revision 1068", "Removing snap-amazon\\x2dssm\\x2dagent-1068.mount", "Stopping snap-core-6673.mount", "Stopping unit snap-core-6673.mount", "Waiting until unit snap-core-6673.mount is stopped [attempt 1]", "snap-core-6673.mount is stopped.", "Removing snap core and revision 6673", "Removing snap-core-6673.mount", "Final directory cleanup", "Discarding preserved snap namespaces", "Removing extra snap-confine apparmor rules", "Removing snapd cache", "rm: cannot remove '/var/cache/snapd/aux': Is a directory", "dpkg: error processing package snapd (--purge):", " subprocess installed post-removal script returned error exit status 1", "Processing triggers for man-db (2.7.5-1) ...", "Processing triggers for mime-support (3.59ubuntu1) ...", "Errors were encountered while processing:", " snapd"]} to retry, use: --limit @/home/mint/streisand/playbooks/amazon.retry

After getting rid off snapd, I could continue until I encountered:

TASK [tor-bridge : Add the Tor APT key] **************************************** fatal: [***.***.***.**]: FAILED! => {"changed": false, "cmd": "/usr/bin/apt-key adv --keyserver keyserver.ubuntu.com --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89", "msg": "Error fetching key A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 from keyserver: keyserver.ubuntu.com", "rc": 2, "stderr": "gpg: requesting key 886DDD89 from hkp server keyserver.ubuntu.com\ngpg: packet(13) too large\ngpg: read_block: read error: invalid packet\ngpg: Total number processed: 0\ngpg: no valid OpenPGP data found.\n", "stderr_lines": ["gpg: requesting key 886DDD89 from hkp server keyserver.ubuntu.com", "gpg: packet(13) too large", "gpg: read_block: read error: invalid packet", "gpg: Total number processed: 0", "gpg: no valid OpenPGP data found."], "stdout": "Executing: /tmp/tmp.sSKCjGjlwX/gpg.1.sh --keyserver\nkeyserver.ubuntu.com\n--recv\nA3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89\n", "stdout_lines": ["Executing: /tmp/tmp.sSKCjGjlwX/gpg.1.sh --keyserver", "keyserver.ubuntu.com", "--recv", "A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89"]}

How can I skip this step?

Please let me know if more information is needed.

Many thanks for your support!

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