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

graphql.request.error #7

Open
rasser900 opened this issue Apr 6, 2020 · 1 comment
Open

graphql.request.error #7

rasser900 opened this issue Apr 6, 2020 · 1 comment

Comments

@rasser900
Copy link

I was following the setup here, but when it comes to actually connecting the local machine to the remote, I keep getting these errors:

error: graphql.request.error {"url":"http://172.18.0.2:9000/graphql","query":"mutation ServerInfo {\n viewer {\n id\n }\n}","variables":{},"error":"FetchError: request to http://172.18.0.2:9000/graphql failed, reason: connect ECONNREFUSED 172.18.0.2:9000"}

error: graphql.request.retry {"query":"mutation ServerInfo {\n viewer {\n id\n }\n}","attempt":1}
error: graphql.request.error {"url":"http://172.18.0.2:9000/graphql","query":"mutation ServerInfo {\n viewer {\n id\n }\n}","variables":{},"error":"FetchError: request to http://172.18.0.2:9000/graphql failed, reason: connect ECONNREFUSED 172.18.0.2:9000"}

error: graphql.request.retry {"query":"mutation ServerInfo {\n viewer {\n id\n }\n}","attempt":2}
error: graphql.request.error {"url":"http://172.18.0.2:9000/graphql","query":"mutation ServerInfo {\n viewer {\n id\n }\n}","variables":{},"error":"FetchError: request to http://172.18.0.2:9000/graphql failed, reason: connect ECONNREFUSED 172.18.0.2:9000"}

error: graphql.request.retry {"query":"mutation ServerInfo {\n viewer {\n id\n }\n}","attempt":3}

This appears to be a problem with connections inside the docker containers rather than a problem between my server and client.
Docker version 19.03.6, build 369ce74a3c
Node version: v10.15.2
docker-compose version 1.25.4, build 8d51620a

Using ubuntu 19.10 on the local machine.

@vicjicaman
Copy link
Owner

Hi
Sorry for the delay, this error means that there is an issue with the connection from the client to the server.

  • Please check that the generated client keys are copied to the server.
  • Check that the server is reachable from the client
  • Check that you are using the same device name than for the generated key.
  • Make sure that the server side is up and running

This is a service tunnel that is open from the client to the server graph to get the information from all the other inlets and outlets internally.

I am using this call to open the tunnel, you can find the key file, server host:port and try on a console as well.
const tunnel = await TunnelApi.listen(
"server.target",
[
{
source: {
host: "graph",
port: 17007
},
dest: {
host: "0.0.0.0",
port: 9000
}
}
],
{
key: path.join(keys.folder, deviceid, "key"),
user: "node",
host: server.host,
port: server.port
},
cxt
);

Please let me know if this was helpful, I will came up with a script to better diagnostic this issue

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

2 participants