vaticle / typedb-ml

TypeDB-ML is the Machine Learning integrations library for TypeDB
https://vaticle.com
Apache License 2.0
552 stars 93 forks source link

GraknError: Server/network error: <_Rendezvous of RPC that terminated with: #133

Closed WeiYangBin closed 4 years ago

WeiYangBin commented 4 years ago

I ran the following code python-KGMS and kglib-master/kglib/kgcn/examples/diagnosis/diagnosis.py report same error.

and i have turn on the environment

====================================================================================================
      ________  _____     _______  __    __  __    __      _______  _______  _____     _______
     |   __   ||   _  \  |   _   ||  |  /  /|  \  |  |    |   _   ||   _   ||   _  \  |   ____|
     |  |  |__||  | |  | |  | |  ||  | /  / |   \ |  |    |  | |__||  | |  ||  | |  | |  |
     |  | ____ |  |_| /  |  |_|  ||  |/  /  |    \|  |    |  |     |  | |  ||  |_| /  |  |____
     |  ||_   ||   _  \  |   _   ||   _  \  |   _    |    |  |  __ |  | |  ||   _  \  |   ____|
     |  |__|  ||  | \  \ |  | |  ||  | \  \ |  | \   |    |  |_|  ||  |_|  ||  | \  \ |  |____
     |________||__|  \__\|__| |__||__|  \__\|__|  \__|    |_______||_______||__|  \__\|_______|

                                         THE KNOWLEDGE GRAPH
====================================================================================================
                                                                                      Version:  1.7.1
Storage: RUNNING
Grakn Core Server: RUNNING

Error:

In [8]: from grakn.client import GraknClient 
   ...:  
   ...: with GraknClient(uri="localhost:48555") as client: 
   ...:     with client.session(keyspace="social_network") as session: 
   ...:         ## Insert a Person using a WRITE transaction 
   ...:         with session.transaction().write() as write_transaction: 
   ...:             insert_iterator = write_transaction.query('insert $x isa person, has email "x@email.com";') 
   ...:             concepts = [ans.get("x") for ans in insert_iterator] 
   ...:             print("Inserted a person with ID: {0}".format(concepts[0].id)) 
   ...:             ## to persist changes, write transaction must always be committed (closed) 
   ...:             write_transaction.commit() 
   ...:  
   ...:         ## Read the person using a READ only transaction 
   ...:         with session.transaction().read() as read_transaction: 
   ...:             answer_iterator = read_transaction.query("match $x isa person; get; limit 10;") 
   ...:  
   ...:             for answer in answer_iterator: 
   ...:                 person = answer.map().get("x") 
   ...:                 print("Retrieved person with id " + person.id) 
   ...:  
   ...:         ## Or query and consume the iterator immediately collecting all the results 
   ...:         with session.transaction().read() as read_transaction: 
   ...:             answer_iterator = read_transaction.query("match $x isa person; get; limit 10;") 
   ...:             persons = [ans.get("x") for ans in answer_iterator] 
   ...:             for person in persons: 
   ...:                 print("Retrieved person with id "+ person.id) 
   ...:                                                                                                                                                                                                            
---------------------------------------------------------------------------
_Rendezvous                               Traceback (most recent call last)
~/.local/lib/python3.6/site-packages/grakn/service/Session/TransactionService.py in send(self, request)
    160             self._add_request(request)
--> 161             response = next(self._response_iterator)
    162         except Exception as e: # specialize into different gRPC exceptions?

~/.local/lib/python3.6/site-packages/grpc/_channel.py in __next__(self)
    387     def __next__(self):
--> 388         return self._next()
    389 

~/.local/lib/python3.6/site-packages/grpc/_channel.py in _next(self)
    381                 elif self._state.code is not None:
--> 382                     raise self
    383 

_Rendezvous: <_Rendezvous of RPC that terminated with:
    status = StatusCode.INVALID_ARGUMENT
    details = ""
    debug_error_string = "{"created":"@1590652784.885279631","description":"Error received from peer ipv6:[::1]:48555","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"","grpc_status":3}"
>

During handling of the above exception, another exception occurred:

GraknError                                Traceback (most recent call last)
<ipython-input-8-cd3d1c1198cf> in <module>
      5         ## Insert a Person using a WRITE transaction
      6         with session.transaction().write() as write_transaction:
----> 7             insert_iterator = write_transaction.query('insert $x isa person, has email "x@email.com";')
      8             concepts = [ans.get("x") for ans in insert_iterator]
      9             print("Inserted a person with ID: {0}".format(concepts[0].id))

~/.local/lib/python3.6/site-packages/grakn/client.py in query(self, query, infer)
    129     def query(self, query, infer=True):
    130         """ Execute a Graql query, inference is optionally enabled """
--> 131         return self._tx_service.query(query, infer)
    132     query.__annotations__ = {'query': str}
    133 

~/.local/lib/python3.6/site-packages/grakn/service/Session/TransactionService.py in query(self, query, infer)
     47         request = RequestBuilder.query(query, infer=infer)
     48         # print("Query request: {0}".format(request))
---> 49         response = self._communicator.send(request)
     50         # convert `response` into a python iterator
     51         return ResponseReader.ResponseReader.query(self, response.query_iter)

~/.local/lib/python3.6/site-packages/grakn/service/Session/TransactionService.py in send(self, request)
    163             # invalidate this communicator, functionally this occurs automatically on exception (iterator not usable anymore)
    164             self._closed = True
--> 165             raise GraknError("Server/network error: {0}\n\n generated from request: {1}".format(e, request))
    166 
    167         if response is None:

GraknError: Server/network error: <_Rendezvous of RPC that terminated with:
    status = StatusCode.INVALID_ARGUMENT
    details = ""
    debug_error_string = "{"created":"@1590652784.885279631","description":"Error received from peer ipv6:[::1]:48555","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"","grpc_status":3}"
>

 generated from request: query_req {
  query: "insert $x isa person, has email \"x@email.com\";"
}

Environment

  1. Ubuntu 18.04
  2. Grakn Core 1.7.1, Grakn workbase 1.2.8
  3. grakn-client (1.6.1), grakn-kglib (0.2.1), graph-nets (1.0.4)
  4. Python 3.6.9
  5. Other environment details:
WeiYangBin commented 4 years ago

Grakn Core 1.7.1 does not support KGMS