Getting random "User not found in file /etc/passwd" error on Cloud Run Job

Hi! 

I'm getting the follow random error, in less than 5% of my job executions, with the same container image:

 

Application failed to start: resolveUserIdentity("1001"): User not found in file /etc/passwd

 

sidnei_becker_0-1718979421317.png

My dockerfile:

 

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7

RUN microdnf install freetype fontconfig \
    && microdnf clean all
WORKDIR /work/
RUN chown 1001 /work \
    && chmod "g+rwX" /work \
    && chown 1001:root /work
COPY --chown=1001:root target/*.properties target/*.so /work/
COPY --chown=1001:root target/*-runner /work/application


EXPOSE 8080
USER 1001

CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]

 

Any ideas?

Solved Solved
0 2 1,049
1 ACCEPTED SOLUTION

Hello , 

Welcome to Google Cloud Community!

I can see that you raised the similar question on stackoverflow and you have managed yourself to resolve the issue.For better visibility on this forum answering it here as well.. 

As you mentioned correctly as per this troubleshooting document you have to specify the user as “USER 0” instead of “USER 1001”.

 

View solution in original post

2 REPLIES 2

Hello , 

Welcome to Google Cloud Community!

I can see that you raised the similar question on stackoverflow and you have managed yourself to resolve the issue.For better visibility on this forum answering it here as well.. 

As you mentioned correctly as per this troubleshooting document you have to specify the user as “USER 0” instead of “USER 1001”.

 

Yes! I forgot to update this thread. Thanks!