0

I want to run graph-node (The Graph) in an Amazon EC2 Instance.

I have setup everything with docker-compose and the 3 containers (graph-node, ipfs and postgres) are running smoothly.

I have also setup my own version of a subgraph, based on the Open Zeppelin's implementation (@openzeppelin/subgraphs).

The problem arises when I want to deploy the subgraph by running the following command:

graph deploy --ipfs http://localhost:5001 --node http://localhost:8020 generated/sample ./generated/sample.subgraph.yaml

I am getting:

*** stack smashing detected ***: terminated Aborted (core dumped)

My EC2 Instance has 8 vCPUs and 32 GiB RAM. This is double what I have on my localhost and where it worked perfectly.

1 Answer 1

0

The problem I was having was related to using the sudo command to run:

  • docker
  • docker-compose
  • npm

What I did to avoid this was:

  1. Create a new user graph to avoid having permission errors when trying to install npm packages globally

  2. Add graph user to newly created docker group to avoid using sudo to run both docker and docker-compose (refer to method 3 of this link)

After doing this, the error disappeared (I was probably accessing prohibited areas of the stack by abusing of the sudo command).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.