Failed to execute script docker-compose on Windows 10 - docker

How to resolve this error?
File "docker\api\client.py", line 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: (5, 'CreateFile', 'Access is denied.')
[12456] Failed to execute script docker-compose

Related

macos: okta-awscli - exception - SSL validation failed for https://sts.amazonaws.com/ [Errno 2] No such file or directory

`Okta awscli is not working in my macOS.
Describe the bug
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 402, in ssl_wrap_socket
context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
FileNotFoundError: [Errno 2] No such file or directory
\botocore.exceptions.SSLError: SSL validation failed for https://sts.amazonaws.com/ [Errno 2] No such file or directory`
I had tried by uninstalling and installign python, aws, okta-awscli.
I'm using macos 12.6.1

Establish websocket connection from docker container failed: ConnectionRefusedError: [Errno 111] Connection refused

I tried to establish websocket connection from docker container, it failed. The target server is running, and establish http request is ok.
msg_cli = SimpleClient(address=f"ws://{server}:5000", manId=user_id)
The error infos areļ¼š
File "/opt/conda/lib/python3.7/site-packages/jd_api_test/tools/msg_push.py", line 24, in get_msg
msg_cli = SimpleClient(address=f"ws://{server}:5000", manId=user_id)
File "/root/.local/lib/python3.7/site-packages/chat/simple_ws.py", line 34, in __init__
timeout=timeout
File "/root/.local/lib/python3.7/site-packages/websocket/_core.py", line 605, in create_connection
websock.connect(url, **options)
File "/root/.local/lib/python3.7/site-packages/websocket/_core.py", line 247, in connect
options.pop('socket', None))
File "/root/.local/lib/python3.7/site-packages/websocket/_http.py", line 130, in connect
sock = _open_socket(addrinfo_list, options.sockopt, options.timeout)
File "/root/.local/lib/python3.7/site-packages/websocket/_http.py", line 205, in _open_socket
raise err
File "/root/.local/lib/python3.7/site-packages/websocket/_http.py", line 185, in _open_socket
sock.connect(address)
ConnectionRefusedError: [Errno 111] Connection refused
Thanks for your help!

Error FileNotFoundError while using Airflow docker compose

