Open leo198706 opened 4 months ago
update: I use the latest golang image and it runs fine in the test environment
FROM golang:1.23.1-bullseye as plugin-builder
ENV LOKI_VERSION=3.2.0
ENV GIT_HASH=b4f7181
ARG LOKI_TARBALL=https://github.com/grafana/loki/archive/v$LOKI_VERSION.tar.gz
ENV LOKI_SOURCE $LOKI_TARBALL
RUN curl -L -o "loki.tar.gz" ${LOKI_SOURCE} \
&& mkdir -p /src/loki \
&& tar zxfv loki.tar.gz -C /src/loki --strip-components=1 \
&& cd /src/loki
WORKDIR /src/loki
RUN make BUILD_IN_CONTAINER=false GIT_REVISION=$GIT_HASH GIT_BRANCH=v$LOKI_VERSION IMAGE_TAG=$LOKI_VERSION fluent-bit-plugin
FROM fluent/fluent-bit:2.2.3
COPY --from=plugin-builder /src/loki/clients/cmd/fluent-bit/out_grafana_loki.so /fluent-bit/bin
COPY --from=plugin-builder /src/loki/clients/cmd/fluent-bit/fluent-bit.conf /fluent-bit/etc/fluent-bit.conf
EXPOSE 2020
CMD ["/fluent-bit/bin/fluent-bit", "-e","/fluent-bit/bin/out_grafana_loki.so", "-c", "/fluent-bit/etc/fluent-bit.conf"]
Describe the bug I use the out-grafana-loki collect log to loki. After running for a while, an error will appear, fluent-bit will restart. This error is not very stable because only half of the pods have errors in my online grayscale test.
error.log
Here is my conf:
Here is my plugin build dockerfile:
To Reproduce Use input plugin to collect logs to loki, running for serval hours.
Expected behavior fluent-bit runs normally, no error log
Environment: