Couchbase重新平衡不匹配

Couchbase重新平衡不匹配,couchbase,Couchbase,在使用cuchbase Rest API配置集群之后,当我想要添加新节点,然后重新平衡时,我遇到了一个问题 这就是我要做的 为计算机A创建帐户和群集 createAccount(){ ip=$1 curl -s -u ${USER}:${PASSWORD} -X POST http://${ip}:8091/pools/default -d memoryQuota=${QUOTA} } createCluster(){ ip=$1 # Initialize No

在使用cuchbase Rest API配置集群之后,当我想要添加新节点,然后重新平衡时,我遇到了一个问题

这就是我要做的

为计算机A创建帐户和群集

createAccount(){
    ip=$1
    curl -s -u ${USER}:${PASSWORD} -X POST http://${ip}:8091/pools/default -d memoryQuota=${QUOTA} }

createCluster(){
    ip=$1
    # Initialize Node
    curl  -u ${USER}:${PASSWORD} -v -X POST http://${ip}:8091/nodes/self/controller/settings \
      -d 'data_path=%2Fopt%2Fcouchbase%2Fvar%2Flib%2Fcouchbase%2Fdata& \
      index_path=%2Fopt%2Fcouchbase%2Fvar%2Flib%2Fcouchbase%2Fdata'

    # Rename Node
    curl  -u ${USER}:${PASSWORD} -v -X POST http://${ip}:8091/node/controller/rename \
      -d 'hostname=127.0.0.1'

    # Setup Services
    curl  -u ${USER}:${PASSWORD} -v -X POST http://${ip}:8091/node/controller/setupServices \
      -d 'services=kv%2Cn1ql%2Cindex'

    # Setup Administrator username and password
    curl  -u ${USER}:${PASSWORD} -v -X POST http://${ip}:8091/settings/web \
      -d "password=$PASSWORD&username=$USER&port=SAME"

}
为机器B创建帐户和群集(与上面的脚本相同)

然后添加调用服务器A的服务器B

addServer(){
    curl -u ${USER}:${PASSWORD} http://A:8091/controller/addNode \
          -d "hostname=B&user=$USER&password=$PASSWORD&services=kv%2Cn1ql%2Cindex"

}
然后,我可以看到在A和B服务器中,我如何将B作为待重新平衡的对象。 但当我试图重新平衡呼叫

rebalance(){
    masterIp=$1
    couchbaseNode=$2
    curl -v  -u ${USER}:${PASSWORD} -X POST http://A:8091/controller/rebalance \
    -d "knownNodes=ns_1@A, ns_1@B"
 }
服务器返回

  {"mismatch":1}
我做错了什么

问候

编辑:

这是提供额外信息的HTTP堆栈

第一台机器

----- CREATING COUCHBASE CLUSTER ON 172.31.35.67
*   Trying 172.31.35.67...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 172.31.35.67 (172.31.35.67) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> POST /nodes/self/controller/settings HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwb2xpdHJvbg==
> User-Agent: curl/7.40.0
> Host: 172.31.35.67:8091
> Accept: */*
> Content-Length: 129
> Content-Type: application/x-www-form-urlencoded
> 
} [129 bytes data]
* upload completely sent off: 129 out of 129 bytes

100   129    0     0  100   129      0    107  0:00:01  0:00:01 --:--:--   107< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Tue, 27 Sep 2016 09:27:59 GMT
< Content-Length: 0
< Cache-Control: no-cache
< 

100   129    0     0  100   129      0     79  0:00:01  0:00:01 --:--:--    80
* Connection #0 to host 172.31.35.67 left intact
*   Trying 172.31.35.67...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 172.31.35.67 (172.31.35.67) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> POST /node/controller/rename HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwb2xpdHJvbg==
> User-Agent: curl/7.40.0
> Host: 172.31.35.67:8091
> Accept: */*
> Content-Length: 18
> Content-Type: application/x-www-form-urlencoded
> 
} [18 bytes data]
* upload completely sent off: 18 out of 18 bytes
< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Tue, 27 Sep 2016 09:27:59 GMT
< Content-Length: 0
< Cache-Control: no-cache
< 

100    18    0     0  100    18      0   5253 --:--:-- --:--:-- --:--:--  6000
* Connection #0 to host 172.31.35.67 left intact
*   Trying 172.31.35.67...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 172.31.35.67 (172.31.35.67) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> POST /node/controller/setupServices HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwb2xpdHJvbg==
> User-Agent: curl/7.40.0
> Host: 172.31.35.67:8091
> Accept: */*
> Content-Length: 26
> Content-Type: application/x-www-form-urlencoded
> 
} [26 bytes data]
* upload completely sent off: 26 out of 26 bytes
< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Tue, 27 Sep 2016 09:27:59 GMT
< Content-Length: 0
< Cache-Control: no-cache
< 

100    26    0     0  100    26      0   3992 --:--:-- --:--:-- --:--:--  4333
* Connection #0 to host 172.31.35.67 left intact
*   Trying 172.31.35.67...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 172.31.35.67 (172.31.35.67) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> POST /settings/web HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwb2xpdHJvbg==
> User-Agent: curl/7.40.0
> Host: 172.31.35.67:8091
> Accept: */*
> Content-Length: 50
> Content-Type: application/x-www-form-urlencoded
> 
} [50 bytes data]
* upload completely sent off: 50 out of 50 bytes
< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Tue, 27 Sep 2016 09:27:59 GMT
< Content-Type: application/json
< Content-Length: 42
< Cache-Control: no-cache
< 
{ [42 bytes data]
----在172.31.35.67上创建COUCHBASE集群
*正在尝试172.31.35.67。。。
%总接收百分比%x平均速度时间电流
数据加载上载总左速度
0 0 0 0 0 0 0--:-:-:-:---:-:---0*已连接到172.31.35.67(172.31.35.67)端口8091(#0)
*与用户“管理员”一起使用Basic进行服务器身份验证
>POST/nodes/self/controller/settings HTTP/1.1
>授权:基本QWRTAW5PC3RYXRVCJWPB2XPDHJVBG==
>用户代理:curl/7.40.0
>主持人:172.31.35.67:8091
>接受:*/*
>内容长度:129
>内容类型:application/x-www-form-urlencoded
> 
}[129字节数据]
*上传已完全发送:129字节中的129字节
100 129 0 0 100 129 0 107 0:00:01 0:00:01--:::--107POST/node/controller/rename HTTP/1.1
>授权:基本QWRTAW5PC3RYXRVCJWPB2XPDHJVBG==
>用户代理:curl/7.40.0
>主持人:172.31.35.67:8091
>接受:*/*
>内容长度:18
>内容类型:application/x-www-form-urlencoded
> 
}[18字节数据]
*上传已完全发送:18个字节中的18个
POST/node/controller/setupServices HTTP/1.1
>授权:基本QWRTAW5PC3RYXRVCJWPB2XPDHJVBG==
>用户代理:curl/7.40.0
>主持人:172.31.35.67:8091
>接受:*/*
>内容长度:26
>内容类型:application/x-www-form-urlencoded
> 
}[26字节数据]
*上传已完全发送:26个字节中的26个
POST/settings/web HTTP/1.1
>授权:基本QWRTAW5PC3RYXRVCJWPB2XPDHJVBG==
>用户代理:curl/7.40.0
>主持人:172.31.35.67:8091
>接受:*/*
>内容长度:50
>内容类型:application/x-www-form-urlencoded
> 
}[50字节数据]
*上传已完全发送:50个字节中有50个
第二台机器

   Trying 172.31.134.213...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 172.31.134.213 (172.31.134.213) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> POST /nodes/self/controller/settings HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwb2xpdHJvbg==
