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

WireGuard stops working #610

Open
Paraphraser opened this issue Oct 1, 2022 · 0 comments
Open

WireGuard stops working #610

Paraphraser opened this issue Oct 1, 2022 · 0 comments

Comments

@Paraphraser
Copy link

If your remote clients have trouble connecting, try running:

$ docker logs wireguard

If you see the following messages being repeated endlessly:

s6-supervise custom-svc-README.txt (child): fatal: unable to exec run: Exec format error
s6-supervise custom-svc-README.txt: warning: unable to spawn ./run - waiting 10 seconds

then help is at hand. This problem appears to be an unintended side-effect of WireGuard's maintainers deciding to adopt a different directory structure inside the container.

IOTstack Pull Request #607 adopts the new directory structure but that will only help IOTstack users who implement WireGuard for the first time after that Pull Request has been applied.

If you use WireGuard and your remote clients can still connect then you need do nothing until Pull Request #607 is applied. The PR provides a script to assist with the migration, and also adds a section to the IOTstack Wiki explaining how to use it. Even then, the timing will be up to you.

However, if you are having problems now, you can proceed like this:

  1. Download the migration script:

    $ cd ~/IOTstack
    $ curl https://raw.githubusercontent.com/SensorsIot/IOTstack/24b6917e0b0809b3f551b2c46dc372eef01cba62/scripts/2022-10-01-wireguard-restructure.sh >2022-10-01-wireguard-restructure.sh
    
  2. Stop WireGuard:

    $ docker-compose rm --force --stop -v wireguard
    
  3. Run the migration script:

    $ ./2022-10-01-wireguard-restructure.sh
    

    If successful, the script explains how to edit your docker-compose.yml to update WireGuard's service definition.

  4. Start WireGuard:

    $ docker-compose up -d
    $ docker logs wireguard
    
  5. Test that your remote clients can connect.

  6. Clean up:

    $ sudo rm -rf ./volumes/wireguard.bak
    $ rm 2022-10-01-wireguard-restructure.sh
    

    The usual "double-check before hitting return when using sudo" applies!!

  7. Be aware that, until Pull Request 2022-10-01 WireGuard volumes restructure - master branch - PR 1 of 3 #607 is applied, the IOTstack menu and/or override processes may revert your WireGuard service definition to its pre-migration form. If that happens, you will have a mess to sort out. As a precaution, it would be a good idea to make sure you have a backup of a known-good post-migration configuration. At the very least you should snapshot:

    ~/IOTstack/docker-compose.yml
    ~/IOTstack/volumes/wireguard
    
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