marcin_j
marcin_j

Reputation: 444

running cassandra on a mesos cluster

I'm trying to deploy Cassandra on a small (test) Mesos cluster. I have one master node (say 10.10.10.1) and three worker nodes: 10.10.10.2-4.

On the official site of apache mesos there is a link to cassandra framework developed for mesos (it is here: https://github.com/mesosphere/cassandra-mesos).

I'm following the tutorial that they provide there. In step 3 they are saying I should edit the conf/mesos.yaml file, specifically that I should set mesos.master.url so that it points to the master node (on which I also have the conf file).

The first thing I tried was just to replace localhost by the master node ip, so I had

mesos.master.url: 'zk://10.10.10.1:2181/mesos'

but when I then started the deployment script (by running bin/cassandra-mesos as they say in point 5 I should) I get the following error:

2015-02-24 09:18:24,262:12041(0x7fad617fa700):ZOO_ERROR@handle_socket_error_msg@1697: Socket [10.10.10.1:2181] zk retcode=-4, errno=111(Connection refused): server refused to accept the client 

It keeps retrying and displays the same error until I terminate it.

I tried removing 'zk' or replacing it with 'mesos' in the URL, changing (or removing altogether) the port removing the 'mesos' word in the URL but I keep getting the same error.

I also tried looking at how other frameworks do it (specifically spark, which I am hoping to deploy next) but didn't find anything helpful. Any ideas how to run it? Thanks!

Upvotes: 3

Views: 1593

Answers (2)

Adam
Adam

Reputation: 4322

If you have one master and no zk, how about setting the mesos.master.url to 10.10.10.1:5050 (where 5050 is the default mesos-master port)?

If Ben is right and the Cassandra framework otherwise requires ZK for its own persistence/HA, then try disabling that feature if possible. Otherwise you may have to rip the ZK code out yourself and recompile, if you really want a ZK-free setup (consequently without any HA features).

Upvotes: 0

Ben Whitehead
Ben Whitehead

Reputation: 154

The URL provided to mesos.master.url is passed directly to the underlying Mesos Native Java Library. The format listed in your example looks correct.

Next steps in debugging the connection issue would be to verify the IP address the ZooKeeper sever has bound to. You can find out by running sudo netstat -ntplv | grep 2181 on the server that is running ZooKeeper.

I would expect to see something like the following:

tcp 0 0 0.0.0.0:2181 0.0.0.0:* LISTEN 3957/java

Another possibility could be that ZooKeeper is binding specifically to localhost:

tcp 0 0 127.0.0.1:2181 0.0.0.0:* LISTEN 3957/java

If ZooKeeper has bound to localhost a client will only be able to connect to it with the URL zk://127.0.0.1:2181/mesos

A note about the future of the Cassandra Mesos Framework.

I am one of the developers working on rewriting the cassandra-mesos project to be more robust, stable and easier to run. The code in current master(6aa82acfac) is end-of-life and will be replaced within the next couple of weeks with the code that is in the rewrite branch.

If you would like to try out the latest build of the rewrite branch a marathon.json for running the framework can be found here. After downloading the marathon.json update the values for MESOS_ZK and CASSANDRA_ZK (and any resource values you want to update) then POST the json to marathon at /v2/apps.

Upvotes: 5

Related Questions