Unable to connect to server - 14 UNAVAILABLE: Trying to connect an http1.x server
labs20 opened this issue · 3 comments
Hi. Runing DGraph 1.0.5, dgraph-js 1.2.1 and grpc 1.12.3.
Working with everything installed until now at my own machine (Mac Air), all good, no problems. Installed a new server on a windows machine to centralize things and when I try to connect to it I got this error:
Error: 14 UNAVAILABLE: Trying to connect an http1.x server
My test function:
async test(){
const dgraph = require("dgraph-js")
, grpc = require("grpc")
, clientStub = new dgraph.DgraphClientStub(
"192.168.0.253:8080", grpc.credentials.createInsecure()
)
, dgraphClient = new dgraph.DgraphClient(clientStub)
;
let res = await dgraphClient.newTxn().query(`
{
query(func: has(__is_pessoas), first: 10){
uid
app
descricao
}
}
`)
, ppl = res.getJson()
;
}
If I start ratel locally on my mac and try to connect to that same address with it, it works with no problems.
To clarify: I have a dev node environment on my mac, and I'm trying to connect it to a DGraph server on a windows machine on my network, that should be like a central database for al devs, and the the error ocourrs.
Help, please?
You're using the wrong port. It should be 9090. Look at ports usage:
https://docs.dgraph.io/deploy/
But Ratel is connecting trough that exactly address, and changing it its giving me Connect Failed instead.
Let me double check things here.
P.s: mmmmm... its because ratel is probably connecting trough http protocol, and thus the 8080.