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.93k stars 2.32k forks source link

systemd-resolved.service failed #14524

Closed sinkingfeeling closed 2 years ago

sinkingfeeling commented 2 years ago

Trying to install algo on a KVM VPS running Ubuntu 20.04. It is an IPV6 only VPS. Installation is going smoothly but on the last step I receive this error

failed: [localhost] (item=systemd-resolved) => {"ansible_loop_var": "item", "changed": false, "item": "systemd-resolved", "msg": "Unable to start service systemd-resolved: Job for systemd-resolved.service failed because the control process exited with error code.\nSee \"systemctl status systemd-resolved.service\" and \"journalctl -xe\" for details.\n"}

Full log

(.env) root@IPV6:~/algo# ./algo

PLAY [localhost] *****************************************************************************************************************************************************************************

TASK [Gathering Facts] ***********************************************************************************************************************************************************************
ok: [localhost]

TASK [Playbook dir stat] *********************************************************************************************************************************************************************
ok: [localhost]

TASK [Ensure Ansible is not being run in a world writable directory] *************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
[DEPRECATION WARNING]: Use 'ansible.utils.ipaddr' module instead. This feature will be removed from ansible.netcommon in a release after 2024-01-01. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
[WARNING]: The value '' is not a valid IP address or network, passing this value to ipaddr filter might result in breaking change in future.

TASK [Ensure the requirements installed] *****************************************************************************************************************************************************
ok: [localhost]

TASK [Set required ansible version as a fact] ************************************************************************************************************************************************
ok: [localhost] => (item=ansible==6.1.0)

TASK [Just get the list from default pip] ****************************************************************************************************************************************************
ok: [localhost]

TASK [Verify Python meets Algo VPN requirements] *********************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Verify Ansible meets Algo VPN requirements] ********************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}
[WARNING]: Found variable using reserved name: no_log

PLAY [Ask user for the input] ****************************************************************************************************************************************************************

TASK [Gathering Facts] ***********************************************************************************************************************************************************************
ok: [localhost]
[Cloud prompt]
What provider would you like to use?
    1. DigitalOcean
    2. Amazon Lightsail
    3. Amazon EC2
    4. Microsoft Azure
    5. Google Compute Engine
    6. Hetzner Cloud
    7. Vultr
    8. Scaleway
    9. OpenStack (DreamCompute optimised)
    10. CloudStack (Exoscale optimised)
    11. Linode
    12. Install to existing Ubuntu 18.04 or 20.04 server (for more advanced users)

Enter the number of your desired provider
:
12^M
TASK [Cloud prompt] **************************************************************************************************************************************************************************
ok: [localhost]

TASK [Set facts based on the input] **********************************************************************************************************************************************************
ok: [localhost]
[Cellular On Demand prompt]
Do you want macOS/iOS clients to enable "Connect On Demand" when connected to cellular networks?
[y/N]
:
n^M
TASK [Cellular On Demand prompt] *************************************************************************************************************************************************************
ok: [localhost]
[Wi-Fi On Demand prompt]
Do you want macOS/iOS clients to enable "Connect On Demand" when connected to Wi-Fi?
[y/N]
:
n^M
TASK [Wi-Fi On Demand prompt] ****************************************************************************************************************************************************************
ok: [localhost]
[Retain the PKI prompt]
Do you want to retain the keys (PKI)? (required to add users in the future, but less secure)
[y/N]
:
n^M
TASK [Retain the PKI prompt] *****************************************************************************************************************************************************************
ok: [localhost]
[DNS adblocking prompt]
Do you want to enable DNS ad blocking on this VPN server?
[y/N]
:
n^M
TASK [DNS adblocking prompt] *****************************************************************************************************************************************************************
ok: [localhost]
[SSH tunneling prompt]
Do you want each user to have their own account for SSH tunneling?
[y/N]
:
n^M
TASK [SSH tunneling prompt] ******************************************************************************************************************************************************************
ok: [localhost]

TASK [Set facts based on the input] **********************************************************************************************************************************************************
ok: [localhost]

PLAY [Provision the server] ******************************************************************************************************************************************************************

TASK [Gathering Facts] ***********************************************************************************************************************************************************************
ok: [localhost]

--> Please include the following block of text when reporting issues:

