How to configure cassandra for remote connection

前端 未结 4 1386
囚心锁ツ
囚心锁ツ 2020-12-24 15:16

I am trying to configure Cassandra Datastax Community Edition for remote connection on windows,

Cassandra Server is installed on a Windows 7 PC, With the lo

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-24 16:22

    Alternate solution to Kat. Worked with Ubuntu 16.04

    1. ssh into server server_user@**.**.**.**
    2. Stop cassandra if running:

      • Check if running with ps aux | grep cassandra
      • If running, will output a large block of commands / flags, e.g.

        ubuntu 14018 4.6 70.1 2335692 712080 pts/2 Sl+ 04:15 0:11 java -Xloggc:./../logs/gc.log ........

        Note 14018 in the example is the process id

      • Stop with kill (in this case 14018)
    3. edit cassandra.yaml file to be the following

      • rpc_address: 0.0.0.0
      • broadcast_rpc_address: **.**.**.** <- your server's IP (cannot be set to 0.0.0.0)
    4. Restart cassandra ./bin/cassandra -f (from within cassandra root)
    5. Open another terminal on local machine & connect via cqlsh **.**.**.** (your server's IP) to test.

    The ./bin/nodetool status address reported my localhost IP (127.0.0.1), but cqlsh remotely still worked despite that.

提交回复
热议问题