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

Configuration error - kwargs_from_env() got an unexpected keyword argument 'ssl_version #567

Closed
scottyb908 opened this issue Dec 10, 2023 · 5 comments

Comments

@scottyb908
Copy link

For some reason I cant get the main config to start. I am getting an error with SSL version. I ran through everything with no errors, but did have to run a permission fix for the Internet-monitor is running task. Ive tried from several fresh OS installs with no luck

PLAY [Configure Internet Pi.] ************************************************************************************************

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

TASK [Load configuration (with defaults from example file).] *****************************************************************
ok: [127.0.0.1] => (item=example.config.yml)
ok: [127.0.0.1] => (item=config.yml)

TASK [Ensure apt cache is up to date.] ***************************************************************************************
ok: [127.0.0.1]

TASK [Ensure pacman cache is up to date] *************************************************************************************
skipping: [127.0.0.1]

TASK [Check if Docker is already present.] ***********************************************************************************
ok: [127.0.0.1]

TASK [Download Docker install convenience script.] ***************************************************************************
skipping: [127.0.0.1]

TASK [Run Docker install convenience script.] ********************************************************************************
skipping: [127.0.0.1]

TASK [Ensure Docker is started.] *********************************************************************************************
ok: [127.0.0.1]

TASK [Ensure dependencies are installed (Debian).] ***************************************************************************
ok: [127.0.0.1]

TASK [Ensure dependencies are installed (Archlinux).] ************************************************************************
skipping: [127.0.0.1]

TASK [Install Docker Compose using Pip.] *************************************************************************************
ok: [127.0.0.1]

TASK [Ensure user is added to the docker group: pi] **************************************************************************
ok: [127.0.0.1]

TASK [Reset connection so docker group is picked up.] ************************************************************************
[WARNING]: Reset is not implemented for this connection

TASK [Gather package facts.] *************************************************************************************************
ok: [127.0.0.1]

TASK [Add Buster backports apt key.] *****************************************************************************************
skipping: [127.0.0.1] => (item=04EE7237B7D453EC)
skipping: [127.0.0.1] => (item=648ACFD622F3D138)
skipping: [127.0.0.1] => (item=0E98404D386FA1D9)
skipping: [127.0.0.1] => (item=6ED0E7B82643E131)
skipping: [127.0.0.1]

TASK [Add Buster backports for fixed libseccomp2.] ***************************************************************************
skipping: [127.0.0.1]

TASK [Install >libseccomp2.4.4 to fix 32-bit OS issue.] **********************************************************************
skipping: [127.0.0.1]

TASK [Synchronize internet-monitoring directory.] ****************************************************************************
ok: [127.0.0.1]

TASK [Ensure internet-monitoring directory is not a Git repository.] *********************************************************
ok: [127.0.0.1]

TASK [Copy templated internet-monitoring files into place.] ******************************************************************
ok: [127.0.0.1] => (item={'src': 'docker-compose.yml.j2', 'dest': 'docker-compose.yml'})
ok: [127.0.0.1] => (item={'src': 'grafana-config.monitoring.j2', 'dest': 'grafana/config.monitoring'})
ok: [127.0.0.1] => (item={'src': 'prometheus.yml.j2', 'dest': 'prometheus/prometheus.yml'})
ok: [127.0.0.1] => (item={'src': 'prometheus-pinghosts.yaml.j2', 'dest': 'prometheus/pinghosts.yaml'})

TASK [Ensure internet-monitoring environment is running.] ********************************************************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Configuration error - kwargs_from_env() got an unexpected keyword argument 'ssl_version'"}

PLAY RECAP *******************************************************************************************************************
127.0.0.1 : ok=12 changed=0 unreachable=0 failed=1 skipped=7 rescued=0 ignored=0

@dtronicsuk
Copy link

Im having the same issues.

However i have managed to get the monitoring part working.

  1. run sudo apt install docker (or sudo pacman -S docker if you are using arch linux)
  2. run the playbook as normal until it fails
  3. go to internet-monitoring (cd ~/internet-monitoring/
  4. run docker compose up -d
  5. wait for it to finish
  6. now you should be able to access the monitor at your pi's IP:3030

PiHole doesnt seem to work

This issue seems to be with docker-compose which doesnt support ssl_version any more so unless theres a way of making the playbook use normal docker and not the python one then this is the only fix for now

@thvd
Copy link

thvd commented Dec 15, 2023

Here you can read what the cause is: docker/docker-py#3194

Personally i added this, what solved the issue:

- name: Install Docker SDK for Python
  ansible.builtin.pip:
    name: 
      - "docker==6.1.3"
      - "docker-compose"

@lvarley91
Copy link

i too ran into this issue when i had to redeploy my VM from scratch after losing it during a storage migration and just happening to have a failed backup at the same time...
( thanks hyper-v and veeam for both failing me lol)

for anyone wondering where to make the change that thvd mentioned, cd into internet-pi/tasks/

you can just paste it into the bottom of docker.yml. for example:
nano docker.yml

scroll right to the bottom, paste in the section from thvd and then do ctrl+o to save your changes, hit enter to overwrite the file and then ctrl+x to exit nano

if you dont have nano you can install it by running:
sudo apt-get install nano

then you just run the main playbook again with:
sudo ansible-playbook main.yml

and it should complete!

Thans thvd for this solution. I tried quite a few things that did not work before this.

wanted to post this so that other noobs like me know where to make that change, took me a couple of attempts to figure out where to put it.

@Yuri-Lima
Copy link

Here you can read what the cause is: docker/docker-py#3194

Personally i added this, what solved the issue:

- name: Install Docker SDK for Python
  ansible.builtin.pip:
    name: 
      - "docker==6.1.3"
      - "docker-compose"

@thvd It works. Thank you man.

@geerlingguy
Copy link
Owner

geerlingguy commented Feb 4, 2024

See #575 — this should be fixed now, but make sure you git pull to update this repository, then also update to the latest Ansible Galaxy collection versions if you have an old install on your system:

# Run this command inside the internet-pi directory to update all Ansible Galaxy collections:
ansible-galaxy collection install -r requirements.yml --force

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

6 participants