GoogleCloudPlatform / datacatalog-connectors-hive

Sample code with integration between Data Catalog and Hive data source.
Apache License 2.0
25 stars 14 forks source link

cant authenticate in google oauth [BUG] #29

Closed iliakliuchnikov closed 2 years ago

iliakliuchnikov commented 2 years ago

i created sa, created key in json format, but connector wont start

`==============Ingest metadata=============== DEBUG:google.auth._default:Checking /creds.json for explicit credentials as part of auth process... INFO:root: INFO:root:Starting to clean up the catalog... DEBUG:google.auth.transport.requests:Making request: POST https://oauth2.googleapis.com/token DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): oauth2.googleapis.com:443 DEBUG:urllib3.connectionpool:https://oauth2.googleapis.com:443 "POST /token HTTP/1.1" 200 None INFO:root:0 entries that match the search query exist in Data Catalog! INFO:root:Looking for entries to be deleted... INFO:root:0 entries will be deleted. INFO:root: Starting to ingest custom metadata... DEBUG:google.auth._default:Checking /creds.json for explicit credentials as part of auth process... INFO:root: INFO:root:Starting the ingestion flow... DEBUG:google.auth.transport.requests:Making request: POST https://oauth2.googleapis.com/token DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): oauth2.googleapis.com:443 DEBUG:urllib3.connectionpool:https://oauth2.googleapis.com:443 "POST /token HTTP/1.1" 200 None Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 67, in error_remappedcallable return callable(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 946, in call return _end_unary_response_blocking(state, call, False, None) File "/usr/local/lib/python3.7/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking raise _InactiveRpcError(state) grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNIMPLEMENTED details = "Received http2 header with status: 404" debug_error_string = "{"created":"@1637138035.284153206","description":"Received http2 :status header with non-200 OK status","file":"src/core/ext/filters/http/client/http_client_filter.cc","file_line":133,"grpc_message":"Received http2 header with status: 404","grpc_status":12,"value":"404"}"

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/bin/google-datacatalog-hive-connector", line 8, in sys.exit(main()) File "/usr/local/lib/python3.7/site-packages/google/datacatalog_connectors/hive/datacatalog_cli.py", line 87, in main Hive2DatacatalogCli().run(argv[1:] if len(argv) > 0 else argv) File "/usr/local/lib/python3.7/site-packages/google/datacatalog_connectors/hive/datacatalog_cli.py", line 46, in run enable_monitoring=args.enable_monitoring).run() File "/usr/local/lib/python3.7/site-packages/google/datacatalog_connectors/hive/sync/datacatalog_synchronizer.py", line 126, in run self.ingest_created_or_updated(prepared_entries) File "/usr/local/lib/python3.7/site-packages/google/datacatalog_connectors/hive/sync/datacatalog_synchronizer.py", line 141, in ingest_created_or_updated ingestor.ingest_metadata([database_entry, table_related_entries]) File "/usr/local/lib/python3.7/site-packages/google/datacatalog_connectors/commons/ingest/datacatalog_metadata_ingestor.py", line 56, in ingest_metadata entry_group_id=self.__entry_group_id) File "/usr/local/lib/python3.7/site-packages/google/datacatalog_connectors/commons/datacatalog_facade.py", line 255, in create_entry_group entry_group=datacatalog.EntryGroup()) File "/usr/local/lib/python3.7/site-packages/google/cloud/datacatalog_v1beta1/services/data_catalog/client.py", line 539, in create_entry_group response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) File "/usr/local/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py", line 145, in call return wrapped_func(args, **kwargs) File "/usr/local/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 69, in error_remapped_callable six.raise_from(exceptions.from_grpc_error(exc), exc) File "", line 3, in raise_from google.api_core.exceptions.MethodNotImplemented: 501 Received http2 header with status: 404`

iliakliuchnikov commented 2 years ago

typo in DATACATALOG_LOCATION_ID