0
votes

I was trying to setup a 3-node influxdb cluster using influxDB 0.9.4 but failed.

I was following the instructions as stated at https://influxdb.com/docs/v0.9/guides/clustering.html

To setup the cluster, I have done the followings:

  • Given three nodes A,B and C with ip 10.10.1.88, 10.10.1.105 and 10.10.1.106 respectively

  • I have modified the file /etc/opt/influxdb/influxdb.conf of node A, B and C so that the hostname are now

    10.10.1.88, 
    10.10.1.105 and 
    10.10.1.106 respectively.
    
  • I have also modified the file /etc/init.d/influxdb of node A, B and C so that the parameter INFLUXD_OPTS are now

    "", 
    "-join 10.10.1.88:8088" and 
    "-join 10.10.1.88:8088,10.10.1.105:8088" respectively
    
  • I have stopped the influxdb service of node A, B and C respectively and

  • started the influxdb service of node A, B and C respectively

However, in the web interface (10.10.1.88:8083), the query "show servers" only return the node itself. That is

    id  cluster_addr    raft
    1   "10.10.1.88:8088"   true

which implies that the raft cluster is not healthy at all

Is there any step I missed?

p.s. Node A, B and C are running Ubuntu 14.04.3 LTS.

--------------------------- Add ------------------- Use show servers command only show the server own ip. If I try to create database of random one of the server, the other server will sync and the database with same name appear too. If i try to add measurement and data, the others server can not sync unlike database.

2
What is your InfluxDB version? Please note that clustering is not a production-ready feature of InfluxDB yet. - Emil Vikström
It is not possible to answer the question without knowing what precise version of InfluxDB you are running. - beckettsean
@EmilVikström I am using ver 0.9.4 of influxDB - Jeff Lee
@beckettsean The version number is now updated. Thanks. - Jeff Lee

2 Answers

1
votes

Delete the meta/peers.json file from each server and try again. The contents of that file override any command line settings regarding the cluster.

0
votes

The issue may be related to the presence of some files in "meta" folder. This cause the node to keep the old configuration instead of update to the cluster configuration.

For each node, try to:

  • stop influxdb
  • configure the node, as the guide explains
  • remove all the content of meta folder
  • start influxdb

Hope this helps!