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

Unable to debug PyCharm default Flask Application #3181

Open
natgainer opened this issue Feb 2, 2024 · 4 comments
Open

Unable to debug PyCharm default Flask Application #3181

natgainer opened this issue Feb 2, 2024 · 4 comments

Comments

@natgainer
Copy link

I have created the default flask app and wanted to make sure I have everything working. I am able to run locally and deploy, but I get the error in the attached screen shot. I tried to run:
`kubectl logs timeline-655f887ccb-6kthk -n default -c timeline-container
which was specified in the error and I get this error.

E0202 13:26:01.761715 3188 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

Screenshot 2024-02-02 125637

Additional Information

  • IDE type (e.g. IntelliJ, Pycharm): PyCharm
  • IDE version: 2023.3.3
  • Cloud Code version (Settings > Plugins > Cloud Code): 24.1.3
  • Cloud SDK (Settings > Cloud Code > Cloud SDK)
    • Are you allowing the plugin to manage the Cloud SDK: Y
    • Version of the Cloud SDK:
  • Skaffold version (If you are using Kubernetes features; Settings > Cloud Code > Kubernetes): 2.10.0
  • Operating System: Windows

Feel free to deviate from this template as needed, especially if you are submitting a feature request.

@ivanporty
Copy link
Contributor

Thanks for the report @natgainer

I am able to run locally and deploy

Could you explain a bit more what exactly is not working after that?

couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

It seems you app tries to connect to a local memcache server and fails - does it run as part of your Cloud Run application? Normally, CR app runs as a single container and handles a single port.

@natgainer
Copy link
Author

The error that you are asking about is what I get when I run:
kubectl logs timeline-655f887ccb-6kthk -n default -c timeline-container

This was in the output from the original error when the deployment fails. I'm not really familiar with Kubernetes, but wonder if I have something configured incorrectly. It does work when I run locally. It just doesn't work when I execute it with debug.

@natgainer
Copy link
Author

I'm still at a loss as to why I cannot run the default Cloud Run flask program in debug. I have reset docker to default settings and renabled Kubernetes. I'm a newbie and don't know a lot about Kubernetes and Docker. It runs without errors locally. Any thoughts or suggestions out there? My project is called timeline and attached is the output from my debug run.
DebugErrorScreen

@natgainer
Copy link
Author

I have uninstalled pycharm and reinstalled. I have utilized a virtual environment interpreter, local interpreter and a docker interpreter. All with the same result. If anyone has any ideas to try, please let me know. In my searches, I haven't found an issue exactly the same. The reason that I bought the developer version of pycharm was to be able to debug. I would also appreciate any help to debug the container to see why container install-python-debug-support is failing. I haven't been able to find any logs in docker which indicates the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants