Hello,
You had a similar issue a couple of days ago where it was suggest to remove the data nodes from the discovery.seed_hosts
settings and also use the default value for the allocation settings, it was this issue.
But it seems that you didn't change anything.
Also, you are using non-default ports, if I'm not wrong you need to specify that in the discovery.seed_hosts
.
Your discovery.seed_hosts
needs to look like this in both of your masters, change it and try to restart them again.
discovery.seed_hosts: ["ES-Master-1:9840", "ES-Master-2:9840"]