# LeasedActivationStrategy 'Invalid activation token'

**URL:** <https://forum.inductiveautomation.com/t/leasedactivationstrategy-invalid-activation-token/92088>\
**Category:** Maker\
**Created:** [June 19, 2024, 1:31pm UTC](https://forum.inductiveautomation.com/t/leasedactivationstrategy-invalid-activation-token/92088 "2024-06-19T13:31:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Steiger](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@Thomas\_Steiger](https://forum.inductiveautomation.com/u/Thomas_Steiger)\
**Post date:** [June 19, 2024, 1:31pm UTC](https://forum.inductiveautomation.com/t/leasedactivationstrategy-invalid-activation-token/92088/1 "2024-06-19T13:31:03Z")

</div>

I have installed the Ignition Maker Edition as a docker container.

Unfortunately from time to time the license turns invalid. It does not happen at the same time of a day and sometimes for the duration of multiple days the license is valid.

Before the license turns invalid I see multiple statements of the following in the gateway log

```python
Received error when trying to get server nonce. Request ID: 'd8fd5b1e-9dd1-4311-a9b5-598d75c35c0f', Code: '2', Message: 'Invalid activation token'

```

Each time I can solve the problem by inactivating the license on the gateway and regenerate the activation token.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/d/bd0dd02213986e223220d4d1ff5032602c1ebede.png)

After adding this information to the gateway everything works perfectly until the license turns invalid again.

How can I permanently solve the problem?

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [June 20, 2024, 2:04pm UTC](https://forum.inductiveautomation.com/t/leasedactivationstrategy-invalid-activation-token/92088/2 "2024-06-20T14:04:11Z")

</div>

How are you applying the license key and activation token in your Docker container? Are you applying them via environment variables `IGNITION_LICENSE_KEY` and `IGNITION_ACTIVATION_TOKEN`? Or are you not using those at all and just inputting them through the gateway web interface? My main concern is that you're not trying to do both--in that situation, a gateway restart would revert them back to the env-var settings, which at this point are invalid.

---

<div class="post-metadata">

**Author:** ![Thomas\_Steiger](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@Thomas\_Steiger](https://forum.inductiveautomation.com/u/Thomas_Steiger)\
**Post date:** [June 21, 2024, 7:39am UTC](https://forum.inductiveautomation.com/t/leasedactivationstrategy-invalid-activation-token/92088/3 "2024-06-21T07:39:20Z")

</div>

I am just inputting them through the gateway web interface.  
Strangly the license is invalidated even without a gateway restart or a new creation of the docker container. On the status page of the gateway I can check the uptime and it shows a duration of days or weeks.  
But I will use the environment variables and see if it will solve the problem but I guess not.

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [June 21, 2024, 1:25pm UTC](https://forum.inductiveautomation.com/t/leasedactivationstrategy-invalid-activation-token/92088/4 "2024-06-21T13:25:04Z")

</div>

> [@Thomas\_Steiger](#):
>
> But I will use the environment variables and see if it will solve the problem but I guess not.

I didn't mean to suggest that using the env vars would solve the problem--mainly just wanted to rule out a possible conflict (if you were trying to do both) that I thought could stage this kind of failure scenario.

It might be worth turning the `LeasedActivationStrategy` logger to `TRACE` to see if you can get any additional insights leading up to that failure.

One other thought, you _might_ consider changing your password on your IA account. I'm assuming there is no shared access to where someone else might be resetting your activation token from underneath you?
