streamsets / datacollector-tests

StreamSets Test Framework-based tests for StreamSets Data Collector
Apache License 2.0
18 stars 29 forks source link

Failed to activate Python SDK for StreamSets (reason: Activation file is malformed). #66

Open niyatidoshi opened 3 years ago

niyatidoshi commented 3 years ago

Hi,

I'm trying to run, stf test --sdc-version 3.4.0 -s stage/test_dev_stages.py ​and getting an error, "streamsets.sdk.exceptions.ActivationError: Failed to activate Python SDK for StreamSets (reason: Activation file is malformed)."

I tried "stf test --sdc-version 3.15.0 -s stage/test_dev_stages.py too but the same error.

I placed the activation key in a file named "rsa-signed-activation-info.properties". The file is placed at "/.streamsets/activation/" and has a key only.

image

Please advise.

Thanks.

c0rnholi0 commented 3 years ago

Hi Niyatidoshi,

The SDK attempts to read the activation key from the ~/.streamsets/activation/rsa-signed-activation-info.properties file at runtime, which you mentioned you've already created. It's complaining that the activation key itself is malformed: either the file's contents are malformed, or the file itself is malformed/corrupted.

I'd verify that the structure of the key within the file is what we expect it to be - it should look like the following: --------SDC ACTIVATION KEY--------

--------SDC ACTIVATION KEY-------- If you're missing the `SDC ACTIVATION KEY` string before and after the literal activation key, it can lead to an error like the one you see above. Double-check the file contents, and make sure it's formatted correctly. If you're still seeing issues, reach out to our support team by opening a support ticket and ask for a new SDK activation key. Thank you, Mitch Barnett Software Engineer - Engineering Productivity On Wed, Aug 11, 2021 at 11:21 AM niyatidoshi ***@***.***> wrote: > Hi, > > I'm trying to run, stf test --sdc-version 3.4.0 -s > stage/test_dev_stages.py ​and getting an error, "*streamsets.sdk.exceptions.ActivationError: > Failed to activate Python SDK for StreamSets (reason: Activation file is > malformed).*" > > I tried "stf test --sdc-version 3.15.0 -s stage/test_dev_stages.py too but > the same error. > > I placed the activation key in a file named > "rsa-signed-activation-info.properties". The file is placed at > "/.streamsets/activation/" and has a key only. > > [image: image] > > > Please advise. > > Thanks. > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > , or > unsubscribe > > . > Triage notifications on the go with GitHub Mobile for iOS > > or Android > > . >
niyatidoshi commented 3 years ago

Many thanks Mitch for the details. The issue was in file, "--------SDC ACTIVATION KEY--------" strings were missing. Added them and now I can run test cases for SDC v3.4 and 3.15 both.

One more thing, I tried to run the same with the latest version v.4.0.2 and getting error

image

It looks like it's expecting activation key in the environment variable.. I tried all approaches mentioned here, https://phoenixnap.com/kb/linux-set-environment-variable, but error is still there. Could you please advise?

Thanks again.

kirtiv1 commented 3 years ago

Hi Niyati,

1) Have you set that env. variable SDC_ACTIVATION_KEY ? e.g. using like export SDC_ACTIVATION_KEY= or similar syntax? to confirm: echo $SDC_ACTIVATION_KEY will show you the value on the terminal where you are executing stf command.

2) If yes, then a point to note is that, this is a different ACTIVATION key than the SDK's activation key. Is it different value in your case?

Regards- Kirti

niyatidoshi commented 3 years ago

Hi Kirti

I've only one key that I've set in rsa-signed-activation-info.properties.. and as per the https://docs.streamsets.com/portal/#sdk/latest/installation.html, I've set the same value in the environment variable, export STREAMSETS_SDK_ACTIVATION_KEY='abcdefg'.

Do we need any different Key to use this with v4.0.0.+? If so, how do I get that?

Many Thanks.

kirtiv1 commented 3 years ago

Hi Niyati,

It depends on how you got the SDC. In some cases, you might have received the SDC activation key by email. In any case, if you are a customer, I would recommend to contact the support team.

Regards- Kirti