[2022-11-09, 00:09:11 KST] {pod_manager.py:225} INFO - Segmentation fault (core dumped)
오늘 하루종일 날 괴롭혔던 문제.
잘 돌아가던 배치가, 로그를 추가했더니 안 돌아간다.
그래서 segmentation fault의 원인을 보려고 한참을 헤멨다.
https://www.npmjs.com/package/segfault-handler
근데 이게 겁나 적용이 안 되어서 한참을 헤멨는데,
적용후 로그를 보니 openSSL 문제였다.
그래서 이걸 하루종일 해결하려 고난을 겪었는데
기존
FROM ubuntu:20.04
RUN apt-get -qq update
RUN apt-get -qq upgrade --yes
RUN apt-get -qq install curl --yes
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get install -y nodejs
WORKDIR /usr/vpCrawler
COPY . .
ENV TZ=Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN rm -rf node_modules/ package-lock.json yarn.lock
RUN apt-get install -y build-essential libcairo2-dev libssl-dev
RUN npm install
변경됨
FROM ubuntu:22.04 <- 단 한 줄!!
RUN apt-get -qq update
RUN apt-get -qq upgrade --yes
RUN apt-get -qq install curl --yes
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get install -y nodejs
WORKDIR /usr/vpCrawler
COPY . .
ENV TZ=Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN rm -rf node_modules/ package-lock.json yarn.lock
RUN apt-get install -y build-essential libcairo2-dev libssl-dev
RUN npm install
문제를 해결하고 고치는 단 한줄을 찾기위해 나머지를 롤백했더니
이것만 적용해주면 되는거였다.
이런.