Failed to deploy master aggregator and Error:1045

Hi I am trying to install memsql using this command on the ubuntu:
memsql-deploy cluster-in-a-box --license [YOUR LICENSE KEY]

Here is the output:
memsql-deploy will perform the following actions:
· Install memsql-server 6.7.8 locally
· Deploy a master aggregator on port 3306
· Deploy a leaf node on port 3307

Would you like to continue? [y/N]: y
✓ Downloaded memsql-server 6.7.8
Installing MemSQL locally…
✓ Installed MemSQL 6.7.8 locally
✘ Failed to deploy master aggregator
Starting rollback
✓ Rollback succeeded
error running memsqlctl: error running command: "/usr/bin/memsqlctl" "--json" "--yes" "create-node" "--port" "3306" "--secure-password" "fsNF79GWU3NjLIneBIYf+12BSofLhWmSj4E1Ew==" "--timeout" "60s": exit status 1
stderr: Latest errors from MemSQL tracelog:
133 2019-01-10 09:23:15.875 INFO: Log opened
: Failed to connect to MemSQL: Could not establish connection: Error 1045: Unknown error 1045

I saw the similar problem just now and update the memsql-toolbox to 1.0.6.And I installed memsql 6.7.8 successfully on the KVM Virtual Machine which is CentOS 7 on this ubuntu system last month.So I don’t konw why it can not connect to memsql.

Could you help me?Thanks

That’s very mysterious… What happens when you do these steps manually? (This is what memsql-deploy cluster-in-a-box is doing behind the scenes up until where you failed)

  1. Download memsql-server package. You are on ubuntu so try the commands (with sudo in front of each if applicable):

wget https://release.memsql.com/production/debian/pool/memsql-server_6.7.8_a5a87c0575_amd64.deb

dpkg -i memsql-server_6.7.8_a5a87c0575_amd64.deb

  1. Run memsqlctl create-node --port 3306 --password "" (type y when it prompts you)

Do you see the same error?

Thanks for your suggestion.But unfortunately the result is the same error.

Here is the output:
memsqlctl will perform the following actions:
· Create node on port 3306
- Base directory = /var/lib/memsql/100f238a-040b-4ac4-a74a-e823b5d70876
- Config file = /var/lib/memsql/100f238a-040b-4ac4-a74a-e823b5d70876/memsql.cnf

· Set up runtime environment

· Start node

· Update MemSQL root password
- Run SET PASSWORD FOR 'root'@'%' = PASSWORD(****)

Would you like to continue? [y/N]: y
✓ Created node with MemSQL ID CC5EACE5E5D7E7ECC55D0BA2373BFEB0BB17BD74
✓ Set up runtime environment
✘ Failed to start node with MemSQL ID CC5EACE5E5D7E7ECC55D0BA2373BFEB0BB17BD74
Latest errors from MemSQL tracelog:
160 2019-01-11 15:51:22.610 INFO: Log opened
: Failed to connect to MemSQL: Could not establish connection: Error 1045: Unknown error 1045

I remember that I tried to use command “memsqlctl create-node” to create two node successfully just last week.
And I used the command (memsqlctl bootstrap-aggregator --host 127.0.0.1 --memsql-id …) to make one of nodes to be the master, then I tried to use the command (memsqlctl add-leaf --host “127.0.0.1”) to add a leaf node, but it showed the error: dial tcp 127.0.0.1:3306: getsockopt: connection refused.
It sounds weird.Maybe there is something error with my system ?

1 Like

I try the command (memsqlctl create-node --port 3306 --password “”) again and it succeed.Memsql needs one
master node and one leaf node at least so that I can create database.So Now I want to make the node on port 3306 to be the master node and add a leaf node to the same host.

I use the command (memsqlctl add-leaf --host 127.0.0.1 --password “12345678” --port 3307) to add a leaf node.But it shows the error:
memsqlctl will perform the following actions on the local master aggregator on port 3306:
· Run ADD LEAF root:****@127.0.0.1:3307

Would you like to continue? [y/N]: y
dial tcp 127.0.0.1:3307: getsockopt: connection refused

How can I add a leaf node to the exited cluster which already has a master node on the 127.0.0.1?

The command “memsqlctl list-nodes” show the result:
±-----------±-------±-----±--------------±-------------±--------±---------------±-------------------+
| MemSQL ID | Role | Port | Process State | Connectable? | Version | Recovery State | Availability Group |
±-----------±-------±-----±--------------±-------------±--------±---------------±-------------------+
| F59FC6DB07 | Master | 3306 | Running | True | 6.7.8 | Online | |
±-----------±-------±-----±--------------±-------------±--------±---------------±-------------------+

I see memsqlctl list-nodes shows you have a master. Now you need to create the leaf node before adding it as a leaf. Try the two commands:

  • Creating the leaf node: memsqlctl create-node --port 3307 --password ""
  • Adding it as a leaf memsqlctl add-leaf --host 127.0.0.1 --port 3307 --password ""

Afterwards memsqlctl list-nodes should show a master aggregator and leaf node.

Really appreciate for your great help.I do it with the command memsqlctl add-leaf --host 127.0.0.1 --port 3307 --password “” to add a leaf node,but it show the error:
dial tcp 127.0.0.1:3307: getsockopt: connection refused
Do you know what is the problem?I try to find the solution on the google but there seems to be no effective solution.

Did you also do the create-node command to create that second node before you run memsqlctl add-leaf?

The problem is solved.It just needs to create-node firstly and then add-leaf.Thanks.