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

dapr (v1.0) run --app-id nodeapp step in Hello World does not set app-id #399

Closed
stanspotts opened this issue Mar 5, 2021 · 3 comments
Closed

Comments

@stanspotts
Copy link

stanspotts commented Mar 5, 2021

Expected Behavior

When I run the command
dapr run --app-id mynodeapp --app-port 3000 --dapr-http-port 3500 node app.js'

I see this:
Starting Dapr with id mynodeapp. HTTP Port: 3500. gRPC Port: 28495
== APP == Node App listening on port 3000!
{log stuff}
Updating metadata for app command: node app.js
You're up and running! Both Dapr and your app logs will appear here.

I expect the next step,
dapr invoke --app-id nodeapp --method neworder --data '{\"data\": { \"orderId\": \"42\" } }'

To work.

Actual Behavior

When I run
dapr run --app-id nodeapp --app-port 3000 --dapr-http-port 3500 node app.js

I see this:
error invoking app nodeapp: app ID nodeapp not found

and if I run dapr list I see this:

  APP ID  HTTP PORT  GRPC PORT  APP PORT  COMMAND  AGE  CREATED                     PID
               0                  0                   0                                      42s   2021-03-05 01:44.08  21924

Steps to Reproduce the Problem

Install dapr v1.0, dapr init, git clone the quickstart repo, walk through the Hello World steps.

@stanspotts stanspotts changed the title dapr run --app-id nodeapp step in Hello World does not set app-id dapr (v1.0) run --app-id nodeapp step in Hello World does not set app-id Mar 5, 2021
@stanspotts
Copy link
Author

stanspotts commented Mar 5, 2021

Sorry, just ran on a different laptop and found it's not an issue with the quickstart, it's a dapr issue. Simply running dapr run --app-id myapp --dapr-http-port 3500 resulted with no app id displayed in dapr list as well. I'm reposting this to the dapr/cli repo.

@wcs1only
Copy link
Contributor

Just following up on this. Dapr relies on mdns for service discovery when running in standalone mode. If for some reason mdns was having problems on your machine, you may have noticed this problem. We've also seen reports that certain security/VPN software blocks mdns by default which may cause this behavior as well. Since you have noted in dapr/cli#613 that this problem went away after a reboot, I'm going to go ahead and close this ticket. Also, we have a proposal for creating an alternative service discovery mechanism to mdns here: dapr/dapr#3256

@wcs1only
Copy link
Contributor

Also, this can be caused by any other issue that causes daprd to be unable to start. For example:
dapr/dapr#2954

We've made some changes in v1.2 that should make it more obvious when daprd fails to start.

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

No branches or pull requests

2 participants