Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The inputs/outputs Python code snippet leads to a "Failed to connect" error #5578

Closed
2 tasks done
ddl-rliu opened this issue Jul 22, 2024 · 2 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@ddl-rliu
Copy link
Contributor

ddl-rliu commented Jul 22, 2024

Describe the bug

The code snippet in flyteconsole leads to an error like:

FlyteSystemException: SYSTEM:Unknown: error=None, cause=InactiveRpcError ...
error = "UNKNOWN:Error received from peer  grpc_message:failed to connect to all addresses; ... "

This is because the code snippet is built around FlyteRemote.get which uses gRPC, while the code snippet generated in the Flyte UI uses window.location.host e.g. Config.for_endpoint(window.location.host), however this URL does not necessarily map to the gRPC endpoint.

Idea for Fix

Users already configure flytekit in ~/.flyte/config.yaml to set admin.endpoint to the correct gRPC endpoint. We can leverage this by using Config.auto() auto config, and building the code snippet around this Config.

Proposed fix in PR: flyteorg/flyteconsole#883

Expected behavior

The inputs/outputs Python code snippet works

Screenshots

Current behavior:
image

Proposed fix, when configured to use auto config:
image

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@ddl-rliu ddl-rliu added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Jul 22, 2024
Copy link

runllm bot commented Jul 22, 2024

The error you're encountering is likely due to a misconfiguration in the Flyte setup, specifically related to the gRPC endpoint. According to this GitHub issue, the error "failed to connect to all addresses" often occurs when the configuration file does not correctly point to the gRPC endpoint.

To resolve this, ensure that your ~/.flyte/config.yaml file is correctly configured. The admin.endpoint should point to the correct gRPC endpoint. For example:

admin:
  endpoint: dns:///localhost:30081
  authType: Pkce
  insecure: true

You can also explicitly pass the configuration file when running your Flyte commands:

pyflyte --config ~/.flyte/config.yaml run --remote example.py wf

Would you like more details on configuring Flyte or troubleshooting this issue?

Sources:


This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

Mention @RunLLM to ask follow-up questions. See runllm.com for more!

@eapolinario eapolinario self-assigned this Jul 25, 2024
@eapolinario eapolinario removed the untriaged This issues has not yet been looked at by the Maintainers label Jul 25, 2024
@eapolinario
Copy link
Contributor

It's worth mentioning that this solution only works in the cases where the default config file, i.e. ~/.flyte/config.yaml, points to the right place.

Given that the proposed solution is opt-in, this is more than acceptable. The next Flyte release is going to contain that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants