Default Dapr gRPC port is inconsistent with documentation
- Dominant language
- Go
- Stars
- 353
- Forks
- 221
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 2
Description
According to [the `dapr run` documentation](https://docs.dapr.io/reference/cli/dapr-run/), the default value for `--dapr-grpc-port` is `50001`.

## Expected Behavior
When invoking `dapr run` without specifying `--dapr-grpc-port` would cause it to listen on port 50001 for gRPC.
If using a random port is the prefered behavior, then I'd expect the documentation to say that the default port number is random and specify the expected port range.
## Actual Behavior
The actual behavior for `dapr run` seems to be to select a random gRPC port, which is different from what the documentation states.
NOTE: I did observe the .NET SDK assumes a default port of 50001. Not sure about other SDKs, but this does seem to indicate some sort of mismatched expectations between SDKs and the Dapr CLI.
## Steps to Reproduce the Problem
Using Dapr CLI v1.7, run a command similar to the following:
```bash
dapr run --app-id myapp --app-protocol http --dapr-http-port 3501 --app-port 5001
```
And observe the first line of output (it mentions gRPC port 53375):
```
Starting Dapr with id myapp. HTTP Port: 3501. gRPC Port: 53375
```
This was a problem for me because I run the Dapr CLI separately from my application code. This means my application code doesn't get a `DAPR_GRPC_PORT` specified and I have to know in advance what port Dapr is listening on. Since SDKs assume a default port (50001), it made logical sense to me that the Dapr CLI would default to the same port as the SDKs.
## Release Note
RELEASE NOTE: **FIX** Bug in runtime (or documentation).
Contributor guide
Assessment
This issue has not been assessed yet.