I was trying to use docker-compose to up the Airflow, I have used it in a directory where I have `docker-compose.yaml.
I have not changed docker-compose.yaml and just used the standard one from Apache Airflow. Just to say, I have installed Docker before and used it.
Here is the output in the console:
(base) ruslanpilipyuk#MacBook-Pro-Ruslan airflow-local % docker-compose -f docker-compose.yaml up -d
WARNING: The AIRFLOW_UID variable is not set. Defaulting to a blank string.
Traceback (most recent call last):
File "urllib3/connectionpool.py", line 670, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1255, in request
File "http/client.py", line 1301, in _send_request
File "http/client.py", line 1250, in endheaders
File "http/client.py", line 1010, in _send_output
File "http/client.py", line 950, in send
File "docker/transport/unixconn.py", line 43, in connect
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "requests/adapters.py", line 439, in send
File "urllib3/connectionpool.py", line 726, in urlopen
File "urllib3/util/retry.py", line 410, in increment
File "urllib3/packages/six.py", line 734, in reraise
File "urllib3/connectionpool.py", line 670, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1255, in request
File "http/client.py", line 1301, in _send_request
File "http/client.py", line 1250, in endheaders
File "http/client.py", line 1010, in _send_output
File "http/client.py", line 950, in send
File "docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
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.', FileNotFoundError(2, 'No such file or directory'))
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 81, in main
File "compose/cli/main.py", line 200, in perform_command
File "compose/cli/command.py", line 60, in project_from_options
File "compose/cli/command.py", line 152, in get_project
File "compose/cli/docker_client.py", line 41, 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 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
[2128] Failed to execute script docker-compose
It seems like airflow user definition missing.
Try to run the following (one time) and then run the docker-compose
echo -e "AIRFLOW_UID=$(id -u)" > .env
see also : https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html (Initializing Environment)
I got same exact error when attempting 'docker-compose up' on my Redhat 7.9 VM.
Our Unix admin was helping me undo a recent server patch which I thought might be causing issues. He asked to run 'docker version'. I did. It spewed results. Last line read:
==> "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
Doh! He then started docker daemon as root with 'systemctl start docker'.
I ran 'docker-compose up' again.
Docker's up and running.
If you have Docker Desktop installed on your local machine, just start/open it. Then try to run the docker command and it will execute successfully.

"docker-compose up" failed to build, The command '/bin/sh -c pipenv install' returned a non-zero code: 1

Cloned a project from github and in the README file it had the instructions to do
docker-compose up --build
npm run dev
so I typed docker-compose up --build in my terminal. It seemed to be working until
Installing dependencies from Pipfile.lock (68781d)...
and then I had to wait a few minutes and got the following error.
Installing dependencies from Pipfile.lock (68781d)...
An error occurred while installing tensorflow==2.4.1 --hash=sha256:36d5acd60aac48e34bd545d0ce1fb8b3fceebff6b8782436defd0f71c12203bd --hash=sha256:55368ba0bedb513ba0e36a2543a588b5276e9b2ca99fa3232a9a176601a7bab5 --hash=sha256:e1f2799cc86861680d8515167f103e2207a8cab92a4afe5471e4839330591f08 --hash=sha256:22723b8e1fa83b34f56c349b16a57aaff913b404451fcf70981f2b1d6e0c64fc --hash=sha256:efa9daa4b3701a4e439b24b74c1e4b66844aee8ae5263fb3cc12281ac9cc9f67 --hash=sha256:2357112319303da1b5459a621fd0503c2b2cd97b6c33c4903abd46b3c3e380e2 --hash=sha256:4a04081647b89a8fb602895b29ffc559e3c20aac8bde1d4c5ecd2a65adce5d35 --hash=sha256:0e427b1350be6dbe572f971947c5596fdbb152081f227808d8becd894bf40282 --hash=sha256:eedcf578afde5e6e69c75d796bed41093451cd1ab54afb438760e40fb74a09de! Will try again.
An error occurred while installing torch==1.7.1; python_full_version >= '3.6.2' --hash=sha256:f0aaf657145533824b15f2fd8fde8f8c67fe6c6281088ef588091f03fad90243 --hash=sha256:5d76c255a41484c1d41a9ff570b9c9f36cb85df9428aa15a58ae16ac7cfc2ea6 --hash=sha256:a3793dcceb12b1e2281290cca1277c5ce86ddfd5bf044f654285a4d69057aea7 --hash=sha256:e000b94be3aa58ad7f61e7d07cf379ea9366cf6c6874e68bd58ad0bdc537b3a7 --hash=sha256:af464a6f4314a875035e0c4c2b07517599704b214634f4ed3ad2e748c5ef291f --hash=sha256:de84b4166e3f7335eb868b51d3bbd909ec33828af27290b4171bce832a55be3c --hash=sha256:38d67f4fb189a92a977b2c0a38e4f6dd413e0bf55aa6d40004696df7e40a71ff --hash=sha256:d241c3f1c4d563e4ba86f84769c23e12606db167ee6f674eedff6d02901462e3 --hash=sha256:dd2fc6880c95e836960d86efbbc7f63d3287f2e1893c51d31f96dbfe02f0d73e --hash=sha256:6652a767a0572ae0feb74ad128758e507afd3b8396b6e7f147e438ba8d4c6f63 --hash=sha256:422e64e98d0e100c360993819d0307e5d56e9517b26135808ad68984d577d75a --hash=sha256:2e49cac969976be63117004ee00d0a3e3dd4ea662ad77383f671b8992825de1a! Will try again.
An error occurred while installing torchvision==0.8.2 --hash=sha256:24db8f4c3d812a032273f68563ad5dbd724f5bfbed523d0c6dce8cede26bb153 --hash=sha256:afb76a66b9b0693f758a881a2bf333ed97e3c0c3f15a413c4f49d8dd8bd21307 --hash=sha256:976750a49db2e23dc5a1ed0b5c31f7af51ed2702eee410ee09ef985c3a3e48cf --hash=sha256:1bd58acc3366ec02266aae56a7a752d43ef07de4a6ba420c4f907d0c9168bb8c --hash=sha256:cd8817e9197fc60ebae37162a445db90bbf35591314a5767ad3d1490b5d65b0f --hash=sha256:86fae370d222f76ad57c57c3bee03f78b8db727743bfb4c1559a3d395159cea8 --hash=sha256:b068f6bcbe91bdd34dda0a39e8a26392add45a3be82543f6dd523b76484fb56f --hash=sha256:951239b5fcb911dbf78c1385d677f5f48c7a1b12859e3d3ec287562821b17cf2! Will try again.
An error occurred while installing tqdm==4.56.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' --hash=sha256:fe3d08dd00a526850568d542ff9de9bbc2a09a791da3c334f3213d8d0bbbca65 --hash=sha256:4621f6823bab46a9cc33d48105753ccbea671b68bab2c50a9f0be23d4065cb5a! Will try again.
An error occurred while installing transformers==4.2.2 --hash=sha256:d0999ababcc3e416a51c42823b56f5116acc5c0913e44e829e83d0db2d475021 --hash=sha256:e151ee7a56e7649de567ad6f4d6a83245c564ca93a886ef0e025f058895cf9cc! Will try again.
An error occurred while installing twitter==1.18.0 --hash=sha256:acdc85e5beea752967bb64c63bde8b915c49a31a01db1b2fecccf9f2c1d5c44d --hash=sha256:52545fd3b70d3d3807d3ce62d1a256727856d784d1630d64dedcc643aaf0b908! Will try again.
An error occurred while installing typing-extensions==3.7.4.3 --hash=sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918 --hash=sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c --hash=sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f! Will try again.
An error occurred while installing unidic-lite==1.0.7 --hash=sha256:260798392fddc8746d7d5596dc9f9a4250a10f41961771cf709ec2dc7db8260a! Will try again.
An error occurred while installing uritemplate==3.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' --hash=sha256:07620c3f3f8eed1f12600845892b0e036a2420acf513c53f7de0abd911a5894f --hash=sha256:5af8ad10cec94f215e3f48112de2022e1d5a37ed427fbd88652fa908f2ab7cae! Will try again.
An error occurred while installing urllib3==1.26.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4' --hash=sha256:d8ff90d979214d7b4f8ce956e80f4028fc6860e4431f731ea4a8c08f23f99473 --hash=sha256:19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08! Will try again.
An error occurred while installing werkzeug==1.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' --hash=sha256:6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c --hash=sha256:2de2a5db0baeae7b2d2664949077c2ac63fbd16d98da0ff71837f7d1dea3fd43! Will try again.
An error occurred while installing wheel==0.36.2; python_version >= '3' --hash=sha256:78b5b185f0e5763c26ca1e324373aadd49182ca90e825f7853f4b2509215dc0e --hash=sha256:e11eefd162658ea59a60a0f6c7d493a7190ea4b9a85e335b33489d9f17e0245e! Will try again.
Installing initially failed dependencies...
An error occurred while installing wrapt==1.12.1 --hash=sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7! Will try again.
[InstallError]: File "/usr/local/lib/python3.8/site-packages/pipenv/cli/command.py", line 233, in install
[InstallError]: retcode = do_install(
[InstallError]: File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 2052, in do_install
[InstallError]: do_init(
[InstallError]: File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 1304, in do_init
[InstallError]: do_install_dependencies(
[InstallError]: File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 899, in do_install_dependencies
[InstallError]: batch_install(
[InstallError]: File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 796, in batch_install
[InstallError]: _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]: File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 703, in _cleanup_procs
[InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd8389ffc70>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/tensorflow/
[pipenv.exceptions.InstallError]: WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd8389ffee0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/tensorflow/
[pipenv.exceptions.InstallError]: WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd8383f5070>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/tensorflow/
[pipenv.exceptions.InstallError]: WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd8383f51f0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/tensorflow/
[pipenv.exceptions.InstallError]: WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd8383f53d0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/tensorflow/
[pipenv.exceptions.InstallError]: ERROR: Could not find a version that satisfies the requirement tensorflow==2.4.1
[pipenv.exceptions.InstallError]: ERROR: No matching distribution found for tensorflow==2.4.1
ERROR: Couldn't install package: tensorflow
Package installation failed...
ERROR: Service 'youtuberboard' failed to build : The command '/bin/sh -c pipenv install --system' returned a non-zero code: 1
Why am I getting these errors and how can I fix this?
If I do docker images I can check that the image is made, but the container does not seem to be made when I checkdocker ps -a.
Why is the container not made?
edit:
so I thought using the pipfile.lock was the problem so in the Dockerfile I changed the
RUN pipenv install --system
to
RUN pipenv install --system --verbose --skip-lock
and added the --skip-lock
this was not the answer and I still got a similar error.
.
. (deleting some lines)
.
Skipping link: none of the wheel's tags match: cp39-cp39-win_amd64: https://files.pythonhosted.org/packages/d6/c1/70f2fd464a895844a9bf4cf1d93b09eb6cd5edf8274d19a7fed2ed6c4cc3/torch-1.7.1-cp39-cp39-win_amd64.whl#sha256=6652a767a0572ae0feb74ad128758e507afd3b8396b6e7f147e438ba8d4c6f63 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
Skipping link: none of the wheel's tags match: cp39-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/79/c8/7f7843dcbaf2263918d257e8022770be577a3d7587dd0ddf8171947eabb4/torch-1.7.1-cp39-none-macosx_10_9_x86_64.whl#sha256=38d67f4fb189a92a977b2c0a38e4f6dd413e0bf55aa6d40004696df7e40a71ff (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
Given no hashes to check 1 links for project 'torch': discarding no candidates
Collecting torch==1.7.1
Created temporary directory: /tmp/pip-unpack-uv81hb8h
Looking up "https://files.pythonhosted.org/packages/1d/a9/f349273a0327fdf20a73188c9c3aa7dbce68f86fad422eadd366fd2ed7a0/torch-1.7.1-cp38-cp38-manylinux1_x86_64.whl" in the cache
No cache entry available
Starting new HTTPS connection (1): files.pythonhosted.org:443
https://files.pythonhosted.org:443 "GET /packages/1d/a9/f349273a0327fdf20a73188c9c3aa7dbce68f86fad422eadd366fd2ed7a0/torch-1.7.1-cp38-cp38-manylinux1_x86_64.whl HTTP/1.1" 200 776818711
Downloading torch-1.7.1-cp38-cp38-manylinux1_x86_64.whl (776.8 MB)
Ignoring unknown cache-control directive: immutable
Updating cache with response from "https://files.pythonhosted.org/packages/1d/a9/f349273a0327fdf20a73188c9c3aa7dbce68f86fad422eadd366fd2ed7a0/torch-1.7.1-cp38-cp38-manylinux1_x86_64.whl"
Caching due to etag
sys.exit(cli())
File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/pipenv/cli/command.py", line 233, in install
retcode = do_install(
File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 2052, in do_install
do_init(
File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 1304, in do_init
do_install_dependencies(
File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 903, in do_install_dependencies
_cleanup_procs(procs, failed_deps_queue, retry=False)
File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 703, in _cleanup_procs
raise exceptions.InstallError(c.dep.name, extra=err_lines)
pipenv.exceptions.InstallError: ERROR: Couldn't install package: facenet-pytorch
Package installation failed...
ERROR: Service 'youtuberboard' failed to build : The command '/bin/sh -c pipenv install --system --verbose --skip-lock' returned a non-zero code: 1
I needed to make the docker memory size larger. Changed the docker setting.

Failed to execute fabric8 docker plugin

Running mvn clean install pulls up this error( Windows)
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.20.1:start (prepare-environment) on project integration-test: Execution prepare-environment of goal io.fabric8:docker-maven-plugin:0.20.1:start failed: Start-Job failed with unexpected exception: [sebp/elk:latest] "elk": Timeout after 120365 ms while waiting on url http://localhost:32774/

Resources