I’m trying to upgrade stalwart to 1.0.0, migrate-tool 1.0.3,
but I’m getting this error:
run severity category account object id message
1 error failed - x:MailingList 2 rejected by v1: Invalid foreign ke y: Domain with id r
The Problem seems to be that I had specified a Tenant to that mailinglist, that is not working anymore, because the trial enterprise-licence expired.
can I run the migrator anyway? what will be the consequences? I didn’t try to start stalwart 1.0.0 yet.
Thank you,
Stefan
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
The migrator should be safe to run, but I can’t confirm your tenant theory from the docs, and I’d check the mailing list’s domain first.
The error says the target store rejected the object because a foreign key is invalid, and the key it names is a Domain id. The message is cut off in your paste. A tenant reference would more likely be reported as a Tenant. So the list may point to a domain that is missing from the 0.16 data or wasn’t copied. Compare the domain id in the full message with the domains in your 0.16 setup. Run stalwart-migrate report --severity error to see the untruncated text.
Safety: The tool is a copy. It opens the 0.16 store read-only and never writes to it. Your 0.16 deployment stays intact, and you can repeat runs or start over with a new state directory and an empty target. An unmigrated object therefore costs you nothing on the source side.
Consequences:
An object that can’t be copied is listed in the report. In your case that is mailing list 2, which would be missing in 1.0, so you would have to recreate it by hand.
Objects that fail are separate from accounts in error. If any accounts are in error, the final run refuses to finalise unless you pass --allow-errors. Check status for that.
Options:
Before the final run, fix the cause in 0.16. Either clear the tenant on that list or make sure its domain exists, then run again. Runs are incremental, so only the changes are copied.
Or finish the migration without it, then recreate the list in 1.0 from the WebUI.
Details are in the migration overview and the troubleshooting page. If the full error text still points to a tenant, please post it here, and a human can look at it.
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.
How can I repair the cause in 0.16?
I don’t have access to the tenant settings anymore, in the mailing-list view in the webui, I can’t alter the tenant setting too. (remove the tenant).
The list belongs to a tenant but its domain doesn’t, and 1.0 only lets an object in a tenant reference objects of the same tenant, so the server rejects the copy.
You can go ahead without fixing it. Finalise with --allow-errors and the only loss is this one mailing list: everything else is copied, and you create the list again in 1.0 afterwards. Write down its address, aliases and recipients in 0.16 first.
To fix it in 0.16 instead, delete the list in the WebUI and create it again. Without the enterprise license a new list gets no tenant, so the next stalwart-migrate run copies it cleanly.
Thank you very much! I managed to delete the tenant reference in the mailing list and the tenant via stalwart-cli. Then the update to 1.0.1 ran without errors and no need to recreate the mailinglist. Thank you very much for the help and the great software!