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 create-local. HTTP error creating the subgraph: ECONNRESET #1132

Closed
Fi1osof opened this issue Aug 25, 2019 · 6 comments
Closed

Error create-local. HTTP error creating the subgraph: ECONNRESET #1132

Fi1osof opened this issue Aug 25, 2019 · 6 comments

Comments

@Fi1osof
Copy link

Fi1osof commented Aug 25, 2019

bug

What is the current behavior?

 yarn create-local

Got

graph create fi1osof/first --node http://127.0.0.1:8020
✖ HTTP error creating the subgraph: ECONNRESET

I checked listeners:

sudo lsof -i :8000
COMMAND     PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
docker-pr 10673 root    4u  IPv6 22080510      0t0  TCP *:8000 (LISTEN)

sudo lsof -i :8020
COMMAND     PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
docker-pr 10651 root    4u  IPv6 22081370      0t0  TCP *:8020 (LISTEN)

And seems like connection canceled, not unlistened.

 curl -v http://localhost:8020
* Rebuilt URL to: http://localhost:8020/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8020 (#0)
> GET / HTTP/1.1
> Host: localhost:8020
> User-Agent: curl/7.58.0
> Accept: */*
> 
* Recv failure: Соединение разорвано другой стороной
* stopped the pause stream!
* Closing connection 0
curl: (56) Recv failure: Соединение разорвано другой стороной

curl -v http://localhost:8021
* Rebuilt URL to: http://localhost:8021/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* connect to 127.0.0.1 port 8021 failed: В соединении отказано
* Failed to connect to localhost port 8021: В соединении отказано
* Closing connection 0
curl: (7) Failed to connect to localhost port 8021: В соединении отказано

No any errors in log((

What is the expected behavior?
This will also spin up a GraphiQL interface at http://127.0.0.1:8000/

@Jannis
Copy link
Contributor

Jannis commented Aug 26, 2019

@Fi1osof Could you provide the graph-node logs? I bet it's trying to connect to Ethereum and hanging.

@Fi1osof
Copy link
Author

Fi1osof commented Aug 26, 2019

@Jannis, i understood

docker logs docker_graph-node_1
wait-for-it.sh: waiting 30 seconds for ipfs:5001
wait-for-it.sh: ipfs:5001 is available after 0 seconds
wait-for-it.sh: waiting 30 seconds for postgres:5432
wait-for-it.sh: postgres:5432 is available after 0 seconds
+ graph-node --postgres-url postgresql://graph-node:let-me-in@postgres:5432/graph-node --ethereum-rpc mainnet:http://192.168.32.1:8545 --ipfs ipfs:5001
Aug 26 16:02:09.392 INFO Graph Node version: v0.14.0+36 (fb0a4c128 2019-08-23)
Aug 26 16:02:09.392 INFO Starting up
Aug 26 16:02:09.392 INFO Trying IPFS node at: http://ipfs:5001/
Aug 26 16:02:09.407 INFO Creating transport, url: http://192.168.32.1:8545, network: mainnet
Aug 26 16:02:09.427 INFO Successfully connected to IPFS node at: http://ipfs:5001/
Aug 26 16:02:09.430 INFO Connecting to Postgres, conn_pool_size: 10, url: postgresql://graph-node:HIDDEN_PASSWORD@postgres:5432/graph-node
Aug 26 16:02:09.430 INFO Connecting to Ethereum..., network: mainnet

Aug 26 16:02:09.430 INFO Connecting to Ethereum..., network: mainnet wait to connect with ethereum and this is infinit. On first run (when I'm not sure how exactly this should work), i thought everything started successfully (because there are no errors). I think we need to add connection timeout.

I ran this script: https://github.com/graphprotocol/graph-node/blob/fb0a4c1283a6879fa670528a1fbdaebc3779d939/docker/setup.sh
and got host.docker.internal replaced with one of my ip addresses. But ethereum did not response of this (infinit connection waiting). In ganache setting was setted 127.0.0.1. I replaced with 0.0.0.0 and all connected successfuly.

Thanks!

@rajatnishu25
Copy link

i run
yarn create-local
i face this issue

$ graph create rajatnishu25/demosubgraph --node http://127.0.0.1:8020
✖ HTTP error creating the subgraph: ECONNREFUSED
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@katopz
Copy link

katopz commented Jul 14, 2021

i run
yarn create-local
i face this issue

$ graph create rajatnishu25/demosubgraph --node http://127.0.0.1:8020
✖ HTTP error creating the subgraph: ECONNREFUSED
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Try this before yarn create-local

ganache-cli -h 0.0.0.0

@bircher044
Copy link

yarn create-local
Hello!
did you fix your problem?

@gHashTag
Copy link

gHashTag commented Sep 1, 2023

Video about it

version: '3'
services:
  graph-node:
    image: graphprotocol/graph-node
    ports:
      - '8000:8000'
      - '8001:8001'
      - '8020:8020'
      - '8030:8030'
      - '8040:8040'
    depends_on:
      - ipfs
      - postgres
    environment:
      postgres_host: postgres
      postgres_user: graph-node
      postgres_pass: let-me-in
      postgres_db: graph-node
      ipfs: 'ipfs:5001'
      GRAPH_ALLOW__NON_DETERMINISTIC_IPFS: 1
      ethereum: 'You need to get an RPC endpoint from an RPC provider e.g Alchemy'
      GRAPH_LOG: info, error
  ipfs:
    image: ipfs/go-ipfs:v0.17.0
    ports:
      - '5001:5001'
    volumes:
      - ./data/ipfs:/data/ipfs
  postgres:
    image: postgres
    ports:
      - '5432:5432'
    command: ['postgres', '-cshared_preload_libraries=pg_stat_statements']
    environment:
      POSTGRES_USER: graph-node
      POSTGRES_PASSWORD: let-me-in
      POSTGRES_DB: graph-node
      POSTGRES_INITDB_ARGS: '-E UTF8 --locale=C'
    volumes:
      - ./data/postgres:/var/lib/postgresql/data

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

6 participants