Grakn python driver: Server/network error



I’m trying to use the new grakn driver on 1.3. However I am consistently getting the following error when I try to create a transaction:

   with db_session(args.keyspace).transaction(grakn.TxType.READ) as tx:
  File "/Users/nathanjohnson/.local/share/virtualenvs/graql-service-nYj9TDyY/lib/python3.6/site-packages/grakn/", line 69, in transaction
transaction_service = TransactionService(self.keyspace, tx_type, self.credentials, self._stub.transaction)
  File "/Users/nathanjohnson/.local/share/virtualenvs/graql-service-nYj9TDyY/lib/python3.6/site-packages/grakn/service/Session/", line 39, in __init__
  File "/Users/nathanjohnson/.local/share/virtualenvs/graql-service-nYj9TDyY/lib/python3.6/site-packages/grakn/service/Session/", line 149, in send
raise GraknError("Server/network error: {0}\n\n generated from request: {1}".format(e, request))
grakn.exception.GraknError.GraknError: Server/network error: <_Rendezvous of RPC 
that terminated with:
	status = StatusCode.UNAVAILABLE
	details = "Name resolution failure"
	debug_error_string = "{"created":"@1538404868.036918000","description":"Failed 
to create subchannel","file":"src/core/ext/filters/client_channel/","file_line":2636,  "referenced_errors":[{"created":"@1538404868.036913000","description":"Name resolution failure","file":"src/core/ext/filters/client_channel/","file_line":2941,"grpc_status":14}]}"
generated from request: open_req {
 keyspace: "test_keyspace_95_1"

Connecting via the console works fine:

# graql console -k test_keyspace_95_1 -e 'match $x sub thing; limit 6; get;'
{$x label thing;}
{$x label entity;}
{$x label attribute;}
{$x label relationship;}
{$x label Gene sub entity;}
{$x label Protein sub entity;}

This is what the logs say:

# tail -f ../grakn/logs/grakn.log
io.grpc.StatusRuntimeException: CANCELLED: cancelled before receiving half close
	at io.grpc.Status.asRuntimeException(
	at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onCancel(
	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closed(
	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed.runInContext(
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

btw, this is running the grakn within Docker, tested accessing locally and within the docker container. Running with a local grakn instance does not have this problem.




Hi Nathan,
I’m not very familiar with Docker, had a quick google and I’m assuming you’re using localhost:48555 rather than 127.0.01:48555 for the connection already… The only relevant thing I can find is

Maybe @kasper has some ideas?


Hi Joshua

Yes, and yes, I found that github issue too, same error but in kubernetes. Oddly though that guy has no problem with a dockerised version. So although the problem does seem to be up stream, there is obviously a setup that works for some within docker.

Looks like we might have to re-architect slightly to get around this.



Out of curiosity, does the same issue appear with client-java or client-nodejs?


Hi Joshua

I’ve not had chance to try other clients yet, but have had some success with the official grpc 1.15 container. It’s not been pushed to docker hub yet, but managed to build it from the repo:

I’ve not quite nailed what the causal factor is yet, but will update here if I manage to find out.


Excellent, we really appreciate your work on this! Thank you