기본 콘텐츠로 건너뛰기

Pyenv 에서 System 에서 사용하도록 Python 버전 설정하기

Pyenv 에서 System 에서 사용하도록 Python 버전 설정하기 node 나 npm 을 설치하고 npm install 시 python 버전이 맞지 않아 에러가 나는 경우가 있다 이럴때 pyenv 로 버전을 명시하여 사용 할 수 있음 $ pyenv pyenv 2.3.19 Usage: pyenv <command> [<args>] Some useful pyenv commands are:    --version   Display the version of pyenv    commands     List all available pyenv commands    exec         Run an executable with the selected Python version    global       Set or show the global Python version(s)    help         Display help for a command    hooks       List hook scripts for a given pyenv command    init         Configure the shell environment for pyenv    install     Install a Python version using python-build    latest       Print the latest installed or known version with the given prefix    local   ...

Kubernetes Ingress 사용시 Upstream 에러 ( An invalid response was received from the upstream server )

  버전 정보 K8S Version : 1.28 Ingress : Kong Kong Log upstream sent too big header while reading response header from upstream, client 문제 정의 Upstream 시 header size 가 작아서 에러가 나는 현상 해결 방안 /usr/local/kong/nginx-kong.conf 파일에 buffer size 를 늘려줌으로 해결 방안1 : /usr/local/kong/nginx-kong.conf 을 mount 하여 진행 nginx-kong.conf 을 만들어 진행 ------------------------------------------------ ... fastcgi_buffers 4 32k; fastcgi_buffer_size 28k; fastcgi_busy_buffers_size 32k; ... server { ... proxy_buffer_size 28 k; proxy_buffers 4 32 k; proxy_busy_buffers_size 32 k; } ... ----------------------------------------------- 방안2 : Deployment 에 spec.env 값을 주어 진행 - name: KONG_NGINX_PROXY_PROXY_BUFFER_SIZE value: "28k" - name: KONG_NGINX_PROXY_PROXY_BUSY_BUFFERS_SIZE value: "32k" - name: KONG_NGINX_PROXY_PROXY_BUFFERS value: "4 32k" - name: KONG_NGINX_HTTP_CLIENT_HEADER_BUFFER_SIZE value: ...

systemctl daemon-reload 안될때 [System has not been booted with systemd as init system (PID 1). Can't operate]

일반 Linux 에서 진행 $ sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig $ sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target $ exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME $ snap version  https://gist.github.com/alyleite/ca8b10581dbecd722d9dcc35b50d9b2b Docker Container 에서 진행 두가지 파라미터 필요 --privileged=true  /sbin/init $ sudo docker run -it -d --privileged=true --name {container_name} {image} /sbin/init https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities https://velog.io/@steveloper/Ubuntu-docker-container-%EC%97%90%EC%84%9C-systemctl-%EC%82%AC%EC%9A%A9%EC%8B%9C-%EB%B0%9C%EC%83%9D%ED%95%98%EB%8A%94-%EB%AC%B8%EC%A0%9CSystem-has-not-been-booted-with-systemd-as-init-system-PID-1.-Cant-operate.Failed-to-connect-to-bus-Host-is-down