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

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

Open
hareeshrao4839 opened this issue Mar 24, 2022 · 5 comments

Comments

@hareeshrao4839
Copy link

hareeshrao4839 commented Mar 24, 2022

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
Copy link
Contributor

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
Copy link
Author

hareeshrao4839 commented Mar 24, 2022

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
Copy link
Contributor

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
Copy link
Member

squat commented Sep 15, 2023

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
Copy link

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"

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

4 participants