vaticle / typedb-driver-python

TypeDB Driver for Python
https://typedb.com
Apache License 2.0
67 stars 25 forks source link

GRPC method not found #302

Closed priamai closed 1 year ago

priamai commented 1 year ago

Description

The TypeDB client triggers a GRPC error when creating a connection.

Environment

Linux for now

Reproducible Steps

Run this docker composer file: https://github.com/os-threat/os-intel/blob/dev/demo/docker-compose.yml

Expected Output

A connection should be established.

Actual Output

This GRPC error is triggered:

grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
2023-06-29T11:54:59.327217934Z  status = StatusCode.UNIMPLEMENTED
2023-06-29T11:54:59.327222688Z  details = "Method not found: typedb.protocol.TypeDB/connection_open"
2023-06-29T11:54:59.327227161Z  debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2023-06-29T11:54:59.325427742+00:00", grpc_status:12, grpc_message:"Method not found: typedb.protocol.TypeDB/connection_open"}"
2023-06-29T11:54:59.327231853Z 

Additional information

We don't really have a clue about the GRPC protocol we have been tracing the error but I can't figure out if is vaticle related (server GRPC) or client related (the python library).

@SullivanDaly

flyingsilverfin commented 1 year ago

Hiya, this means that you're using an incompatible client-server protocol, please check that you're on the latest for both :)

priamai commented 1 year ago

You but as you can see from the requirements this is a fresh setup which relies on vaticle package.

typedb-client==2.18.0 typedb-protocol==2.18.0

Latest image from Vaticle is also 2.18.0

flyingsilverfin commented 1 year ago

This error implies you're using a client that is newer than the server, ie. your server is somehow not version 2.18.0 :)

priamai commented 1 year ago

Thanks for the suggestion, you were right in fact fixing the docker with the version 2.18.0 did the trick:

version: "3.8"

services:
  typedb:
    image: vaticle/typedb:2.18.0
    ports:
      - "1729:1729"

  connection:
    image: osthreat/osintel:test
    working_dir: /app
    build:
      target: base
      context: .
      dockerfile: Dockerfile
    depends_on:
      - typedb

What is super bizarre to me is that if you look at latest vs 2.18.0 they look identical:

image

But this is clearly not the case since it triggers the error when I use the latest version.

flyingsilverfin commented 1 year ago

Interesting, they should be. Does the 'latest' changing now get used automatically in docker?

priamai commented 1 year ago

Hi, I am not sure what is the default docker behaviour when you specify a tag,I am assuming probably it just takes the latest one. Well at least now if somebody encounters this issue will find this page and resolve it. Cheers!