> User-Agent: curl/7.40.0
> Host: 172.31.134.213:8091
> Accept: */*
> Content-Length: 129
> Content-Type: application/x-www-form-urlencoded
> 
} [129 bytes data]
* upload completely sent off: 129 out of 129 bytes
100   129    0     0  100   129      0    107  0:00:01  0:00:01 --:--:--   107< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Tue, 27 Sep 2016 09:34:03 GMT
< Content-Length: 0
< Cache-Control: no-cache
< 

100   129    0     0  100   129      0     81  0:00:01  0:00:01 --:--:--    81
* Connection #0 to host 172.31.134.213 left intact
*   Trying 172.31.134.213...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 172.31.134.213 (172.31.134.213) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> POST /node/controller/rename HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwb2xpdHJvbg==
> User-Agent: curl/7.40.0
> Host: 172.31.134.213:8091
> Accept: */*
> Content-Length: 18
> Content-Type: application/x-www-form-urlencoded
> 
} [18 bytes data]
* upload completely sent off: 18 out of 18 bytes
< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Tue, 27 Sep 2016 09:34:03 GMT
< Content-Length: 0
< Cache-Control: no-cache
< 

100    18    0     0  100    18      0   1976 --:--:-- --:--:-- --:--:--  2000
* Connection #0 to host 172.31.134.213 left intact
*   Trying 172.31.134.213...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 172.31.134.213 (172.31.134.213) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> POST /node/controller/setupServices HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwb2xpdHJvbg==
> User-Agent: curl/7.40.0
> Host: 172.31.134.213:8091
> Accept: */*
> Content-Length: 26
> Content-Type: application/x-www-form-urlencoded
> 
} [26 bytes data]
* upload completely sent off: 26 out of 26 bytes
< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Tue, 27 Sep 2016 09:34:03 GMT
< Content-Length: 0
< Cache-Control: no-cache
< 

100    26    0     0  100    26      0   9626 --:--:-- --:--:-- --:--:-- 13000
* Connection #0 to host 172.31.134.213 left intact
*   Trying 172.31.134.213...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 172.31.134.213 (172.31.134.213) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> POST /settings/web HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwb2xpdHJvbg==
> User-Agent: curl/7.40.0
> Host: 172.31.134.213:8091
> Accept: */*
> Content-Length: 50
> Content-Type: application/x-www-form-urlencoded
> 
} [50 bytes data]
* upload completely sent off: 50 out of 50 bytes
< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Tue, 27 Sep 2016 09:34:03 GMT
< Content-Type: application/json
< Content-Length: 44
< Cache-Control: no-cache
< 
{ [44 bytes data]

100    94  100    44  100    50  15422  17525 --:--:-- --:--:-- --:--:-- 25000
* Connection #0 to host 172.31.134.213 left intact
{"newBaseUri":"http://172.31.134.213:8091/"}----- ADD NODE 172.31.134.213 IN COUCHBASE CLUSTER 172.31.35.67
masterID:172.31.35.67
node:172.31.134.213
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    87    0     0  100    87      0  55769 --:--:-- --:--:-- --:--:-- 43500
 32   268    0     0  100    87      0     81  0:00:01  0:00:01 --:--:--    81
100   268  100   181  100    87    169     81  0:00:01  0:00:01 --:--:--   169
["Join completion call failed. Got HTTP status 500 from REST call post to http://172.31.134.213:8091/completeJoin. Body was: \"[\\\"Unexpected server error, request logged.\\\"]\""]----- REBALANCING NODE 172.31.134.213 IN COUCHBASE CLUSTER 172.31.35.67
*   Trying 172.31.35.67...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 172.31.35.67 (172.31.35.67) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> POST /controller/rebalance HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwb2xpdHJvbg==
> User-Agent: curl/7.40.0
> Host: 172.31.35.67:8091
> Accept: */*
> Content-Length: 30
> Content-Type: application/x-www-form-urlencoded
> 
} [30 bytes data]
* upload completely sent off: 30 out of 30 bytes
< HTTP/1.1 400 Bad Request
< Server: Couchbase Server
< Pragma: no-cache
< Date: Tue, 27 Sep 2016 09:34:04 GMT
< Content-Type: application/json
< Content-Length: 14
< Cache-Control: no-cache
< 
{ [14 bytes data]

100    44  100    14  100    30  11965  25641 --:--:-- --:--:-- --:--:-- 30000
* Connection #0 to host 172.31.35.67 left intact
{"mismatch":1}
正在尝试172.31.134.213。。。
%总接收百分比%x平均速度时间电流
数据加载上载总左速度
0 0 0 0 0 0 0--:-:-:-:---:-:---0*已连接到172.31.134.213(172.31.134.213)端口8091(#0)
*与用户“管理员”一起使用Basic进行服务器身份验证
>POST/nodes/self/controller/settings HTTP/1.1
>授权:基本QWRTAW5PC3RYXRVCJWPB2XPDHJVBG==
>用户代理:curl/7.40.0
>主持人:172.31.134.213:8091
>接受:*/*
>内容长度:129
>内容类型:application/x-www-form-urlencoded
> 
}[129字节数据]
*上传已完全发送:129字节中的129字节
100 129 0 0 100 129 0 107 0:00:01 0:00:01--:::--107