Solved Incorrect error when removing an obsolete alias for a service
I had an app hosted at, let's say, "foo.bar.com". It had an alias for "barfoo.net", which was an old domain that subsequently has expired. Today, I tried to remove the "barfoo.net" alias by just trashing it and clicking save, but got an error:
An error occurred during the location change operation: Already Exists: DNS CNAME record already exists
The CNAME that already exists is for "foo.bar.com". It doesn't seem correct that this is an error, since the CNAME it is complaining about was already set up by Cloudron. All I wanted to do was to remove the alias, not also change the location of the service.
(Running Cloudron v7.3.2, using Hetzner DNS if it matters)
For the record, it did actually remove the alias, so I think the only confusion here is the unexpected extra presentation of an error message.
@Robin said in Incorrect error when removing an obsolete alias for a service:
The CNAME that already exists is for "foo.bar.com". It doesn't seem correct that this is an error, since the CNAME it is complaining about was already set up by Cloudron.
mm, Cloudron does not set up CNAME records, only A records. Did you happen to set this up manually?
The error path is hit when Cloudron tries to setup A record for
foo.bar.combut it finds that it has a CNAME record already there (what you suspected is correct). I guess the question is how did it end up having a CNAME record.
Currently, the flow is:
- At install time, Cloudron checks if there is a CNAME. If there is, it will ask your confirmation to "overwrite" it.
- If confirmed, it will only put an A record.
I am able to "reproduce" the issue atleast. If a record is change behind Cloudron's back, it basically gives you an error saying "there is something else here that I did not put". Then, if you "repair" it, it puts back the DNS records which it expects i.e removes the CNAME record and puts back the A record.
I think it's this way because there is no way to know if the CNAME somehow ends up pointing to the server correctly for cert renewal etc to work reliably. Especially, if CNAMEd to some external service which then proxies to Cloudron server.
@girish said in Incorrect error when removing an obsolete alias for a service:
Did you happen to set this up manually?
Hmm, I don't actually know. It's not impossible I guess...
Good to know though, I'll work on cleaning DNS up