Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: unable to tail /var/log/nginx/access.log: tomb: still alive #191

Open
Enteee opened this issue Jun 11, 2023 · 3 comments
Open

Bug: unable to tail /var/log/nginx/access.log: tomb: still alive #191

Enteee opened this issue Jun 11, 2023 · 3 comments

Comments

@Enteee
Copy link

Enteee commented Jun 11, 2023

With version 0.7.0, when I try to tail nginx's /var/log/nginx/access.log to stdout using -stdout /var/log/nginx/access.log, instead of printing the access log, I get for each request a line:

 Warning: unable to tail /var/log/nginx/access.log: tomb: still alive

This repeats ~30 times until dockerize finally stops nginx and the container crashes.

Minimal reproducible example

  • Dockerfile
ARG debian_version=10.13
FROM debian:${debian_version} AS build

MAINTAINER Ente "ducksource@duckpond.ch"

# Build dockerize
ARG dockerize_version=0.7.0
RUN set -ex \
  && apt-get update \
  && DEBIAN_FRONTEND=noninteractive \
    apt-get install --no-install-recommends --no-install-suggests -y \
      wget ca-certificates \
      inotify-tools \
  && wget \
    "https://github.com/jwilder/dockerize/releases/download/v${dockerize_version}/dockerize-linux-amd64-v${dockerize_version}.tar.gz" \
  && tar -C "/usr/local/bin" -xzvf "dockerize-linux-amd64-v${dockerize_version}.tar.gz" \
  && rm "dockerize-linux-amd64-v${dockerize_version}.tar.gz"

FROM debian:${debian_version}

# Install dockerize
RUN set -ex \
  && apt-get update \
  && DEBIAN_FRONTEND=noninteractive \
    apt-get install --no-install-recommends --no-install-suggests -y \
      inotify-tools
COPY --from=build  /usr/local/bin/dockerize /usr/local/bin/dockerize
  1. Build container: docker build .
  2. Run dockerize in container
$ docker run -ti <image_id> bash

root@32e1af5fc110:/service# touch stdout
root@32e1af5fc110:/service# dockerize -stdout stdout
  1. Then in a new terminal:
$ docker exec -ti $(docker ps -q) bash
root@32e1af5fc110:/service# echo "AA" > stdout
  1. Check output of first terminal:
root@32e1af5fc110:/service# dockerize -stdout stdout 
2023/06/11 08:39:29 Warning: unable to tail stdout: tomb: still alive
Enteee added a commit to Enteee/duckpond.ch that referenced this issue Jun 11, 2023
@munir131
Copy link

I am getting that error on version 0.6.1 too

@Enteee
Copy link
Author

Enteee commented Jun 17, 2023

@munir131 are you sure? I can not reproduce this issue with version 0.6.1.
In my example I changed ARG dockerize_version=0.7.0 to ARG dockerize_version=0.6.1 and it worked just fine.

@munir131
Copy link

munir131 commented Jul 6, 2023

@Enteee My bad. We are not getting that issue on 0.6.1. It is only on 0.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants