# Aerospike spark connect enterprise addition Un-licensed server error

**URL:** <https://discuss.aerospike.com/t/aerospike-spark-connect-enterprise-addition-un-licensed-server-error/6476>\
**Category:** General Discussion\
**Created:** [July 15, 2019, 11:09am UTC](https://discuss.aerospike.com/t/aerospike-spark-connect-enterprise-addition-un-licensed-server-error/6476 "2019-07-15T11:09:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kundan\_Singh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kundan_singh/32/1226_2.png) [@Kundan\_Singh](https://discuss.aerospike.com/u/Kundan_Singh)\
**Post date:** [July 15, 2019, 11:09am UTC](https://discuss.aerospike.com/t/aerospike-spark-connect-enterprise-addition-un-licensed-server-error/6476/1 "2019-07-15T11:09:46Z")

</div>

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](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?

---

<div class="post-metadata">

**Author:** ![Mich\_Talebzadeh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/mich_talebzadeh/32/1141_2.png) [@Mich\_Talebzadeh](https://discuss.aerospike.com/u/Mich_Talebzadeh)\
**Post date:** [July 15, 2019, 5:20pm UTC](https://discuss.aerospike.com/t/aerospike-spark-connect-enterprise-addition-un-licensed-server-error/6476/2 "2019-07-15T17:20:21Z")

</div>

You need to use spark.conf to set the location of keypath as below

```auto
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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Kundan\_Singh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kundan_singh/32/1226_2.png) [@Kundan\_Singh](https://discuss.aerospike.com/u/Kundan_Singh)\
**Post date:** [July 16, 2019, 6:53am UTC](https://discuss.aerospike.com/t/aerospike-spark-connect-enterprise-addition-un-licensed-server-error/6476/3 "2019-07-16T06:53:28Z")

</div>

No luck. Still got same error.

 ![33%20PM](https://us1.discourse-cdn.com/flex019/uploads/aerospike/original/2X/3/38c26c83c00483329b68e270f8252127e93cb0d7.png)

---

<div class="post-metadata">

**Author:** ![Mich\_Talebzadeh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/mich_talebzadeh/32/1141_2.png) [@Mich\_Talebzadeh](https://discuss.aerospike.com/u/Mich_Talebzadeh)\
**Post date:** [July 16, 2019, 8:55am UTC](https://discuss.aerospike.com/t/aerospike-spark-connect-enterprise-addition-un-licensed-server-error/6476/4 "2019-07-16T08:55:37Z")

</div>

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](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

```auto
features.conf -> /etc/aerospike/features-<COMPANY_NAME>.conf

```

Do you have a line like below in features.conf file

```auto
raf-realtime-analysis-framework

```

HTH

---

<div class="post-metadata">

**Author:** ![Kundan\_Singh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kundan_singh/32/1226_2.png) [@Kundan\_Singh](https://discuss.aerospike.com/u/Kundan_Singh)\
**Post date:** [July 16, 2019, 9:14am UTC](https://discuss.aerospike.com/t/aerospike-spark-connect-enterprise-addition-un-licensed-server-error/6476/5 "2019-07-16T09:14:44Z")

</div>

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”

---

<div class="post-metadata">

**Author:** ![Mich\_Talebzadeh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/mich_talebzadeh/32/1141_2.png) [@Mich\_Talebzadeh](https://discuss.aerospike.com/u/Mich_Talebzadeh)\
**Post date:** [July 16, 2019, 1:33pm UTC](https://discuss.aerospike.com/t/aerospike-spark-connect-enterprise-addition-un-licensed-server-error/6476/6 "2019-07-16T13:33:09Z")

</div>

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

```auto
 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

---

<div class="post-metadata">

**Author:** ![Kundan\_Singh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kundan_singh/32/1226_2.png) [@Kundan\_Singh](https://discuss.aerospike.com/u/Kundan_Singh)\
**Post date:** [July 17, 2019, 6:37am UTC](https://discuss.aerospike.com/t/aerospike-spark-connect-enterprise-addition-un-licensed-server-error/6476/7 "2019-07-17T06:37:09Z")

</div>

Thanks Mich, I have asked Aerospike sales team about this.
