Hi,
I have installed Aerospike Enterprise edition (version: “Aerospike Enterprise Edition build 4.5.3.4”).
And copied feature-key-file at “/etc/aerospike/features.conf” which I have recieved from Aerospike team.
And followed steps for " Aerospike Connect and Spark integrated" mentioned at https://www.aerospike.com/docs/connectors/enterprise/spark/installation.html.
Still I am getting error while running
var client=AerospikeConnection.getClient(AerospikeConfig(“localhost”,3000,1000))
in spark-shell.
Error is following:
> com.aerospike.client.AerospikeException: Error -1: Un-licensed server
at com.aerospike.spark.sql.AerospikeConnection$.newClient(AerospikeConnection.scala:99)
at com.aerospike.spark.sql.AerospikeConnection$.getClient(AerospikeConnection.scala:63)
... 51 elided
Any suggestion why this is happening?
You need to use spark.conf to set the location of keypath as below
spark.conf.set("aerospike.keyPath", "/etc/aerospike/features.conf")
to look for the license file (and that needs to be in every node that is running spark executors)? Check the example below:
import com.aerospike.spark.sql._
import com.aerospike.client.AerospikeClient
import com.aerospike.client.Bin
import com.aerospike.client.Key
import com.aerospike.client.Value
import com.aerospike.client.AerospikeClient
import com.aerospike.client.Host
import com.aerospike.client.policy.ClientPolicy
// These are specific info about the Aerospike instance
var dbHost = "rhes75"
var dbPort = "3000"
var dbConnection = "trading_user_RW"
var namespace = "test"
var dbSet = "sample"
var dbPassword = "xxxxx"
val sqlContext = spark.sqlContext
spark.conf.set("aerospike.seedhost", dbHost)
spark.conf.set("aerospike.port", dbPort)
spark.conf.set("aerospike.namespace",namespace)
spark.conf.set("aerospike.set", dbSet)
**spark.conf.set("aerospike.keyPath", "/etc/aerospike/features.conf")**
spark.conf.set("aerospike.user", dbConnection)
spark.conf.set("aerospike.password", dbPassword)
// Load the Aerospike set into DataFrame in Spark. All the credentials are coming from the spark.conf parameters
val dfRead = sqlContext.read.
format("com.aerospike.spark.sql").
option("aerospike.batchMax", 10000).
load
HTH
No luck. Still got same error.
Hi,
Have you actually removed the community edition of Aerospike and installed the enterprise edition?
https://discuss.aerospike.com/t/how-to-remove-and-clean-up-an-aerospike-server-installation/4839
Also what is in your features.conf file? Can you share it? This features.conf is usually a soft link to the actual license file downloaded from Aerospike
Example
features.conf -> /etc/aerospike/features-<COMPANY_NAME>.conf
Do you have a line like below in features.conf file
raf-realtime-analysis-framework
HTH
Thanks Mich for reply.
It is fresh installation. feature file has content like this( redacted for obvious reason)
feature-key-version 1
serial-number 3XXXXXXXX
asdb-strong-consistency true
----- SIGNATURE ------------------------------------------------
Some random string here==
----- END OF SIGNATURE -----------------------------------------
It does not have line “raf-realtime-analysis-framework”
Ok so it may worth checking with Aerospike sales to confirm that you have indeed license for Aerospike-spark connector.
Also if you running spark on the same host as Aerospike installed and I expect you to use a different unix login for spark, can that login read the Aerospike license file?
Do
ls -l /etc/aerospike/features.conf
and send it here please. cat that features.conf file as spark user and see you can read it?
HTH,
Mich
Thanks Mich, I have asked Aerospike sales team about this.