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

CLI takes a long time to exit on ctrl+c if app has not started #327

Open
LMWF opened this issue May 4, 2020 · 14 comments
Open

CLI takes a long time to exit on ctrl+c if app has not started #327

LMWF opened this issue May 4, 2020 · 14 comments
Labels
kind/bug Something isn't working P1 pinned

Comments

@LMWF
Copy link
Contributor

LMWF commented May 4, 2020

Expected Behavior

A ctrl+c to the cli should immediately kill daprd and the app and return back to the promt.

Actual Behavior

Nothing happens on screen when the user presses ctrl+c. A few seconds later something will print, then a few after that, it'll exit (see below).

Steps to Reproduce the Problem

This is on Windows (but it repros on Linux too), using a modified sample 1 that listens on the wrong app port to repro the problem.

dapr run --app-id nodeapp --app-port 3000 --port 3500 node app.js
...
...
== DAPR == time="2020-05-04T16:07:10.3584211-07:00" level=info msg="application protocol: http. waiting on port 3000. This will block until the app is listening on that port." app_id=nodeapp instance=MININT-CCBRPAO scope=dapr.runtime type=log ver=edge

..
..
<user presses ctrl+c, but nothing happens for seconds>>
..
..

Could not update sidecar metadata for cliPID: PUT http://127.0.0.1:3500/v1.0/metadata/cliPID giving up after 5 attempts
Updating metadata for app command: node app.js
Could not update sidecar metadata for appCommand: PUT http://127.0.0.1:3500/v1.0/metadata/appCommand giving up after 5 attempts
You're up and running! Both Dapr and your app logs will appear here.

The repro above is from master. This isn't a regression from 0.6 which had the same behavior, but I do remember a few releases ago the CLI did exit immediately on ctrl+c.

@LMWF LMWF added the kind/bug Something isn't working label May 4, 2020
@lgmorand
Copy link

lgmorand commented May 20, 2020

same behavior here, running the samples, but that's not consistent.
When occuring, it says the app is running, which seems running but Dapr list list an "empty" app

`PS E:\Repos\dapr-eshop\src\eshop.catalog\bin\Debug\netcoreapp3.1> dapr list
APP ID HTTP PORT GRPC PORT APP PORT COMMAND AGE CREATED PID

      0          0          0                  39s  2020-05-20 13:35.28  6032`

@CSelvaraj2010
Copy link

I am experiencing a similar behavior, and dapr list is empty. Any help would be appreciated.

dapr run --app-id 'IotHub' --app-port 5000 dotnet run

Could not update sidecar metadata for cliPID: PUT http://127.0.0.1:57193/v1.0/metadata/cliPID giving up after 5 attempts
Updating metadata for app command: dotnet run

APP ID HTTP PORT GRPC PORT APP PORT COMMAND AGE CREATED PID
0 0 0 18s 2020-06-02 19:43.31 45808

@Phiph
Copy link

Phiph commented Dec 2, 2020

I'm experiencing this too. How did you fix it?

@abogdanov37
Copy link

Hi folks! I have the same question? I ran Dapr on Windows machine. In docker ps i see that dapr_placement run on port 6050. I add --dapr-http-port 6050 but have the same behaviour. Any ideas?

@mukundansundar
Copy link
Collaborator

We will look into this as part of milestone 3.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Jan 4, 2022

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

@dapr-bot dapr-bot added stale and removed stale labels Jan 4, 2022
@dapr-bot
Copy link
Collaborator

dapr-bot commented Feb 3, 2022

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

@dapr-bot dapr-bot added stale and removed stale labels Feb 3, 2022
@mukundansundar mukundansundar added triaged/resolved The issue has been triaged and removed triaged/resolved The issue has been triaged labels Feb 19, 2022
@dapr-bot
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

@dapr-bot dapr-bot added the stale label Mar 21, 2022
@dapr-bot
Copy link
Collaborator

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.

@mukundansundar mukundansundar added this to the v1.8 milestone Mar 28, 2022
@mukundansundar
Copy link
Collaborator

not stale

@mukundansundar mukundansundar modified the milestones: v1.8, v1.9 Jun 15, 2022
@mukundansundar mukundansundar modified the milestones: v1.9, v1.10 Sep 27, 2022
@mukundansundar mukundansundar modified the milestones: v1.10, v1.11 Jan 27, 2023
@mukundansundar mukundansundar modified the milestones: v1.11, v1.12 Apr 19, 2023
@ryan-singleton
Copy link

Any progress on this issue? Troubleshooting and iterating on designs is incredibly inefficient with how long it takes to stop a run invocation that is showing failures. I sometimes find myself waiting up to two minutes after I know that the run is a bust.

I would prefer not to but in order to meet time constraints, I am probably going to need to resort to aliases and scripts that kill Dapr, but I'm concerned about the long term impacts of that considering how often I am going to need to abuse it.

@yaron2
Copy link
Member

yaron2 commented Jul 27, 2023

@mukundansundar @pravinpushkar do either of you have bandwidth to fix this for 1.12?

@pravinpushkar
Copy link
Contributor

@yaron2 I will be able to take up only mid next week. @mukundansundar feel free to take up if you are planning already.

@hhstore
Copy link

hhstore commented Nov 26, 2023

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working P1 pinned
Projects
None yet
Development

No branches or pull requests