rqlite: "clustering failure: error reading DNS configuration: invalid character '\'' " in kube stateufll set

What version are you running?

[rqlited] 2022/02/03 22:12:15 rqlited starting, version v7.2.0, commit 73681a69f692f2a75b9d1e570261ac3e4a73631e, branch master, compiler gc

What did you do?

I have applied the headless service and the statefull set

apiVersion: v1
kind: Service
metadata:
  name: rqlite-svc
spec:
  clusterIP: None 
  selector:
    app: rqlite
  ports:
    - protocol: TCP
      port: 4001
      targetPort: 4001
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: rqlite
spec:
  selector:
    matchLabels:
      app: rqlite # has to match .spec.template.metadata.labels
  serviceName: "rqlite"
  replicas: 3 # by default is 1
  template:
    metadata:
      labels:
        app: rqlite # has to match .spec.selector.matchLabels
    spec:
      terminationGracePeriodSeconds: 10
      containers:
      - name: rqlite
        image: rqlite/rqlite
        args: ["-disco-mode=dns","-disco-config='{\"name\":\"rqlite-svc\"}'","-bootstrap-expect 3"]
        ports:
        - containerPort: 4001
          name: rqlite
        volumeMounts:
        - name: rqlite-file
          mountPath: /rqlite/file
  volumeClaimTemplates:
  - metadata:
      name: rqlite-file
    spec:
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: "standard"
      resources:
        requests:
          storage: 1Gi

I get this error in the pod log after CrashLoopBackOff

kubectl logs rqlite-0

            _ _ _
           | (_) |
  _ __ __ _| |_| |_ ___
 | '__/ _  | | | __/ _ \   The lightweight, distributed
 | | | (_| | | | ||  __/   relational database.
 |_|  \__, |_|_|\__\___|
         | |               www.rqlite.io
         |_|

[rqlited] 2022/02/03 22:12:15 rqlited starting, version v7.2.0, commit 73681a69f692f2a75b9d1e570261ac3e4a73631e, branch master, compiler gc
[rqlited] 2022/02/03 22:12:15 go1.17, target architecture is amd64, operating system target is linux
[rqlited] 2022/02/03 22:12:15 launch command: /bin/rqlited -http-addr 0.0.0.0:4001 -raft-addr 0.0.0.0:4002 -http-adv-addr 10.244.1.3:4001 -raft-adv-addr 10.244.1.3:4002 -disco-mode=dns -disco-config='{"name":"rqlite-svc"}' -bootstrap-expect 3 /rqlite/file/data
[rqlited] 2022/02/03 22:12:15 Raft TCP mux Listener registered with 1
[rqlited] 2022/02/03 22:12:15 preexisting node state detected in /rqlite/file/data
[store] 2022/02/03 22:12:15 opening store with node ID 10.244.1.3:4002
[store] 2022/02/03 22:12:15 configured for an in-memory database
[store] 2022/02/03 22:12:15 ensuring directory for Raft exists at /rqlite/file/data
[mux] 2022/02/03 22:12:15 mux serving on [::]:4002, advertising 10.244.1.3:4002
[store] 2022/02/03 22:12:15 0 preexisting snapshots present
[store] 2022/02/03 22:12:15 first log index: 0, last log index: 0, last command log index: 0:
[store] 2022/02/03 22:12:15 created in-memory database at open
2022-02-03T22:12:15.338Z [INFO]  raft: initial configuration: index=0 servers=[]
[cluster] 2022/02/03 22:12:15 service listening on 10.244.1.3:4002
[rqlited] 2022/02/03 22:12:15 Cluster TCP mux Listener registered with 2
[http] 2022/02/03 22:12:15 service listening on [::]:4001
[rqlited] 2022/02/03 22:12:15 discovery mode: dns
2022-02-03T22:12:15.338Z [INFO]  raft: entering follower state: follower="Node at 10.244.1.3:4002 [Follower]" leader=
[rqlited] 2022/02/03 22:12:15 clustering failure: error reading DNS configuration: invalid character '\'' looking for beginning of value

What did you expect to happen?

The Pod should start

What happened instead?

The pod ends up in CrashLoopBackOff

Please include the Status, Nodes, and Expvar output from each node (or at least the Leader!)

See https://github.com/rqlite/rqlite/blob/master/DOC/DIAGNOSTICS.md

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 29 (21 by maintainers)

Most upvoted comments

OK, I will release 7.3.0. Thanks for your feedback on rqlite.

@git001 – it’s ready now, please test, I’m keen to know if this works as you expect. I believe your cluster will be able to restart even if all IP addresses change at the same time. The image you want is rqlite/rqlite:7.3.0-rc.