Grakn python driver: Server/network error


#1

Hi

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/__init__.py", 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/TransactionService.py", line 39, in __init__
self._communicator.send(open_req)
  File "/Users/nathanjohnson/.local/share/virtualenvs/graql-service-nYj9TDyY/lib/python3.6/site-packages/grakn/service/Session/TransactionService.py", 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/client_channel.cc","file_line":2636,  "referenced_errors":[{"created":"@1538404868.036913000","description":"Name resolution failure","file":"src/core/ext/filters/client_channel/client_channel.cc","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(Status.java:517)
	at io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onCancel(ServerCalls.java:272)
	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.closed(ServerCallImpl.java:281)
	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1Closed.runInContext(ServerImpl.java:679)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

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.

Thanks

Nathan


#2

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 https://github.com/grpc/grpc/issues/15106

Maybe @kasper has some ideas?


#3

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.

:confused:


#4

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


#5

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.


#6

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