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

Problem with choosing domain name #174

Open
gepping opened this issue Oct 24, 2020 · 0 comments
Open

Problem with choosing domain name #174

gepping opened this issue Oct 24, 2020 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@gepping
Copy link

gepping commented Oct 24, 2020

Hi all,

When I enter pushkin aws init, I get two choices for a domain name: "default" and "cognition-exp.com" (which is the domain I created). If I select "default", I am able to complete the program and navigate to my website, but the domain is some random string.

If I select "cognition-exp.com", I get the following error message:
Setting front-end 'environment variable' WARNING! Your password will be stored unencrypted in /home/gepping/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store ? Which project? cognition-exp ? Provide your AWS profile username that you want to use for managing this project. default Setting up SSL for load-balancer Choosing... ? Which SSL certificate would you like to use for your site? *.cognition-exp.com Choosing domain name for site Choosing... ? Which domain would you like to use for your site? cognition-exp.com Successfully updated pushkin.yaml with custom domain. Writing out front-end config Database security group already exists. Skipping creation. Creating Main database. Creating Transaction database. Publishing images to DockerHub Building API Pushkin API to DockerHub Building vocab_worker Building mind_worker Building whichenglish_worker Building front-end Using build-if-changed for cognition-exp Building combined front-end Installed combined front-end Checking to see if bucket cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f already exists. cognitionexpMain already exists. If that surprises you, look into it. Bucket exists. Skipping create. Syncing files to bucket Setting permissions Checking for CloudFront distribution No existing cloudFront distribution for cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f. Creating distribution. Could not set up cloudfront. (node:29401) UnhandledPromiseRejectionWarning: Error: Command failed: aws cloudfront create-distribution --distribution-config '{"CallerReference":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f","Aliases":{"Quantity":2,"Items":["cognition-exp.com","www.cognition-exp.com"]},"DefaultRootObject":"index.html","Origins":{"Quantity":1,"Items":[{"Id":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f","DomainName":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f.s3.amazonaws.com","OriginPath":"","CustomHeaders":{"Quantity":0},"S3OriginConfig":{"OriginAccessIdentity":""},"ConnectionAttempts":3,"ConnectionTimeout":10}]},"OriginGroups":{"Quantity":0},"DefaultCacheBehavior":{"TargetOriginId":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f","TrustedSigners":{"Enabled":false,"Quantity":0},"ViewerProtocolPolicy":"redirect-to-https","AllowedMethods":{"Quantity":2,"Items":["HEAD","GET"],"CachedMethods":{"Quantity":2,"Items":["HEAD","GET"]}},"SmoothStreaming":false,"Compress":false,"LambdaFunctionAssociations":{"Quantity":0},"FieldLevelEncryptionId":"","CachePolicyId":"658327ea-f89d-4fab-a63d-7e88639e58f6"},"CacheBehaviors":{"Quantity":0},"CustomErrorResponses":{"Quantity":1,"Items":[{"ErrorCode":403,"ResponsePagePath":"/index.html","ResponseCode":"200","ErrorCachingMinTTL":60}]},"Comment":"","Logging":{"Enabled":false,"IncludeCookies":false,"Bucket":"","Prefix":""},"PriceClass":"PriceClass_All","Enabled":true,"ViewerCertificate":{"CloudFrontDefaultCertificate":false,"MinimumProtocolVersion":"TLSv1.2_2019","CertificateSource":"cloudfront","ACMCertificateArn":"arn:aws:acm:us-east-1:458085388936:certificate/386cc548-7654-4bde-850b-1947f16f4eee","SSLSupportMethod":"sni-only"},"Restrictions":{"GeoRestriction":{"RestrictionType":"none","Quantity":0}},"WebACLId":"","HttpVersion":"http2","IsIPV6Enabled":true}' --profile default An error occurred (InvalidViewerCertificate) when calling the CreateDistribution operation: The certificate that is attached to your distribution doesn't cover the alternate domain name (CNAME) that you're trying to add. For more details, see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-requirements at ChildProcess.exithandler (child_process.js:308:12) at ChildProcess.emit (events.js:315:20) at maybeClose (internal/child_process.js:1048:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) (Use `node --trace-warnings ...` to show where the warning was created) (node:29401) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:29401) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. cognitionexpTransaction already exists. If that surprises you, look into it. Databases created. Adding to local config definitions. Successfully updated pushkin.yaml with databases. Starting ECS setup Handling migrations See if a migrations file for transactions exists userMigsDir: /home/gepping/pushkin_quickstart/users/migrations userDatabase: Main Loading migrations for mind expConfig: {"experimentName":"mind","shortName":"mind","apiControllers":{"mountPath":"mind","location":"api controllers","name":"mycontroller"},"worker":{"location":"worker","service":{"image":"mind","links":["message-queue","test_db"],"environment":{"AMQP_ADDRESS":"amqp://message-queue:5672","DB_USER":"postgres","DB_PASS":"example","DB_URL":"test_db","DB_NAME":"test_db"}}},"webPage":{"location":"web page"},"migrations":{"location":"migrations"},"seeds":{"location":""},"database":"localtestdb","logo":"logo512.png","text":"Enter your experiment description here.","tagline":"Be a citizen scientist! Try this quiz.","duration":"","productionDB":"Main"} Loading migrations for vocab expConfig: {"experimentName":"vocab","shortName":"vocab","apiControllers":{"mountPath":"vocab","location":"api controllers","name":"mycontroller"},"worker":{"location":"worker","service":{"image":"vocab","links":["message-queue","test_db"],"environment":{"AMQP_ADDRESS":"amqp://message-queue:5672","DB_USER":"postgres","DB_PASS":"example","DB_URL":"test_db","DB_NAME":"test_db"}}},"webPage":{"location":"web page"},"migrations":{"location":"migrations"},"seeds":{"location":""},"database":"localtestdb","logo":"logo512.png","text":"Enter your experiment description here.","tagline":"Be a citizen scientist! Try this quiz.","duration":"","productionDB":"Main"} Loading migrations for whichenglish expConfig: {"experimentName":"whichenglish","shortName":"whichenglish","apiControllers":{"mountPath":"whichenglish","location":"api controllers","name":"mycontroller"},"worker":{"location":"worker","service":{"image":"whichenglish","links":["message-queue","test_db"],"environment":{"AMQP_ADDRESS":"amqp://message-queue:5672","DB_USER":"postgres","DB_PASS":"example","DB_URL":"test_db","DB_NAME":"test_db"}}},"webPage":{"location":"web page"},"migrations":{"location":"migrations"},"seeds":{"location":""},"database":"localtestdb","logo":"logo512.png","text":"Enter your experiment description here.","tagline":"Be a citizen scientist! Try this quiz.","duration":"","productionDB":"Main"} starting migrations.... migAndSeedDirs: [ { migrations: '/home/gepping/pushkin_quickstart/users/migrations', seeds: '' }, { migrations: '/home/gepping/pushkin_quickstart/experiments/mind/migrations', seeds: '/home/gepping/pushkin_quickstart/experiments/mind' }, { migrations: '/home/gepping/pushkin_quickstart/experiments/vocab/migrations', seeds: '/home/gepping/pushkin_quickstart/experiments/vocab' }, { migrations: '/home/gepping/pushkin_quickstart/experiments/whichenglish/migrations', seeds: '/home/gepping/pushkin_quickstart/experiments/whichenglish' } ] db: Main FS-related option specified for migration configuration. This resets migrationSource to default FsMigrations Error: Command failed: aws cloudfront create-distribution --distribution-config '{"CallerReference":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f","Aliases":{"Quantity":2,"Items":["cognition-exp.com","www.cognition-exp.com"]},"DefaultRootObject":"index.html","Origins":{"Quantity":1,"Items":[{"Id":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f","DomainName":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f.s3.amazonaws.com","OriginPath":"","CustomHeaders":{"Quantity":0},"S3OriginConfig":{"OriginAccessIdentity":""},"ConnectionAttempts":3,"ConnectionTimeout":10}]},"OriginGroups":{"Quantity":0},"DefaultCacheBehavior":{"TargetOriginId":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f","TrustedSigners":{"Enabled":false,"Quantity":0},"ViewerProtocolPolicy":"redirect-to-https","AllowedMethods":{"Quantity":2,"Items":["HEAD","GET"],"CachedMethods":{"Quantity":2,"Items":["HEAD","GET"]}},"SmoothStreaming":false,"Compress":false,"LambdaFunctionAssociations":{"Quantity":0},"FieldLevelEncryptionId":"","CachePolicyId":"658327ea-f89d-4fab-a63d-7e88639e58f6"},"CacheBehaviors":{"Quantity":0},"CustomErrorResponses":{"Quantity":1,"Items":[{"ErrorCode":403,"ResponsePagePath":"/index.html","ResponseCode":"200","ErrorCachingMinTTL":60}]},"Comment":"","Logging":{"Enabled":false,"IncludeCookies":false,"Bucket":"","Prefix":""},"PriceClass":"PriceClass_All","Enabled":true,"ViewerCertificate":{"CloudFrontDefaultCertificate":false,"MinimumProtocolVersion":"TLSv1.2_2019","CertificateSource":"cloudfront","ACMCertificateArn":"arn:aws:acm:us-east-1:458085388936:certificate/386cc548-7654-4bde-850b-1947f16f4eee","SSLSupportMethod":"sni-only"},"Restrictions":{"GeoRestriction":{"RestrictionType":"none","Quantity":0}},"WebACLId":"","HttpVersion":"http2","IsIPV6Enabled":true}' --profile default An error occurred (InvalidViewerCertificate) when calling the CreateDistribution operation: The certificate that is attached to your distribution doesn't cover the alternate domain name (CNAME) that you're trying to add. For more details, see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-requirements at ChildProcess.exithandler (child_process.js:308:12) at ChildProcess.emit (events.js:315:20) at maybeClose (internal/child_process.js:1048:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) { killed: false, code: 254, signal: null, cmd: `aws cloudfront create-distribution --distribution-config '{"CallerReference":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f","Aliases":{"Quantity":2,"Items":["cognition-exp.com","www.cognition-exp.com"]},"DefaultRootObject":"index.html","Origins":{"Quantity":1,"Items":[{"Id":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f","DomainName":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f.s3.amazonaws.com","OriginPath":"","CustomHeaders":{"Quantity":0},"S3OriginConfig":{"OriginAccessIdentity":""},"ConnectionAttempts":3,"ConnectionTimeout":10}]},"OriginGroups":{"Quantity":0},"DefaultCacheBehavior":{"TargetOriginId":"cognitionexp6f35833f-e936-4b50-a375-d2a6e5099d7f","TrustedSigners":{"Enabled":false,"Quantity":0},"ViewerProtocolPolicy":"redirect-to-https","AllowedMethods":{"Quantity":2,"Items":["HEAD","GET"],"CachedMethods":{"Quantity":2,"Items":["HEAD","GET"]}},"SmoothStreaming":false,"Compress":false,"LambdaFunctionAssociations":{"Quantity":0},"FieldLevelEncryptionId":"","CachePolicyId":"658327ea-f89d-4fab-a63d-7e88639e58f6"},"CacheBehaviors":{"Quantity":0},"CustomErrorResponses":{"Quantity":1,"Items":[{"ErrorCode":403,"ResponsePagePath":"/index.html","ResponseCode":"200","ErrorCachingMinTTL":60}]},"Comment":"","Logging":{"Enabled":false,"IncludeCookies":false,"Bucket":"","Prefix":""},"PriceClass":"PriceClass_All","Enabled":true,"ViewerCertificate":{"CloudFrontDefaultCertificate":false,"MinimumProtocolVersion":"TLSv1.2_2019","CertificateSource":"cloudfront","ACMCertificateArn":"arn:aws:acm:us-east-1:458085388936:certificate/386cc548-7654-4bde-850b-1947f16f4eee","SSLSupportMethod":"sni-only"},"Restrictions":{"GeoRestriction":{"RestrictionType":"none","Quantity":0}},"WebACLId":"","HttpVersion":"http2","IsIPV6Enabled":true}' --profile default`, stdout: '', stderr: '\n' + "An error occurred (InvalidViewerCertificate) when calling the CreateDistribution operation: The certificate that is attached to your distribution doesn't cover the alternate domain name (CNAME) that you're trying to add. For more details, see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-requirements\n" }

When I go to https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-requirements, I notice one of the requirements is: "All alternate domain names (CNAMEs) must be lowercase to be valid"

So, I'm guessing that my program is failing because my registered domain has a hyphen in it, but I'd appreciate it if someone else could take a look at the error message so that I don't go and unnecessarily purchase another domain name. Thanks!

@jkhartshorne jkhartshorne added bug Something isn't working help wanted Extra attention is needed labels Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants