<#CP2HDHKE1|ask-the-community> I am still stuck on...
# ask-the-community
s
#ask-the-community I am still stuck on the flytectl vs flytekit.remote not showing consisten behaviour. flytectl get projects works fine with clientsecret method but flytekit.remote throws the below error {"asctime": "2023-01-31 124443,934", "name": "flytekit.remote", "levelname": "WARNING", "message": "This feature is still in beta. Its interface and UX is subject to change."} {"asctime": "2023-01-31 124443,997", "name": "flytekit.cli", "levelname": "ERROR", "message": "Unauthenticated RPC error <_InactiveRpcError of RPC that terminated with:\n\tstatus = StatusCode.UNAUTHENTICATED\n\tdetails = \"token parse error [JWT_VERIFICATION_FAILED] Could not retrieve id token from metadata, caused by: rpc error: code = Unauthenticated desc = Request unauthenticated with IDToken\"\n\tdebug_error_string = \"UNKNOWN:Error received from peer ipv410.183.180.0443 {created_time:\"2023-01-31T124443.996825038+02:00\", grpc_status:16, grpc_message:\"token parse error [JWT_VERIFICATION_FAILED] Could not retrieve id token from metadata, caused by: rpc error: code = Unauthenticated desc = Request unauthenticated with IDToken\"}\"\n>, refreshing credentials and retrying\n"} ^CProcess ForkProcess-1: Traceback (most recent call last): File "/home/samuel/.local/lib/python3.8/site-packages/flytekit/clients/raw.py", line 150, in handler return fn(*args, **kwargs) File "/home/samuel/.local/lib/python3.8/site-packages/flytekit/clients/raw.py", line 448, in list_workflows_paginated return self._stub.ListWorkflows(resource_list_request, metadata=self._metadata) File "/home/samuel/.local/lib/python3.8/site-packages/grpc/_channel.py", line 946, in call return _end_unary_response_blocking(state, call, False, None) File "/home/samuel/.local/lib/python3.8/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.UNAUTHENTICATED details = "token parse error [JWT_VERIFICATION_FAILED] Could not retrieve id token from metadata, caused by: rpc error: code = Unauthenticated desc = Request unauthenticated with IDToken" debug_error_string = "UNKNOWN:Error received from peer ipv410.183.180.0443 {created_time:"2023-01-31T124443.996825038+02:00", grpc_status:16, grpc_message:"token parse error [JWT_VERIFICATION_FAILED] Could not retrieve id token from metadata, caused by: rpc error: code = Unauthenticated desc = Request unauthenticated with IDToken"}"
n
what does
echo $FLYTECTL_CONFIG
say? what configuration are you using for
FlyteRemote
? also, can you share commands/code you’re using?
s
from pathlib import Path import grpc from flytekit.remote import FlyteRemote grpc_credentials = grpc.ssl_channel_credentials( root_certificates=Path("/etc/ssl/certs/ca-certificates.crt").read_bytes(), ) remote = FlyteRemote.from_config( default_project="samuel-s3-test", default_domain="development", grpc_credentials=grpc_credentials, config_file_path="/home/samuel/.flyte/config", ) workflow = remote.fetch_workflow(name="s3_test.my_workflow.my_test_workflow") # Training loop starts here: workflow_execution_60 = remote.execute( workflow, wait=False, )
@Niels Bantilan @Ketan (kumare3) FLYTECTL_CONFIG is set to space then also this doesnt work, and even when set to the correct config path it doesnt work
The result when i run the above program is {"asctime": "2023-02-04 174521,490", "name": "flytekit.remote", "levelname": "WARNING", "message": "This feature is still in beta. Its interface and UX is subject to change."} {"asctime": "2023-02-04 174521,778", "name": "flytekit.cli", "levelname": "ERROR", "message": "Unauthenticated RPC error <_InactiveRpcError of RPC that terminated with:\n\tstatus = StatusCode.UNAUTHENTICATED\n\tdetails = \"token parse error [JWT_VERIFICATION_FAILED] Could not retrieve id token from metadata, caused by: rpc error: code = Unauthenticated desc = Request unauthenticated with IDToken\"\n\tdebug_error_string = \"UNKNOWN:Error received from peer ipv487.254.212.1208080 {created_time:\"2023-02-04T174521.778246025+00:00\", grpc_status:16, grpc_message:\"token parse error [JWT_VERIFICATION_FAILED] Could not retrieve id token from metadata, caused by: rpc error: code = Unauthenticated desc = Request unauthenticated with IDToken\"}\"\n>, refreshing credentials and retrying\n"} E0204 174524.813843626 34346 thread_pool.cc:254] Waiting for thread pool to idle before forking E0204 174527.814020084 34346 thread_pool.cc:254] Waiting for thread pool to idle before forking E0204 174530.814150898 34346 thread_pool.cc:254] Waiting for thread pool to idle before forking E0204 174533.814287145 34346 thread_pool.cc:254] Waiting for thread pool to idle before forking ^C^C^CE0204 174536.814413667 34346 thread_pool.cc:254] Waiting for thread pool to idle before forking ^Z [1]+ Stopped python mul_wf.py
I also get certificate verify failed. Can you please let me know how to provide correct certificates to this flyteremote object
k
Ok let me try something- this is a self signed certificate right
s
Yes. This is a self signed certificate but signed by the organisation authority
My org.
The peer address which is given in my error is e ingress controller IP for my cluster
Again. Flytectl get projects works absolutely fine.
k
This is an issue maybe with the python Grpc client
So the new thing might do better
@Sujith Samuel Are you going to be around?
s
Hello @Ketan (kumare3) yes. Please let me know.
k
hmm i have the new auth code, but not fully tested yet
let me dm you
188 Views