-
Notifications
You must be signed in to change notification settings - Fork 7
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
Can't generate SSL cert with ansible script (Unprocessable Entity) #12
Comments
Hey, sorry been swamped with finishing touches on an app for my day job and haven't had a chance to check the Wagtail slack in the past few days. In this output the most telling things are:
and
So this is the block of code in the script that's failing: It's trying to create cdn.(yourdomain).(com/net/au/whichever) Does that name already exist in your DigitalOcean account? Or in another existing domain name that's already in use? If your website is myname.au it's trying to create "cdn.myname.au" and associate it with the public storage bucket used for images, CSS, javascript files, etc. I know you mentioned that you had used (or the script had failed to deploy) particular buckets before, and they might not be completely deleted. Or perhaps you've got a cdn.myname.au already in use by some other service. There are three places where that hostname is specified in that ansible deployment's scripts, all in main.yml.. rentfreemedia/ansible/main.yml Line 643 in 7bfefa1
rentfreemedia/ansible/main.yml Line 198 in 7bfefa1
rentfreemedia/ansible/main.yml Line 244 in 7bfefa1
In each of these lines there's a If that certificate already exists in your DigitalOcean account, or some other service is already using that domain name, you could change the prefix on all those entries to something else. If that works, you would the only need to change the equivalent value in your Wagtail deployment's env file to propagate that change to the rest of the deployment. Line 18 in 7bfefa1
The catch with ansible is it either works, or it doesn't and just fails, unfortunately, so if previous attempted deployments failed you'll probably have to manually delete things in your DigitalOcean account that it tried to create before. |
I tried changing cdn to cdn2 and pub but got this:
Then I realised I needed to install the requirements, but it didn't look like the virtual environment activated properly (the command line didn't update to rentfreelibs)
I appreciate all your help so far but I think I'll need to use a more beginner friendly setup for this website I'm working on. |
fatal: [tezos.rocks]: FAILED! => {"attempts": 3, "cf_cache_status": "DYNAMIC", "cf_ray": "805f120e1a7edfab-SYD", "changed": false, "connection": "close", "content": "{\"id\":\"unprocessable_entity\",\"message\":\"name is not unique\",\"request_id\":\"866b6f50-0280-435d-8c39-1d4c0655efd1\"}\n", "content_length": "113", "content_type": "application/json; charset=utf-8", "date": "Wed, 13 Sep 2023 08:37:50 GMT", "elapsed": 0, "json": {"id": "unprocessable_entity", "message": "name is not unique", "request_id": "866b6f50-0280-435d-8c39-1d4c0655efd1"}, "msg": "Status code was 422 and not [202]: HTTP Error 422: Unprocessable Entity", "ratelimit_limit": "5000", "ratelimit_remaining": "4988", "ratelimit_reset": "1694597840", "redirected": false, "server": "cloudflare", "set_cookie": "__cf_bm=NetnvUvPJIJzc5yElo1K4.ow8_oM8Ba.OqP2nPTDA.4-1694594270-0-AcgNoo7yLF2IaEinMHJBrJAaflDzb1beulit59VBBQ9vKqk3zTbcl9yYVx9R5PGOUvYF2n2e5RN6udz0ZyAkaywbqulJkjTJ4Jdmm5nLEThI; path=/; expires=Wed, 13-Sep-23 09:07:50 GMT; domain=.digitalocean.com; HttpOnly; Secure; SameSite=None", "status": 422, "url": "https://api.digitalocean.com/v2/certificates", "x_gateway": "Edge-Gateway", "x_request_id": "866b6f50-0280-435d-8c39-1d4c0655efd1", "x_response_from": "service"}
The text was updated successfully, but these errors were encountered: