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

[ERROR] (rapid) Invoke failed error=ErrAgentNameCollision #1

Closed
HarryGreene-CS opened this issue Aug 16, 2024 · 7 comments
Closed

[ERROR] (rapid) Invoke failed error=ErrAgentNameCollision #1

HarryGreene-CS opened this issue Aug 16, 2024 · 7 comments

Comments

@HarryGreene-CS
Copy link

HarryGreene-CS commented Aug 16, 2024

Trying to run this example as a first step towards debugging my own canary implementation.

I'm currently getting

2024-08-15 22:48:39.473 [info] 15 Aug 2024 21:48:39,469 [ERROR] (rapid) Init failed error=signal: segmentation fault InvokeID=
2024-08-15 22:48:39.474 [info] 15 Aug 2024 21:48:39,473 [ERROR] (rapid) Invoke failed error=ErrAgentNameCollision InvokeID=9182de77-02ad-4af3-b20b-fb06a4feb8b0
2024-08-15 22:48:39.476 [info] 15 Aug 2024 21:48:39,474 [ERROR] (rapid) Invoke DONE failed: Sandbox.Failure

I have followed the instructions in the documentation, and updated only the bucket name and synthetic lambda layer to one in eu-west-2. (arn:aws:lambda:eu-west-2:565831452869:layer:Synthetics:44).

This issue seems to be the only lead I have, though I have tried many different layers (all within eu-west-2 mind) and they all render the same result.

@kali-in
Copy link

kali-in commented Aug 29, 2024

Getting the same error for the Sydney region. Testing this on Mac Silicon (so arm architecture)

@lazaromedina
Copy link

Same here arm apple M3, eu-west-1

03 Nov 2024 11:02:43,299 [ERROR] (rapid) Init failed error=signal: segmentation fault InvokeID=
03 Nov 2024 11:02:43,303 [ERROR] (rapid) Invoke failed error=ErrAgentNameCollision InvokeID=b8549c34-ea33-4e51-b252-3f19384f540d
03 Nov 2024 11:02:43,305 [ERROR] (rapid) Invoke DONE failed: Sandbox.Failure

@HarryGreene-CS
Copy link
Author

Yes, apologies for not giving more information. I am also on M3 Mac arch.

@csreddy
Copy link

csreddy commented Nov 4, 2024

There is an issue with Docker Desktop for Mac. Similar issue was found with aws-sam-cli which was resolved in Docker 4.34.0 but did not for our issue. We have identified a workaround to disable extensions during SAM local invoke. To disable extensions you need to create layer (as instructed below) and specify in SAM template.

  1. Create a file with the exact name disable-extensions-jwigqn8j. The content of the file does not matter, you can put any text in it but don't leave it empty.
  2. Zip the file.
  3. Create a Lambda layer using the zipped file.
  4. In the SAM template, include the Lambda layer you created along with the Synthetics runtime layer.
  5. Run sam build. You should now be able to run canary locally with sam local invoke.

We have also raised PR to disable extension using env variable so you don't need to create layer. Until its merged and makes it way into latest nodejs images, use this workaround to unblock immediately.

@lazaromedina
Copy link

Hi @csreddy, thank you very much, workaround is woking

2024-11-08T08:02:44.045Z        dff495f4-b510-4ecb-869b-ab30ec14b8fc    INFO    Request: GET https://www.example.com/; ResourceType: document
2024-11-08T08:02:45.173Z        dff495f4-b510-4ecb-869b-ab30ec14b8fc    INFO    Response: 200 https://www.example.com/

@csreddy
Copy link

csreddy commented Nov 27, 2024

Thank you for confirming!

@csreddy csreddy closed this as completed Nov 27, 2024
@jorgellanos91
Copy link

jorgellanos91 commented Jan 13, 2025

There is an issue with Docker Desktop for Mac. Similar issue was found with aws-sam-cli which was resolved in Docker 4.34.0 but did not for our issue. We have identified a workaround to disable extensions during SAM local invoke. To disable extensions you need to create layer (as instructed below) and specify in SAM template.

  1. Create a file with the exact name disable-extensions-jwigqn8j. The content of the file does not matter, you can put any text in it but don't leave it empty.
  2. Zip the file.
  3. Create a Lambda layer using the zipped file.
  4. In the SAM template, include the Lambda layer you created along with the Synthetics runtime layer.
  5. Run sam build. You should now be able to run canary locally with sam local invoke.

We have also raised PR to disable extension using env variable so you don't need to create layer. Until its merged and makes it way into latest nodejs images, use this workaround to unblock immediately.

Hey @csreddy thanks a lot for your workaround! It works!

Unfortunately for my scenario, I need layers with some node js dependencies, overriding my layers with the workaround solves the error=ErrAgentNameCollision problem with RIE but leaves my Synthetic without dependencies and failing to do them.

  1. Do you know anything else that you can share about the problem with Docker Desktop on macOS? I'm curious to know how you found the relationship between the RIA error and layers, and I'm also curious because maybe I can do something on my local Docker Desktop to solve it if there's no news about Docker fixing this.

  2. Is there any way to use your workaround and also load dependencies from the layers?

Briefly describing my original situation I was using something like

      Layers:
        # Synthetics runtime layer
        # Use the appropriate Layer ARN to run your canary against the intended Synthetics runtime in the desired AWS region.
        # Refer to the CloudWatch Synthetics documentation to find the Layer ARN list for the supported runtimes in all supported AWS Regions.
        # https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Debug_Locally.html#CloudWatch_Synthetics_Debug_DifferentRuntime
         - arn:aws:lambda:us-west-2:760325925879:layer:Synthetics:56 # syn-nodejs-puppeteer-9.0
         - arn:aws:lambda:us-west-2:***:layer:**********************:1
      Role: !GetAtt CanaryExecutionRole.Arn

on my template.yml

and I solved the RIA problem with

      Layers:
        # Synthetics runtime layer
        # Use the appropriate Layer ARN to run your canary against the intended Synthetics runtime in the desired AWS region.
        # Refer to the CloudWatch Synthetics documentation to find the Layer ARN list for the supported runtimes in all supported AWS Regions.
        # https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Debug_Locally.html#CloudWatch_Synthetics_Debug_DifferentRuntime
         - arn:aws:lambda:us-west-2:760325925879:layer:Synthetics:56 # syn-nodejs-puppeteer-9.0
         - arn:aws:lambda:us-west-2:***:layer:**********************:1
         - arn:aws:lambda:us-west-2:***:layer:disable-extensions-jwigqn8j:1
      Role: !GetAtt CanaryExecutionRole.Arn

Thanks a lot!

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

5 participants