我正在尝试在我的 ubuntu 18.04 中设置 KSQLDB。我正在按照以下步骤操作: https://docs.ksqldb.io/en/latest/operate-and-deploy/installation/installing/
我正在一步一步地做它所说的。
但是当我运行 docker-compose up
时,我收到此错误:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker/api/client.py", line 214, in _retrieve_server_version
File "docker/api/daemon.py", line 181, in version
File "docker/utils/decorators.py", line 46, in inner
File "docker/api/client.py", line 237, in _get
File "requests/sessions.py", line 543, in get
File "requests/sessions.py", line 530, in request
File "requests/sessions.py", line 643, in send
File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose/cli/main.py", line 80, in main
File "compose/cli/main.py", line 189, in perform_command
File "compose/cli/command.py", line 70, in project_from_options
File "compose/cli/command.py", line 153, in get_project
File "compose/cli/docker_client.py", line 43, in get_client
File "compose/cli/docker_client.py", line 170, in docker_client
File "docker/api/client.py", line 197, in __init__
File "docker/api/client.py", line 222, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
[7677] Failed to execute script docker-compose
答案 0 :(得分:1)
这可能与没有将您的 linux 用户添加到 docker 组有关。
默认情况下,您需要使用 sudo 权限运行 Docker 相关命令。
sudo docker-compose up
要将您的用户添加到群组,请执行以下操作:
创建群组
sudo groupadd docker
将当前用户添加到 docker 组
sudo usermod -aG docker $USER
重新加载组权限
newgrp docker