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

Metrics server suddenly stoped getting metrics from rabbitmq #2476

Closed
alexbanditos opened this issue Jan 12, 2022 · 7 comments
Closed

Metrics server suddenly stoped getting metrics from rabbitmq #2476

alexbanditos opened this issue Jan 12, 2022 · 7 comments
Labels
bug Something isn't working stale All issues that are marked as stale due to inactivity

Comments

@alexbanditos
Copy link

alexbanditos commented Jan 12, 2022

Report

Without known reason keda metrics server started getting errors for all auth triggers -

E0111 20:51:14.833101 1 scale_resolvers.go:164] keda_metrics_adapter/scalehandler "msg"="Error getting triggerAuth" "error"="context canceled" "name"="service-hpa-rmq" "namespace"="default" "type"="ScaledObject" "triggerAuthRef.Name"="prod-something-rmq"
E0111 20:51:14.845428 1 provider.go:124] keda_metrics_adapter/provider "msg"="error getting metric for scaler" "error"="error parsing rabbitmq metadata: no host setting given" "scaledObject.Name"="service-rmq" "scaledObject.Namespace"="default" "scaler"={}

we are using TriggerAuthentication with vault , no issues with vault cluster
the trigger and the scaledobject are in the same ns

trigger:

apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: prod-something-rmq
spec:
hashiCorpVault:
address: https://vault.cluster.com
authentication: kubernetes
role: keda-operator
mount: 'kubernetes/prod-cluster/'
credential:
serviceAccount: '/var/run/secrets/kubernetes.io/serviceaccount/token'
secrets:
- parameter: host
key: host
path: "secrets/data/infra/keda/prod-something-rmq"

Only after I delete the metrics server pod and it recreated scaling started working.

Expected Behavior

Metrics server able to monitor rabbitmq queues

Actual Behavior

keda in not scaling hpa based on rmq

Steps to Reproduce the Problem

  1. create TriggerAuthentication with vault auth (external vault)
  2. create scaledobject based on rabbit queue
  3. wait for metrics server send errors.

Logs from KEDA operator

error Exception (504) Reason: "channel/connection is not open"
level error
logger rabbitmq_scaler
stacktrace github.com/kedacore/keda/v2/pkg/scaling/cache.(*ScalersCache).IsScaledObjectActive /workspace/pkg/scaling/cache/scalers_cache.go:89 github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).checkScalers /workspace/pkg/scaling/scale_handler.go:261 github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).startScaleLoop /workspace/pkg/scaling/scale_handler.go:146
ts 1641934785.0178342
}

KEDA Version

2.5.0

Kubernetes Version

1.18

Platform

Amazon Web Services

Scaler Details

rabbitmq

Anything else?

No response

@alexbanditos alexbanditos added the bug Something isn't working label Jan 12, 2022
@JorTurFer
Copy link
Member

Hi @alexbanditos
Could you share more logs please?

@alexbanditos
Copy link
Author

alexbanditos commented Jan 12, 2022

@JorTurFer
from metrics server:

  • HH:mm:ss.SSSSSS 1 provider.go:124] keda_metrics_adapter/provider "msg"="error getting metric for scaler" "error"="error parsing rabbitmq metadata: no host setting given" "scaledObject.Name"="*" "scaledObject.Namespace"="default" "scaler"={}
    1 status.go:71] apiserver received an error that is not an metav1.Status: &errors.errorString{s:"No matching metrics found for *"}: No matching metrics found for *
  • HH:mm:ss.SSSSSS 1 scale_resolvers.go:164] keda_metrics_adapter/scalehandler "msg"="Error getting triggerAuth" "error"="context canceled" "name"="*" "namespace"="default" "type"="ScaledObject" "triggerAuthRef.Name"="prod-something-rmq"

from keda operator:

{

error | Exception (504) Reason: "channel/connection is not open"
level | error
logger | rabbitmq_scaler
stacktrace | github.com/kedacore/keda/v2/pkg/scaling/cache.(*ScalersCache).IsScaledObjectActive /workspace/pkg/scaling/cache/scalers_cache.go:89 github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).checkScalers /workspace/pkg/scaling/scale_handler.go:261 github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).startScaleLoop /workspace/pkg/scaling/scale_handler.go:146
ts | 1641934785.0183375
}

{

This is the only errors I got

@JorTurFer
Copy link
Member

I think that there are missing logs :(
Could you collect more logs during the next time that this happens, please? Another thing, please paste them as a code because now they are super difficult for reading

@zroubalik
Copy link
Member

Might be related to this: #2415

@JorTurFer
Copy link
Member

The metrics server logs show one error, I think that not because #2415 is related with the operator

@stale
Copy link

stale bot commented Mar 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Mar 13, 2022
@stale
Copy link

stale bot commented Mar 20, 2022

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale All issues that are marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

3 participants