Invalid or expired license 29 days left

I get the above error when trying to initiate a manual backup. The trial says I have 29 left so I’m at a bit of a loss here.

I read some similar posts and my .jason file for my Gdrive account is still there and present, not sure where else to go from here.

Delete the license.json and activate the app again. Also make sure the hostname of your machine did not change.

Relevant thread:

Thank you that worked, its docker and it happened after a reboot, will this happen on each reboot?

Depends. Is your container getting assigned new hostname every time?

License depends on hostname and machine-id. Depending on the container the former is assigned by docker and the latter persisted in the config folder that needs to be mapped and persisted on the host; e.g as described here Docker Hub

Ok that makes sense, i didnt see these instructions because its UNRAID and because of this, I do not see exactly where I would specify this or enter it.

Do you happen to know how I would go about this with unraid?

Nevermind found it, it looks to be specified as

–hostname=duplicacy

So since it is present, I assume the license issue should not have happened?

Right, it should not have happened. Also check that the machine-id file or equivalent is present in the /config or similar folder. Maybe you can find some clues in duplicacy_web.log?

Ok i found this (machine-id file was present also)

2021/12/29 07:11:24 192.168.1.1:57162 POST /get_backup_status
2021/12/29 07:15:58 The license may have been issued to a different computer
2021/12/29 07:15:58 Failed to get the value from the keyring: keyring/dbus: Error connecting to dbus session, not registering SecretService provider: dbus: DBUS_SESSION_BUS_ADDRESS not set
2021/12/29 07:15:58 Failed to decrypt the value from the keyring file: cipher: message authentication failed
2021/12/29 07:15:58 Failed to decrypt the testing data using the password from KeyChain/Keyring: crypto/aes: invalid key size 0

I’m not sure — but this looks like due to changed hostname

Your probably right but since its specified in the docker config i don’t know what else to do, i rebooted several times today for unrelated reasons and it did not change so maybe it will be infrequently.

Its a trial now but when i purchase hopefully if this happens once in a blue moon getting the license re-issued isnt too much of a hassle.

Same issue for me. I’m trying to give Duplicacy a try but I’m getting the dreaded ‘Invalid or expired license’ every 2-3 days. I’m also running @saspus docker image on unraid like @thedinz

If if delete license.json and restart the container everything works again for a couple of days. The only thing happening that might cause issue is sometime my internet goes down and the container is stopped daily for a config backup to a share.

Here’s what I can confirm based on my research on similar issues on this forum:

  • The hostname is the same every time. It’s set using ‘–hostname=duplicacy-unraid’ and confirmed by running the hostname command in the CT CLI
  • The machine-id is also the same. Confirmed by comparing the machine-id file from previous backups
  • If I delete license.json and restart the CT, the new license file that is being created is the exacte same copy and contains the same value as the previous one I deleted yet now it works fine.
  • The only thing I’m seeing in the logs is ‘Failed to request a license: activate’ when the container boots

Any idea what might cause this ?

Thanks

Could it be networking issues? I.e. networking is not yet up when the container starts? If you simply restart the container does it work then?

Could be. Unfortunately I’m not really sure how Duplicacy valides the license but when the error does happen, restarting the CT does not fix it. The only way is to delete license.json then restart it.

I tried to reproduce the issue by blocking internet access to the container and restarting it but to no avail.

If it’s really related to the network, shouldn’t Duplicacy check it’s license on every launch of a backup job instead of the boot of the CT ? Otherwise if my network is down when the container boots up then later the network comes back I would still be stuck with an invalid license. Not sure if that’s what happening but making a guess.

1 Like

It has not happened to me since but its been up this whole time, i suspect I will indeed have the issue again, and like @Quack66 mentioned all my settings appear to be correct including the hostname specification.

Could it not be possible that we found a bug?

1 Like

I can confirm that if the container stays on then the license will remain valid. After you get a paid license, Duplicacy will be able to automatically download a new license when the current one becomes invalid for whatever reason, using the same activation code. It can’t do this for trial licenses, because a trial license doesn’t have a unique activation code.

2 Likes

That’s good to know ! I just bought my license. I’ll report back if the issue persist. Thanks !

Adding on to this as well, I have am having this same issue. Seems to always occur on boot of my Duplicacy docker container. I’m specifying the hostname directly and confirmed through the logs that it is seeing the correct hostname. The only solution is for me to delete the licenses.json and machine-id files and then restart the container again and let it recreate those files. I’ve noted that the machine-id it creates each time is different, so I suspect that is probably the issue but am not sure of how to confirm off the top of my head without knowing how exactly it creates the data within the machine-id file.

Given that I’m still evaluating Duplicacy, I’m not wanting to purchase a license just yet, in case that is a solution, but I’m also worried that the issue would persist after the fact given that it seems like the host is being recognized as a different machine each time the container is started.

If there is any information I can provide or tests I can do to help diagnose this, feel free to let me know or send me a message. Thus far I’m very happy with the software and, pending letting my data backup and performing tests with pruning, checking, and restoring, I’m going to be purchasing a license.

Depending on what container are you using, it’s managed by dbus.

https://bitbucket.org/saspus/duplicacy-web-docker-container/src/3962a830b26ff088ce83d4e7b55a796cd66a7152/init.sh#lines-137

machine-id is supposed to be unique machine identifier. Don’t delete it, it shall be persisted in the config folder. If it is missing or corrupted it gets created with dbus-uuidgen which is pretty much random data for most intents and purposes.

Oddly, the only way that I can get the container (I am using yours, coincidentally) to actually function again is by deleting both the licenses.json and the machine-id. If I just delete the former, it will recreate it but continue to insist that I do not have a valid license. I looked into the code earlier and noted that it created the config/machine-id and then symlinked it to /var/lib/dbus/machine-id. I need to do some digging later and see if the value of /var/lib/dbus/machine-id is consistent across container reboots or if it is changing somehow, perhaps the symlink breaking.

I don’t know details but this is a very good observation and likely means it’s a duplicacy licensing issue.

When you delete machine ID and the new one is generated duplicacy thinks its running on an entirely new machine and does somethign differently: e.g. requests a completely new licenses as opposed to renewing the current one.

@gchen?