Algo running on: Ubuntu 20.04 LTS (Virtualized: kvm)
Created from git clone. Last commit: 347f864 Ansible upgrade 6.1 (#14500)
Python 3.8.10
Runtime variables:
    algo_provider "local"
    algo_ondemand_cellular "False"
    algo_ondemand_wifi "False"
    algo_ondemand_wifi_exclude "X251bGw="
    algo_dns_adblocking "False"
    algo_ssh_tunneling "False"
    wireguard_enabled "True"
    dns_encryption "True"

TASK [Display the invocation environment] ****************************************************************************************************************************************************
changed: [localhost]

TASK [Install the requirements] **************************************************************************************************************************************************************
ok: [localhost]

TASK [Include a provisioning role] ***********************************************************************************************************************************************************
[local : pause]
https://trailofbits.github.io/algo/deploy-to-ubuntu.html

Local installation might break your server. Use at your own risk.

Proceed? Press ENTER to continue or CTRL+C and A to abort...:
^M
TASK [local : pause] *************************************************************************************************************************************************************************
ok: [localhost] => (item=https://trailofbits.github.io/algo/deploy-to-ubuntu.html

Local installation might break your server. Use at your own risk.

Proceed? Press ENTER to continue or CTRL+C and A to abort...)
[local : pause]
Enter the IP address of your server: (or use localhost for local installation):
[localhost]
:
localhost^M
TASK [local : pause] *************************************************************************************************************************************************************************
ok: [localhost]

TASK [local : Set the facts] *****************************************************************************************************************************************************************
ok: [localhost]
[local : pause]
Enter the public IP address or domain name of your server: (IMPORTANT! This is used to verify the certificate)
[localhost]
:
xxxxx
TASK [local : pause] *************************************************************************************************************************************************************************
ok: [localhost]

TASK [local : Set the facts] *****************************************************************************************************************************************************************
ok: [localhost]

TASK [Set subjectAltName as a fact] **********************************************************************************************************************************************************
ok: [localhost]

TASK [Add the server to an inventory group] **************************************************************************************************************************************************
changed: [localhost]

TASK [Linux | set OS specific facts] *********************************************************************************************************************************************************
ok: [localhost]

TASK [Set config paths as facts] *************************************************************************************************************************************************************
ok: [localhost]

TASK [Update config paths] *******************************************************************************************************************************************************************
changed: [localhost]

TASK [debug] *********************************************************************************************************************************************************************************
ok: [localhost] => {
    "IP_subject_alt_name": "2602:febc:0:148::"
}
[WARNING]: Reset is not implemented for this connection

TASK [Wait 600 seconds for target connection to become reachable/usable] *********************************************************************************************************************
ok: [localhost] => (item=localhost)

PLAY [Configure the server and install required software] ************************************************************************************************************************************

TASK [common : Check the system] *************************************************************************************************************************************************************
ok: [localhost]

TASK [common : include_tasks] ****************************************************************************************************************************************************************
included: /root/algo/roles/common/tasks/ubuntu.yml for localhost

TASK [common : Gather facts] *****************************************************************************************************************************************************************
ok: [localhost]

TASK [common : Install unattended-upgrades] **************************************************************************************************************************************************
ok: [localhost]

TASK [common : Configure unattended-upgrades] ************************************************************************************************************************************************
ok: [localhost]

TASK [common : Periodic upgrades configured] *************************************************************************************************************************************************
ok: [localhost]

TASK [common : Disable MOTD on login and SSHD] ***********************************************************************************************************************************************
ok: [localhost] => (item={'regexp': '^session.*optional.*pam_motd.so.*', 'line': '# MOTD DISABLED', 'file': '/etc/pam.d/login'})
ok: [localhost] => (item={'regexp': '^session.*optional.*pam_motd.so.*', 'line': '# MOTD DISABLED', 'file': '/etc/pam.d/sshd'})

TASK [common : Ensure fallback resolvers are set] ********************************************************************************************************************************************
ok: [localhost]
[DEPRECATION WARNING]: Use 'ansible.utils.ipmath' module instead. This feature will be removed from ansible.netcommon in a release after 2024-01-01. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.

TASK [common : Loopback for services configured] *********************************************************************************************************************************************
ok: [localhost]

TASK [common : systemd services enabled and started] *****************************************************************************************************************************************
changed: [localhost] => (item=systemd-networkd)
failed: [localhost] (item=systemd-resolved) => {"ansible_loop_var": "item", "changed": false, "item": "systemd-resolved", "msg": "Unable to start service systemd-resolved: "}

TASK [include_tasks] *************************************************************************************************************************************************************************
included: /root/algo/playbooks/rescue.yml for localhost

TASK [debug] *********************************************************************************************************************************************************************************
ok: [localhost] => {
    "fail_hint": [
        "Sorry, but something went wrong!",
        "Please check the troubleshooting guide.",
        "https://trailofbits.github.io/algo/troubleshooting.html"
    ]
}

TASK [Fail the installation] *****************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed as requested from task"}

PLAY RECAP ***********************************************************************************************************************************************************************************
localhost                  : ok=43   changed=3    unreachable=0    failed=1    skipped=19   rescued=1    ignored=0
jackivanov commented 2 years ago

We don't officially support IPv6 only systems

sinkingfeeling commented 2 years ago

We don't officially support IPv6 only systems

Is there an unofficial workaround by chance?

jackivanov commented 2 years ago

@jmeeter never seen one sorry. IPv4 is still alive, so you can use it.