trailofbits / algo

Set up a personal VPN in the cloud
https://blog.trailofbits.com/2016/12/12/meet-algo-the-vpn-that-works/
GNU Affero General Public License v3.0
28.66k stars 2.32k forks source link

[WARNING]: Could not match supplied host pattern, ignoring: vpn-host // ERROR MESSAGE #1641

Closed Sl1mb0 closed 4 years ago

Sl1mb0 commented 4 years ago

Describe the bug

When I run "./algo" I get an error message. I have followed the steps in the read me to a T..

To Reproduce

Steps to reproduce the behavior:

  1. I followed the steps in the readme for setting up an AWS account, to a T..
  2. Installed home-brew
  3. ran "brew install python3"
  4. ran "python3 -m pip install --upgrade virtualenv"
  5. ran "python3 -m virtualenv --python="$(command -v python3)" .env && source .env/bin/activate && python3 -m pip install -U pip virtualenv && python3 -m pip install -r requirements.txt"
  6. created two users in the config.cfg file, one each for my phone and laptop.
  7. ran "./algo"
  8. I get the following error message: "[WARNING]: Could not match supplied host pattern, ignoring: vpn-host" "ERROR! Unexpected Exception, this is probably a bug: cannot pickle '_io.TextIOWrapper' object"
  9. I then ran "./algo -vvv", and get the output I put in the full log section of this issue. Expected behavior

I expected ./algo to run smoothly and allow me to complete setting up my VPN.

Additional context

I set up the AWS account on my girlfriend's laptop. I then got home and tried to finish the rest of the steps on my own laptop..

Full log

PUT THE OUTPUT HERE

ansible-playbook 2.8.3 config file = /Users/timbabwe/algo/ansible.cfg configured module search path = ['/Users/timbabwe/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/timbabwe/algo/.env/lib/python3.8/site-packages/ansible executable location = /Users/timbabwe/algo/.env/bin/ansible-playbook python version = 3.8.0 (v3.8.0:fa919fdf25, Oct 14 2019, 10:23:27) [Clang 6.0 (clang-600.0.57)] Using /Users/timbabwe/algo/ansible.cfg as config file host_list declined parsing /Users/timbabwe/algo/inventory as it did not pass it's verify_file() method script declined parsing /Users/timbabwe/algo/inventory as it did not pass it's verify_file() method auto declined parsing /Users/timbabwe/algo/inventory as it did not pass it's verify_file() method Parsed /Users/timbabwe/algo/inventory inventory source with ini plugin Read vars_file 'config.cfg' Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/playbooks/cloud-pre.yml Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/playbooks/cloud-post.yml Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/playbooks/tmpfs/main.yml Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/playbooks/tmpfs/macos.yml Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/playbooks/tmpfs/linux.yml Read vars_file 'config.cfg' [WARNING]: Could not match supplied host pattern, ignoring: vpn-host

Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/roles/dns/tasks/dns_adblocking.yml Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/roles/wireguard/tasks/keys.yml Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/roles/strongswan/tasks/ipsec_configuration.yml Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/roles/strongswan/tasks/openssl.yml Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/roles/strongswan/tasks/distribute_keys.yml Read vars_file 'config.cfg' Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/roles/strongswan/tasks/client_configs.yml Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' Read vars_file 'config.cfg' statically imported: /Users/timbabwe/algo/playbooks/tmpfs/umount.yml Read vars_file 'config.cfg'

PLAYBOOK: main.yml ***** 4 plays in main.yml

PLAY [localhost] *** ERROR! Unexpected Exception, this is probably a bug: cannot pickle '_io.TextIOWrapper' object the full traceback was:

Traceback (most recent call last): File "/Users/timbabwe/algo/.env/bin/ansible-playbook", line 110, in exit_code = cli.run() File "/Users/timbabwe/algo/.env/lib/python3.8/site-packages/ansible/cli/playbook.py", line 123, in run results = pbex.run() File "/Users/timbabwe/algo/.env/lib/python3.8/site-packages/ansible/executor/playbook_executor.py", line 169, in run result = self._tqm.run(play=play) File "/Users/timbabwe/algo/.env/lib/python3.8/site-packages/ansible/executor/task_queue_manager.py", line 249, in run play_return = strategy.run(iterator, play_context) File "/Users/timbabwe/algo/.env/lib/python3.8/site-packages/ansible/plugins/strategy/linear.py", line 306, in run self._queue_task(host, task, task_vars, play_context) File "/Users/timbabwe/algo/.env/lib/python3.8/site-packages/ansible/plugins/strategy/init.py", line 317, in _queue_task worker_prc.start() File "/Users/timbabwe/algo/.env/lib/python3.8/site-packages/ansible/executor/process/worker.py", line 96, in start return super(WorkerProcess, self).start() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 283, in _Popen return Popen(process_obj) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in init super().init(process_obj) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in init self._launch(process_obj) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch reduction.dump(process_obj, fp) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) TypeError: cannot pickle '_io.TextIOWrapper' object

davidemyers commented 4 years ago

You can ignore the warning, the problem is you can't use Python 3.8 on macOS with the version of Ansible that Algo depends on. Fall back to the latest version of Python 3.7.

A change to the documentation that warns against Python 3.8 on macOS has been submitted, but the PR #1607 has been held up for some reason.

Sl1mb0 commented 4 years ago

Thank you.

Can you point me in the right direction as to how I can use 3.7 instead of 3.8?

davidemyers commented 4 years ago

Unfortunately the Python packages from python.org don't come with an uninstaller, so removing the package takes several steps:

  1. In Finder, delete the package found in /Applications.
  2. In Finder, delete the rest of the package found in /Library/Frameworks/Python.framework.
  3. In Terminal, undo the changes to your PATH by running: mv ~/.bash_profile.pysave ~/.bash_profile
  4. In Terminal, remove the dozen or so symbolic links the package created in /usr/local/bin. Or just leave them because installing another version of the package will overwrite most of them.

Then download and install the latest version of Python 3.7 you can find on this page (currently 3.7.5).

Once you've done all that, open a new Terminal window or tab, download a new copy of Algo, and run the set of python3 commands to set it up again.