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

Update to promtail 1.4.1 fail #1921

Closed
jmvizcainoio opened this issue Apr 9, 2020 · 8 comments · Fixed by #1935
Closed

Update to promtail 1.4.1 fail #1921

jmvizcainoio opened this issue Apr 9, 2020 · 8 comments · Fixed by #1935

Comments

@jmvizcainoio
Copy link
Contributor

Describe the bug

When i try to upgrade using loki-stack helm chart to the latest version , promtail doesn't start. The pod will be stay in CrashLoopBackOff state.

To Reproduce
Steps to reproduce the behavior:

  1. Started Loki (1.4.1)
  2. Started Promtail (1.4.1) to tail '...'

Expected behavior
Upgrate promtail to latest version 1.4.1

Environment:

  • Infrastructure: [Kubertetes 1.16.7 deployed using kops in aws ]
  • Deployment tool: [e.g., helm 3.0.1]
  • loki-stack chart 0.34.2
  • promtail version 1.4.1

Screenshots, Promtail config, or terminal output

when i get the logs of the pod that is crashing

level=debug ts=2020-04-09T07:14:39.497565402Z caller=manager.go:42 msg="detected pipe from stdin"
level=warn ts=2020-04-09T07:14:39.497613744Z caller=stdin_target_manager.go:90 msg="too many scrape configs, skipping 5 configs."
level=info ts=2020-04-09T07:14:39.498103397Z caller=server.go:147 http=[::]:3101 grpc=[::]:9095 msg="server listening on addresses"
level=info ts=2020-04-09T07:14:39.498416273Z caller=main.go:67 msg="Starting Promtail" version="(version=1.4.1, branch=HEAD, revision=2445ccd2)"

If i change the docker image to 1.4.0 works fine.

I tested in a docker cluster in my laptop using k8s 1.5.5 and works fine.

@cyriltovena
Copy link
Contributor

So it works fine with 1.15 kubernetes but it seems to think there is a pipe when running in kubernetes 1.16.7. hum.

@cyriltovena
Copy link
Contributor

Any chance you're running the container with stdi: true or tty:true ?

@jmvizcainoio
Copy link
Contributor Author

@cyriltovena Thanks by the response,

I'm not sure about that, i'm using the default config in the helm chart.

just helm upgrade --install loki-stack loki/loki-stack

Thanks

Juanma

@slim-bean
Copy link
Collaborator

We had another instance of the same behavior by someone in public slack, different setup, was actually maing their own image, however the output is the same.

I'm thinking that we should remove the code to try to detect if someone is piping to promtail, checking if stdin is a character device isn't proving to be reliable enough and troubleshooting why it's going wrong is extremely difficult.

I think i'm going to suggest we remove the auto detect code and instead add --stdin as a flag if someone would like promtail to read from stdin.

@cyriltovena WDYT?

@cyriltovena
Copy link
Contributor

cyriltovena commented Apr 12, 2020 via email

cyriltovena added a commit to cyriltovena/loki that referenced this issue Apr 13, 2020
This seems to causes issue on some environment so let's use a flag instead.

Fixes grafana#1921

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
owen-d pushed a commit that referenced this issue Apr 15, 2020
This seems to causes issue on some environment so let's use a flag instead.

Fixes #1921

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@avg07
Copy link

avg07 commented Apr 15, 2020

I have same issue.

helm upgrade --install loki-stack loki/loki-stack

level=warn ts=2020-04-15T17:36:08.883877563Z caller=stdin_target_manager.go:90 msg="too many scrape configs, skipping 4 configs." level=info ts=2020-04-15T17:36:08.884794311Z caller=server.go:147 http=[::]:3101 grpc=[::]:9095 msg="server listening on addresses" level=info ts=2020-04-15T17:36:08.885237532Z caller=main.go:67 msg="Starting Promtail" version="(version=1.4.1, branch=HEAD, revision=2445ccd2)"

kubernetes v1.16.2

@jwoconnell
Copy link

Same CrashloopBackoff behavior here with promtail 1.4.1 and kubernetes 1.14.3. promtail 1.4.0 worked.

$ helm upgrade --install loki loki/loki-stack

@avg07
Copy link

avg07 commented Jun 3, 2020

Fixed in:
CHART: loki-stack-0.37.3
APP VERSION: v1.5.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

Successfully merging a pull request may close this issue.

5 participants