thanos-io / kube-thanos

Kubernetes specific configuration for deploying Thanos.
Apache License 2.0
520 stars 177 forks source link

what can i replace here "dnssrv+_client._tcp.<MEMCACHED_SERVICE>.thanos.svc.cluster.local" #267

Open hareeshrao4839 opened 2 years ago

hareeshrao4839 commented 2 years ago

i had to tryed thano-store, thano-store-0, thano-store-1, thano-store-2 but pod not started. could you advise

level=info ts=2022-03-24T07:39:58.779840562Z caller=caching_bucket_factory.go:71 msg="loading caching bucket configuration"
level=error ts=2022-03-24T07:39:58.781341992Z caller=resolver.go:99 msg="failed to lookup SRV records" host=_client._tcp.thanos-store.thanos.svc.cluster.local err="no such host"
level=error ts=2022-03-24T07:39:58.781506043Z caller=main.go:132 err="no server address resolved for \nfailed to create memcached client\ngithub.com/thanos-io/thanos/pkg/store/cache.NewCachingBucketFromYaml\n\t/home/circleci/project/pkg/store/cache/caching_bucket_factory.go:92\nmain.runStore\n\t/home/circleci/project/cmd/thanos/store.go:260\nmain.registerStore.func1\n\t/home/circleci/project/cmd/thanos/store.go:195\nmain.main\n\t/home/circleci/project/cmd/thanos/main.go:130\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371\ncreate caching bucket\nmain.runStore\n\t/home/circleci/project/cmd/thanos/store.go:262\nmain.registerStore.func1\n\t/home/circleci/project/cmd/thanos/store.go:195\nmain.main\n\t/home/circleci/project/cmd/thanos/main.go:130\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371\npreparing store command failed\nmain.main\n\t/home/circleci/project/cmd/thanos/main.go:132\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371"
metalmatze commented 2 years ago
no server address resolved for
failed to create memcached client

This is most likely an issue with configured address. Did you start pods running memcached? Do you have Kubernetes Service for these that you can point this address to? This is mostly a Kubernetes usage question more than a Thanos usage one.

hareeshrao4839 commented 2 years ago

yes, thano-store, thano-store-0, thano-store-1, thano-store-2 these are all running as statefulset and its has svc also created. i just replaced MEMCHACHED_SERVICE block to svc name, then only initial mentioned came

level=info ts=2022-03-24T07:39:58.779840562Z caller=caching_bucket_factory.go:71 msg="loading caching bucket configuration"
level=error ts=2022-03-24T07:39:58.781341992Z caller=resolver.go:99 msg="failed to lookup SRV records" host=_client._tcp.thanos-store.thanos.svc.cluster.local err="no such host"
level=error ts=2022-03-24T07:39:58.781506043Z caller=main.go:132 err="no server address resolved for \nfailed to create memcached client\ngithub.com/thanos-io/thanos/pkg/store/cache.NewCachingBucketFromYaml\n\t/home/circleci/project/pkg/store/cache/caching_bucket_factory.go:92\nmain.runStore\n\t/home/circleci/project/cmd/thanos/store.go:260\nmain.registerStore.func1\n\t/home/circleci/project/cmd/thanos/store.go:195\nmain.main\n\t/home/circleci/project/cmd/thanos/main.go:130\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371\ncreate caching bucket\nmain.runStore\n\t/home/circleci/project/cmd/thanos/store.go:262\nmain.registerStore.func1\n\t/home/circleci/project/cmd/thanos/store.go:195\nmain.main\n\t/home/circleci/project/cmd/thanos/main.go:130\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371\npreparing store command failed\nmain.main\n\t/home/circleci/project/cmd/thanos/main.go:132\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371"
metalmatze commented 2 years ago

Can you somehow exec into the container and check if thanos-store.thanos.svc.cluster.local is available from there? I think this is a configuration problem not a problem with thanos or kube-thanos.

squat commented 12 months ago

Hi @hareeshrao4839 I think the issue here is that the manifests under examples/manifests/all assume that a memcached server is running. This is maybe kind of a weird default inside of kube-thanos because it means that you can't deploy those manifests without deploying an additional, external component.

kevinniu666 commented 6 months ago

Hi @hareeshrao4839 as squat mentioned above, you need to create memcached service manually,please refer to below yaml for reference:

apiVersion: v1
kind: Service
metadata:
  name: memcached-service
spec:
  selector:
    app: memcached
  ports:
    - protocol: TCP
      port: 11211
      targetPort: 11211
      name: client
  type: ClusterIP

suppose memcached service is running in thanos namespace.the config arg should be confiured as below:

            "addresses":
            - "dnssrv+_client._tcp.memcached-service.thanos.svc.cluster.local"