네트워크와 서버
질문Kubernetes 셋팅하는데 정말 모르겠습니다..
사진에 보이는것 처럼 apiserver가 자꾸 몇 초간격으로 올라왔다가 내려갔다를 반복합니다.. 물론 self healing때문에 반복하는건 아는데 어느 부분에서 죽어서 켜지는 지를 모르겠습니다 로그를 확인해도 error로그도 없구요.. apiserver 떨어지면서 자꾸 다른 것들도 떨어져서 답답하네요.. 제발 도와주세요..
478
1
0

라이너·2025-01-12
아래 사항들을 확인해보시기 바랍니다. 1. Apiserver 로그 확인 현재 상황에서 가장 먼저 할 일은 apiserver 로그를 상세히 확인하는 것입니다. kubectl logs 명령어를 통해 apiserver pod의 로그를 살펴보세요. kubectl logs -n kube-system <apiserver-pod-name>
만약 로그가 너무...
질문docker-compose build 에서 에러
(venv) λ docker-compose up Creating network "django_webapp_default" with the default driver Building web failed to get console mode for stdout: The handle is invalid. [+] Building 13.2s (11/11) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/python:3.8.0-alpine 0.9s => [internal] load build context 2.1s => => transferring context: 1.50MB 2.0s => [1/7] FROM docker.io/library/python:3.8.0-alpine@sha256:7f465d82a49e0 0.0s => CACHED [2/7] WORKDIR /usr/src/app 0.0s => CACHED [3/7] RUN apk update 0.0s => CACHED [4/7] RUN apk add postgresql-dev gcc python3-dev musl-dev zlib 0.0s => CACHED [5/7] COPY . /usr/src/app/ 0.0s => CACHED [6/7] RUN pip install --upgrade pip 0.0s => ERROR [7/7] RUN pip install -r requirements.txt 10.2s ------ > [7/7] RUN pip install -r requirements.txt: #11 0.960 Collecting asgiref==3.3.1 #11 1.316 Downloading asgiref-3.3.1-py3-none-any.whl (19 kB) #11 1.375 Collecting backcall==0.2.0 #11 1.441 Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB) #11 1.524 Collecting beautifulsoup4==4.9.3 #11 1.585 Downloading beautifulsoup4-4.9.3-py3-none-any.whl (115 kB) #11 1.767 Collecting certifi==2020.12.5 #11 1.840 Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB) #11 2.212 Collecting cffi==1.14.5 #11 2.274 Downloading cffi-1.14.5.tar.gz (475 kB) #11 3.047 Collecting chardet==4.0.0 #11 3.107 Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB) #11 3.191 Collecting colorama==0.4.4 #11 3.254 Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB) #11 3.614 Collecting cryptography==3.4.7 #11 3.677 Downloading cryptography-3.4.7.tar.gz (546 kB) #11 3.839 Installing build dependencies: started #11 10.05 Installing build dependencies: finished with status 'error' #11 10.05 ERROR: Command errored out with exit status 1: #11 10.05 command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-qm77j71h/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.12; platform_python_implementation != '"'"'PyPy'"'"'' 'setuptools-rust>=0.11.4' #11 10.05 cwd: None #11 10.05 Complete output (150 lines): #11 10.05 Collecting setuptools>=40.6.0 #11 10.05 Downloading setuptools-56.0.0-py3-none-any.whl (784 kB) #11 10.05 Collecting wheel #11 10.05 Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB) #11 10.05 Collecting cffi>=1.12 #11 10.05 Using cached cffi-1.14.5.tar.gz (475 kB) #11 10.05 Collecting setuptools-rust>=0.11.4 #11 10.05 Downloading setuptools_rust-0.12.1-py3-none-any.whl (22 kB) #11 10.05 Collecting pycparser #11 10.05 Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB) #11 10.05 Collecting semantic-version>=2.6.0 #11 10.05 Downloading semantic_version-2.8.5-py2.py3-none-any.whl (15 kB) #11 10.05 Collecting toml>=0.9.0 #11 10.05 Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB) #11 10.05 Building wheels for collected packages: cffi #11 10.05 Building wheel for cffi (setup.py): started #11 10.05 Building wheel for cffi (setup.py): finished with status 'error' #11 10.05 ERROR: Command errored out with exit status 1: #11 10.05 command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-m5z8su85 #11 10.05 cwd: /tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/ #11 10.05 Complete output (58 lines): #11 10.05 Package libffi was not found in the pkg-config search path. #11 10.05 Perhaps you should add the directory containing `libffi.pc' #11 10.05 to the PKG_CONFIG_PATH environment variable #11 10.05 Package 'libffi', required by 'virtual:world', not found #11 10.05 Package libffi was not found in the pkg-config search path. #11 10.05 Perhaps you should add the directory containing `libffi.pc' #11 10.05 to the PKG_CONFIG_PATH environment variable #11 10.05 Package 'libffi', required by 'virtual:world', not found #11 10.05 Package libffi was not found in the pkg-config search path. #11 10.05 Perhaps you should add the directory containing `libffi.pc' #11 10.05 to the PKG_CONFIG_PATH environment variable #11 10.05 Package 'libffi', required by 'virtual:world', not found #11 10.05 Package libffi was not found in the pkg-config search path. #11 10.05 Perhaps you should add the directory containing `libffi.pc' #11 10.05 to the PKG_CONFIG_PATH environment variable #11 10.05 Package 'libffi', required by 'virtual:world', not found #11 10.05 Package libffi was not found in the pkg-config search path. #11 10.05 Perhaps you should add the directory containing `libffi.pc' #11 10.05 to the PKG_CONFIG_PATH environment variable #11 10.05 Package 'libffi', required by 'virtual:world', not found #11 10.05 running bdist_wheel #11 10.05 running build #11 10.05 running build_py #11 10.05 creating build #11 10.05 creating build/lib.linux-x86_64-3.8 #11 10.05 creating build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi #11 10.05 warning: build_py: byte-compiling is disabled, skipping. #11 10.05 #11 10.05 running build_ext #11 10.05 building '_cffi_backend' extension #11 10.05 creating build/temp.linux-x86_64-3.8 #11 10.05 creating build/temp.linux-x86_64-3.8/c #11 10.05 gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o #11 10.05 c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory #11 10.05 #include #11 10.05 ^~~~~~~ #11 10.05 compilation terminated. #11 10.05 error: command 'gcc' failed with exit status 1 #11 10.05 ---------------------------------------- executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1#11 10.05 ERROR: Failed building wheel for cffi #11 10.05 Running setup.py clean for cffi #11 10.05 Failed to build cffi #11 10.05 Installing collected packages: toml, setuptools, semantic-version, pycparser, wheel, setuptools-rust, cffi #11 10.05 Running setup.py install for cffi: started #11 10.05 Running setup.py install for cffi: finished with status 'error' #11 10.05 ERROR: Command errored out with exit status 1: #11 10.05 command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cjytulw5/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-qm77j71h/overlay --compile --install-headers /tmp/pip-build-env-qm77j71h/overlay/include/python3.8/cffi #11 10.05 cwd: /tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/ #11 10.05 Complete output (58 lines): #11 10.05 Package libffi was not found in the pkg-config search path. #11 10.05 Perhaps you should add the directory containing `libffi.pc' #11 10.05 to the PKG_CONFIG_PATH environment variable #11 10.05 Package 'libffi', required by 'virtual:world', not found #11 10.05 Package libffi was not found in the pkg-config search path. #11 10.05 Perhaps you should add the directory containing `libffi.pc' #11 10.05 to the PKG_CONFIG_PATH environment variable #11 10.05 Package 'libffi', required by 'virtual:world', not found #11 10.05 Package libffi was not found in the pkg-config search path. #11 10.05 Perhaps you should add the directory containing `libffi.pc' #11 10.05 to the PKG_CONFIG_PATH environment variable #11 10.05 Package 'libffi', required by 'virtual:world', not found #11 10.05 Package libffi was not found in the pkg-config search path. #11 10.05 Perhaps you should add the directory containing `libffi.pc' #11 10.05 to the PKG_CONFIG_PATH environment variable #11 10.05 Package 'libffi', required by 'virtual:world', not found #11 10.05 Package libffi was not found in the pkg-config search path. #11 10.05 Perhaps you should add the directory containing `libffi.pc' #11 10.05 to the PKG_CONFIG_PATH environment variable #11 10.05 Package 'libffi', required by 'virtual:world', not found #11 10.05 running install #11 10.05 running build #11 10.05 running build_py #11 10.05 creating build #11 10.05 creating build/lib.linux-x86_64-3.8 #11 10.05 creating build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi #11 10.05 copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi #11 10.05 warning: build_py: byte-compiling is disabled, skipping. #11 10.05 #11 10.05 running build_ext #11 10.05 building '_cffi_backend' extension #11 10.05 creating build/temp.linux-x86_64-3.8 #11 10.05 creating build/temp.linux-x86_64-3.8/c #11 10.05 gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o #11 10.05 c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory #11 10.05 #include #11 10.05 ^~~~~~~ #11 10.05 compilation terminated. #11 10.05 error: command 'gcc' failed with exit status 1 #11 10.05 ---------------------------------------- #11 10.05 ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cjytulw5/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-qm77j71h/overlay --compile --install-headers /tmp/pip-build-env-qm77j71h/overlay/include/python3.8/cffi Check the logs for full command output. #11 10.05 ---------------------------------------- #11 10.05 WARNING: Discarding https://files.pythonhosted.org/packages/9b/77/461087a514d2e8ece1c975d8216bc03f7048e6090c5166bc34115afdaa53/cryptography-3.4.7.tar.gz#sha256=3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713 (from https://pypi.org/simple/cryptography/) (requires-python:>=3.6). Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-qm77j71h/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.12; platform_python_implementation != '"'"'PyPy'"'"'' 'setuptools-rust>=0.11.4' Check the logs for full command output. #11 10.05 ERROR: Could not find a version that satisfies the requirement cryptography==3.4.7 #11 10.05 ERROR: No matching distribution found for cryptography==3.4.7 ------ ERROR: Service 'web' failed to build pip install 한 것중에 문제가 있는게 있는걸까요... 쟝고은 배포과정에서 막히는 경우가 많네요...
3.0K
2
0

라이너·2021-04-11
libffi 패키지가 설치되어있지 않아서 발생하는 에러 같습니다.
아래와 같이 패키지를 설치하신 후 실행해보시기 바랍니다.
RUN apk add --no-cache python3-dev libffi-dev gcc && pip3 install --upgrade pip
질문dockr 관련 질문입니다.
docker 에서 centos를 올린다음 리눅스와 아파치를 설치하여 개발환경을 구성하였습니다. 그리고 나서 외부 mysql db에 연결하여 페이지로 이동하는데 db에서 데이터를 못가져오고 있는 상황입니다. host ip로는 접속이 가능하게 해두었는데 container ip가 달라서 접속이 안되는건지 혹 docker에서 host와 container가 동일한 ip로 돌아가게 하는 방법이 있나 해서 질문 드리니다.
1.9K
1
0

kimho·2020-10-25
docker에서 docker가 설치된 호스트의 서비스로 접근하시려면 host.docker.internal 이라는 호스트 이름을 사용하시면 됩니다.
예를 들어 docker에서 아래와 같이 실행하시면 현재 호스트의 MySQL로 접속 됩니다.
mysql -h host.docker.internal -u root

