Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape from "domain already imported" #19

Open
systemcrash opened this issue Sep 14, 2023 · 2 comments
Open

Escape from "domain already imported" #19

systemcrash opened this issue Sep 14, 2023 · 2 comments

Comments

@systemcrash
Copy link
Contributor

For whatever reason, e.g. incorrect auth details to a provider, it's possible to get stuck here:

Screenshot 2023-09-14 at 16 51 51

(trimmed out the name in the add field for security)
Screenshot 2023-09-14 at 16 52 47

@nemunaire
Copy link
Member

nemunaire commented Sep 16, 2023

In fact, there is a uniqueness constraint on domain name, for all users (the NO_AUTH account is a real, special, user). So, this error appears because the domain already exists in the database. As it is not displayed here, it is necessarily registered for another user.

In order to solve the issue, you can use the administrative interface with ./hadmin.sh [route] [opts] (or docker exec -it happyDomain_ctr_name hadmin [route] [opts]):

./hadmin.sh /api/domains

This will show you all the registered domains on your instance.
Then you can delete a domain with its id:

./hadmin.sh /api/domains/012345678abced -X DELETE

It should print true. And you should then be able to register your domain with the NO_AUTH account.


In the future, we'll eventually use another DB schema (with ACL on domain, to share a domain between several account), and get ride of this unwanted limitation. I don't think we'll plan to change the uniqueness behavior in the current schema.

@systemcrash
Copy link
Contributor Author

Perhaps this last step would do well to be documented also: https://help.happydomain.org/en/deploy/docker/

I see advantages to having the uniqueness - altho two separate admins working independently is also a likely scenario. Just need to ensure fresh data, which can take a long time to pull in with some providers :/

Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants