Skip to content

Synthetic canary Error: net::ERR_NAME_NOT_RESOLVED

0

**Trying to test URL Heartbeat through canary. Running canary inside VPC only **

I am trying to test an application URL(https://sample.com/) that is inside VPC network. Getting below error. Error: net::ERR_NAME_NOT_RESOLVED at https://sample.com/ Stack: Error: net::ERR_NAME_NOT_RESOLVED at https://sample.com/ at navigate (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:178:27) at async Deferred.race (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/util/Deferred.js:36:20) at async CdpFrame.goto (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js:144:25) at async CdpPage.goto (/opt/nodejs/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:588:20) at async /opt/nodejs/node_modules/pageLoadBlueprint.js:77:26 at async Synthetics.executeStep (/opt/nodejs/node_modules/Synthetics.js:607:31) at async loadUrl (/opt/nodejs/node_modules/pageLoadBlueprint.js:69:5) at async loadBlueprint (/opt/nodejs/node_modules/pageLoadBlueprint.js:38:9) at async exports.handler (/opt/nodejs/node_modules/pageLoadBlueprint.js:107:12) at async exports.handler (/var/task/index.js:92:24)

It works fine, if I test the URL(https://.../) by providing IP address.

1 Answer
0

The error you're encountering (net::ERR_NAME_NOT_RESOLVED) suggests that the canary is unable to resolve the domain name of your application URL. This is likely because the canary is running outside your VPC and doesn't have access to the internal DNS resolution for your VPC network.

To resolve this issue, you should configure your CloudWatch Synthetics canary to run within your VPC. This will allow the canary to access internal resources and resolve internal DNS names. Here are the steps to address this:

  1. Set up your canary to use VPC configuration. When creating or editing the canary, you'll need to specify the VPC, subnets, and security groups that the canary should use.

  2. Ensure that the VPC you're using for the canary has the necessary network configuration to reach your application. This includes proper routing and security group rules.

  3. Make sure the canary's execution role has the necessary permissions to create network interfaces in your VPC.

  4. If your application uses private DNS, ensure that the VPC has DNS hostnames and DNS resolution enabled.

  5. Check that the security groups associated with your canary allow outbound traffic to your application, and that the application's security group allows inbound traffic from the canary's security group.

By running the canary inside your VPC, it should be able to resolve and access the internal URL (https://sample.com/) just as it can with the IP address.

If you continue to experience issues after configuring the canary to run in your VPC, you may need to further troubleshoot your VPC networking configuration or consult AWS support for more specific guidance related to your setup.

Remember to clean up any resources you create during testing to avoid unnecessary charges.

Sources
Canary - Amazon CloudWatch Synthetics
Troubleshooting a failed canary - Amazon CloudWatch

answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.