1

Spark v. 0.5

Here's the command I used to start a Locator:

ubuntu@ip-172-31-8-115:/snappydata-0.5-bin/bin$ ./snappy-shell locator start 
Starting SnappyData Locator using peer discovery on:
0.0.0.0[10334] Starting DRDA server for SnappyData at address localhost/127.0.0.1[1527] 
Logs generated in /snappydata-0.5-bin/bin/snappylocator.log 
SnappyData Locator pid: 9352 status: running

It looks like it starts the DRDA server locally, with no outside interface for a client to connect to. So, I cannot reach my SnappyData Locator using this JDBC URL from an outside client host (e.g. my SquirrelSQL editor).

This does not connect:

jdbc:snappydata://MY-AWS-PUBLIC-IP-HERE:1527/

What property do I pass my ./snappy-shell.sh location start command to get the DRDA Server to start on a public IP address instead of "localhost/127.0.0.1"?

Jason
  • 2,006
  • 3
  • 21
  • 36

2 Answers2

1

Use -client-bind-address and -client-port options. For locator also use the -peer-discovery-address and -peer-discovery-port options to specify bind address for other locators/servers/leads (that are passed to their -locators=<address>:<port>):

snappy-shell locator start -peer-discovery-address=<internal IP for peers> -client-bind-address=<public IP for clients>

See the output of snappy-shell locator --help for commonly used options.

For SnappyData releases, you may find it much easier to use the global configuration for all of the locators, servers, leads. Check configuring the cluster.

This will allow specifying all options for all JVMs of the cluster in conf/locators, conf/leads, conf/servers then starting with snappy-start-all.sh, status with snappy-status-all.sh and stop all with snappy-stop-all.sh

Sumedh
  • 383
  • 2
  • 7
  • is the -peer-discovery-address supposed to be a multicast address? – Jason Jul 21 '16 at 21:32
  • No, the IP address of the machine. Multicast support has mostly been phased out. Typically peers will communicate on internal IP addresses while for clients it will be public IP addresses (though the two can be same). – Sumedh Jul 21 '16 at 21:40
  • Sounds good. Yeah, I saw jgroups references in some stacktraces and also a set of "mcast_" properties in the logs, so I wasn't sure. We got it running. Just to clarify for others using AWS, for -client-bind-address, I used what AWS calls a 'Private IP', which is indeed a "public IP for Clients", but not the same as the AWS "Public IP" which goes out over the Internet. :) – Jason Jul 21 '16 at 22:06
1

On a related note, we at SnappyData Inc., are developing scripts to enable users quickly launch SnappyData cluster on AWS. If you want to try it out, below steps would guide you. We would love to hear your feedback on this.

  • Download its development branch git clone https://github.com/SnappyDataInc/snappydata.git -b SNAP-864 (You don't need to clone the repo for this, but I could not find a way to attach the scripts here.)
  • Go to ec2 directory cd snappydata/cluster/ec2
  • Run snappy-ec2. ./snappy-ec2 -k ec2-keypair-name -i /path/to/keypair/private/key/file launch your-cluster-name
  • See this README for more details.
Amogh
  • 136
  • 5