🏆 2024

맛집 분야 크리에이터

🏆 2023

IT 분야 크리에이터

👩‍❤️‍👨 구독자 수

183

✒️ 게시글 수

0
https://tistory1.daumcdn.net/tistory/4631271/skin/images/blank.png 네이버블로그

🩷 방문자 추이

오늘

어제

전체

🏆 인기글 순위

티스토리 뷰

728x90
반응형

오류 내용

저는 아래와 같은 오류가 발생했습니다.

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 33, in <module>
    sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
    command_func()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 200, in perform_command
    project = project_from_options('.', options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 60, in project_from_options
    return get_project(
           ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 152, in get_project
    client = get_client(
             ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 41, in get_client
    client = docker_client(
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 170, in docker_client
    client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused'))

 

오류 원인

결론적으로 저의 경우에는 도커 서버가 구동 중이지 않아서 오류가 발생했습니다.

도커가 구동 중인지 확인하기 위해서 아래 명령어를 실행해보았습니다.

┌──(vagrant㉿kali)-[/mnt/gnuboard5]
└─$ systemctl status docker.service                                                                            130 ⨯
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Tue 2023-06-13 11:08:06 EDT; 2min 46s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 829 (code=exited, status=0/SUCCESS)
        CPU: 23.339s

Warning: some journal files were not opened due to insufficient permissions.

그랬더니 Active 상태가 inactive 로 구동되지 않고 있음을 확인할 수 있었습니다.

때문에 다시 구동시켜줘보았습니다.

 

오류 해결

┌──(vagrant㉿kali)-[/mnt/gnuboard5]
└─$ sudo systemctl start docker.service

┌──(vagrant㉿kali)-[/mnt/gnuboard5]
└─$ systemctl status docker.service    
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-06-13 11:11:13 EDT; 1s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 25620 (dockerd)
      Tasks: 12
     Memory: 30.1M
        CPU: 538ms
     CGroup: /system.slice/docker.service
             └─25620 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

위와 같이 Active 상태가 active (running)이 된 것을 볼 수 있었습니다.

그리고 docker-compose 를 했더니 잘 실행되는 것을 확인했습니다.

 

만약 저와 같이 Kali Linux 칼리 리눅스 환경에서 도커를 설치하시는 분이라면 아래 포스팅을 참고해보세요!

저는 여기서 참고했습니다!

https://computingforgeeks.com/install-docker-and-docker-compose-on-kali-linux/

 

- 끝 -

 

 

728x90
반응형
댓글