Errors in brewblox-ctl / docker-compose with use_paramiko_ssh()

Foolish me did some OS and firmware updates on my rpi2, now docker-compose / brewblox-ctl isn’t working. How do I begin to troubleshoot this?

Logs: https://termbin.com/hyij

pi@rpi2:~/brewblox $ brewblox-ctl down
Traceback (most recent call last):
  File "/home/pi/.local/bin/docker-compose", line 10, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/main.py", line 80, in main
    command_func()
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/main.py", line 189, in perform_command
    project = project_from_options('.', options)
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/command.py", line 70, in project_from_options
    enabled_profiles=get_profiles_from_options(options, environment)
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/command.py", line 153, in get_project
    verbose=verbose, version=api_version, context=context, environment=environment
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/docker_client.py", line 43, in get_client
    environment=environment, tls_version=get_tls_version(environment)
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/docker_client.py", line 170, in docker_client
    client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'use_ssh_client'
Command 'docker-compose down' returned non-zero exit status 1.

pi@rpi2:~/brewblox $ brewblox-ctl log
INFO       Log file: /home/pi/brewblox/brewblox.log
INFO       Writing Brewblox .env values...
INFO       Writing active containers...
Traceback (most recent call last):
  File "/home/pi/.local/bin/docker-compose", line 10, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/main.py", line 80, in main
    command_func()
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/main.py", line 189, in perform_command
    project = project_from_options('.', options)
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/command.py", line 70, in project_from_options
    enabled_profiles=get_profiles_from_options(options, environment)
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/command.py", line 153, in get_project
    verbose=verbose, version=api_version, context=context, environment=environment
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/docker_client.py", line 43, in get_client
    environment=environment, tls_version=get_tls_version(environment)
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/docker_client.py", line 170, in docker_client
    client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'use_ssh_client'
INFO       Writing service logs...
Traceback (most recent call last):
  File "/home/pi/.local/bin/docker-compose", line 10, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/main.py", line 80, in main
    command_func()
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/main.py", line 189, in perform_command
    project = project_from_options('.', options)
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/command.py", line 70, in project_from_options
    enabled_profiles=get_profiles_from_options(options, environment)
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/command.py", line 153, in get_project
    verbose=verbose, version=api_version, context=context, environment=environment
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/docker_client.py", line 43, in get_client
    environment=environment, tls_version=get_tls_version(environment)
  File "/home/pi/.local/lib/python3.7/site-packages/compose/cli/docker_client.py", line 170, in docker_client
    client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'use_ssh_client'
INFO       Writing docker-compose configuration...
INFO       Writing Spark blocks...
INFO       Writing dmesg output...
INFO       Uploading brewblox.log to termbin.com...
https://termbin.com/hyij

pi@rpi2:~/brewblox $ apt list docker-compose
Listing... Done
docker-compose/stable,now 1.21.0-3 all [installed]

pi@rpi2:~/brewblox $ pip3 list
Package            Version  
------------------ ---------
asn1crypto         0.24.0   
attrs              20.2.0   
bcrypt             3.2.0    
brewblox-ctl       0.23.3   
cached-property    1.5.2    
certifi            2018.8.24
cffi               1.14.3   
chardet            3.0.4    
click              7.1.2    
configobj          5.0.6    
cryptography       2.6.1    
distro             1.5.0    
docker             4.3.1    
docker-compose     1.28.4   
docker-pycreds     0.3.0    
dockerpty          0.4.1    
docopt             0.6.2    
entrypoints        0.3      
idna               2.6      
ifaddr             0.1.7    
importlib-metadata 2.0.0    
jsonschema         3.2.0    
keyring            17.1.1   
keyrings.alt       3.1.1    
paramiko           2.7.2    
pip                18.1     
pycparser          2.20     
pycrypto           2.6.1    
PyGObject          3.30.4   
PyNaCl             1.4.0    
pyrsistent         0.17.3   
python-apt         1.8.4.3  
python-dotenv      0.13.0   
pyxdg              0.25     
PyYAML             5.3.1    
requests           2.24.0   
SecretStorage      2.3.1    
setuptools         40.8.0   
six                1.12.0   
ssh-import-id      5.7      
texttable          1.6.3    
urllib3            1.24.1   
websocket-client   0.57.0   
wheel              0.32.3   
zeroconf           0.28.6   
zipp               3.4.0

https://github.com/docker/compose/issues/7970 suggests it’s a dependency version mismatch. You could try running

pip3 install --user --upgrade --upgrade-strategy=eager docker docker-compose

When trying it out here to check syntax, I got the following errors:

ERROR: launchpadlib 1.10.13 requires testresources, which is not installed.
ERROR: brewblox-ctl 0.23.3 has requirement python-dotenv[cli]<0.14.0,>=0.13.0, but you'll have python-dotenv 0.15.0 which is incompatible.

You can ignore those.

Thanks Bob. I’ll give that a try.

Worked perfectly. Noted: after updating os, don’t forget to update python docker packages. duh…

Thanks for sorting me out.

2 Likes