XtraDB Cluster with etcd 3.5.x and Docker issues

Hi All,

I’m trying to setup a XtraDB 8.0 cluster which does it;s own discovery using etcd.

When I boot my first node I run into this error:

jq: error (at <stdin>:1): Cannot index number with string "node"
parse error: Invalid numeric literal at line 1, column 9
+ i=

Where I also run into a v2 API issue I think which should be v3

+ curl -XPOST -d value= -d ttl=60
  % 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    42  100    19  100    23   4750   5750 --:--:-- --:--:-- --:--:-- 14000
404 page not found
++ jq -r '.node.nodes[].value'
++ curl

How to solve these issues as there doesn’t see to be that much activity on the Docker side as the ETCD implementation as well.

The v2 API of etcd is really behind so I think we need to upgrade anyhow.

I hope someone has tackled this.

1 Like

Hello @Yamakasi,
Where did you find this implementation? I’d like to give this a try.

1 Like

Hi @matthewb

That is a nice offer! I actually found a several, the discovery with XtraDB doesn’t differ (much) from this older example: Deploy a Homogeneous Galera Cluster with etcd | Severalnines

For etcd I’m using this type of way: Run etcd clusters inside containers | etcd

Maybe we need to fiddle around a little bit, I’m trying a lot but run everytime into this error.

I hope you can find something useful!


1 Like

To me, it clearly looks like an etcd error. It flat out says “404 page not found” when trying to POST (ie: add) the new server to etcd. I’d make sure your etcd is properly configured. Check the container ports and etcd logs. Maybe something in this blog can help: Running Percona XtraDB Cluster in a multi-host Docker network - Percona Database Performance Blog

1 Like

I have checked that writeup as well, no clue.

Can you tell me maybe if there could be an problem with the V2 vs. V3 API of etcd ?

Indeed the 404 is a strange error, checking that out further as well but the docs is what I have followed and also tried lots of blogposts, etc.

1 Like

@matthewb I’m pretty sure we have a v2 / v3 issue as XtraDB tries to post against a v2 url. Manually on the commandline making it a v3 one doesn’t give any errors but I can’t verify if it works further.

I need to checkout if I can still enable v2 on the 3.5.x versions, I doubt it. Maybe XtraDB needs an update on the API call.

1 Like

@Yamakasi, this integration is not actually part of XtraDB cluster itself. The integration between etcd and PXC is accomplished using some helper scripts. So yes, these scripts probably need an update. You can follow the instructions on the PXC docker to use this without etcd in order to get your system up and running. I highly recommend that you create a https://jira.percona.com/ issue for our dev team on this matter.

1 Like

@matthewb thanks! Yes manually is a way which I already do for years, I wanted ETCD now as I became “lazy”. I rebuild the image with v3, it still hangs but without an error so far.

I will write something for Jira, let’s hope they can make something work :slight_smile:

I also wonder if I can move to ETCD in running cluster I doubt it actually

1 Like