quickstarts icon indicating copy to clipboard operation
quickstarts copied to clipboard

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

Open stanspotts opened this issue 5 years ago • 3 comments

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 avatar Mar 05 '21 06:03 stanspotts

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.

stanspotts avatar Mar 05 '21 13:03 stanspotts

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 avatar Jun 16 '21 14:06 wcs1only

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.

wcs1only avatar Jun 16 '21 14:06 wcs1only