cloudrun出现find_vma失败错误。

huangapple 未分类评论50阅读模式
英文:

cloudrun failing with find_vma failed

问题

我的 Cloud Run Dockerfile 如下:

FROM alpine:3.10.5

USER root

RUN apk update \
&& apk upgrade \
&& apk add --no-cache bash \
&& apk add --no-cache --virtual=build-dependencies unzip \
&& apk add --no-cache curl \
&& apk add --no-cache openjdk8-jre

RUN apk add --no-cache python3 \
&& python3 -m ensurepip \
&& pip3 install --upgrade pip setuptools wheel \
&& rm -r /usr/lib/python*/ensurepip && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi 

WORKDIR /opt/bin

RUN pip install Flask 'gunicorn>=20.0.1,<21' sqlalchemy pg8000 logger

COPY <some jar files>.jar /opt/bin/
COPY *.py /opt/bin/
RUN rm -r /root/.cache

CMD exec gunicorn --bind :$PORT --workers 2 --threads 8 --worker-tmp-dir /dev/shm --timeout 30 http_test 

在 Cloud Run 上运行 Docker 镜像时,当我向 Cloud Run 提供的 URL 发送 GET 请求时,出现以下错误:

2020-05-04 13:22:14.551 ISTContainer Sandbox: 不支持的系统调用 membarrier(0x10,0x0,0x0,0x8,0x3e57651d89a0,0x3e57651d8a30)。很可能您可以安全地忽略此消息,这可能不是您要排除故障的任何错误的原因。请参考 https://gvisor.dev/c/linux/amd64/membarrier 获取更多信息。
2020-05-04 13:22:14.603 ISTOpenJDK 64-Bit Server VM 警告: 无法检测原始线程堆栈位置 - find_vma 失败

我尝试了不同的 Alpine 镜像,切换到 gunicorn 20.0.1 以避免 libc 问题,但问题仍未解决。如有建议或帮助,将不胜感激。

英文:

my dockerfile for cloud run is as below.

FROM alpine:3.10.5

USER root

RUN apk update \
&amp;&amp; apk upgrade \
&amp;&amp; apk add --no-cache bash \
&amp;&amp; apk add --no-cache --virtual=build-dependencies unzip \
&amp;&amp; apk add --no-cache curl \
&amp;&amp; apk add --no-cache openjdk8-jre

RUN apk add --no-cache python3 \
&amp;&amp; python3 -m ensurepip \
&amp;&amp; pip3 install --upgrade pip setuptools wheel \
&amp;&amp; rm -r /usr/lib/python*/ensurepip &amp;&amp; \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi &amp;&amp; \
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi 

WORKDIR /opt/bin

RUN pip install Flask &#39;gunicorn&gt;=20.0.1,&lt;21&#39; sqlalchemy pg8000 logger

COPY &lt;some jar files&gt;.jar /opt/bin/
COPY *.py /opt/bin/
RUN rm -r /root/.cache

CMD exec gunicorn --bind :$PORT --workers 2 --threads 8 --worker-tmp-dir /dev/shm --timeout 30 http_test 

when I run the docker image on cloudrun, i get the following error when I send a GET request to the URL given by Cloudrun:

020-05-04 13:22:14.551 ISTContainer Sandbox: Unsupported syscall membarrier(0x10,0x0,0x0,0x8,0x3e57651d89a0,0x3e57651d8a30). It is very likely that you can safely ignore this message and that this is not the cause of any error you might be troubleshooting. Please, refer to https://gvisor.dev/c/linux/amd64/membarrier for more information.
2020-05-04 13:22:14.603 ISTOpenJDK 64-Bit Server VM warning: Can&#39;t detect primordial thread stack location - find_vma failed

Have tried different alpine images, switched to gunicorn20.0.1 to avoid libc issues, no avail. Any suggestions, help would be much appreciated.

答案1

得分: 0

在 Cloud Run 部署 Docker 镜像时,将执行环境更改为第二代。

第二代预览
文件系统访问,完全兼容 Linux,性能更快。

曾遇到相同问题,已解决,希望对你有帮助。

英文:

while deploying the docker image in cloud run change the Execution environment to the second generation

Second generation PREVIEW
File system access, full Linux compatibility, faster performance.

had the same issue and I have fixed it, Hope it helps.

huangapple
  • 本文由 发表于 2020年5月4日 16:08:44
  • 转载请务必保留本文链接:https://java.coder-hub.com/61587715.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定