-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Operate state throw exception FailedPrecondition on windows #3344
Comments
time="2021-06-25T10:09:09.8998877+08:00" level=warning msg="failed to init actors: actors: couldn't connect to placement service: address is empty" app_id=masa-dcc-service-admin instance=SSHZ014 scope=dapr.runtime type=log ver=1.2.2 |
I set actorStateStore value to false, it still throw this exception. |
I run daprd with -placement-host-address localhost:6050 parameter, then placement is working.
|
@doddgu - Can you summarize this issue. Are you saying that setting actorStateStore false should not result in needing the Placement service running, since so actors are being created? Or are you saying that the SaveStateAsync needs to have the Placement service running? What exactly is the bug that you are reporting here? |
I want to run daprd on windows, not in docker. I think these are two questions, and the first I resolved.
I found where the exception throw, but I don't know why. if a.stateStores == nil || len(a.stateStores) == 0 {
return nil, status.Error(codes.FailedPrecondition, messages.ErrStateStoresNotConfigured)
} statestore.yaml apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
spec:
type: state.redis
version: v1
metadata:
- name: redisHost
value: localhost:6379
- name: redisPassword
value: ""
- name: actorStateStore
value: "true"
|
I found another warning
|
@msfussell I resolved, but I'm not sure it's a bug. Two parameters can resolve it.
|
So, when running in standalone mode, generally the Once dapr/cli#746 is merged and released, would that be sufficient to unblock you using |
Q: are you taking this approach to specifically avoid using docker containers Q: Once dapr/cli#746 is merged and released, would that be sufficient to unblock you using dapr run, and therefore resolve this issue for you?
I'm not sure that will solve the problem completely. The first warning I saw was couldn't connect to placement service: address is empty, it prompted empty, not timeout. |
if indx := strings.Index(placementHostAddr, ":"); indx == -1 Before it, I think need set placementHostAddr := "localhost" if placementHostAddr is nil. But, I'm not sure the address is empty warning is before or after this. if placementHostAddr == nil {
placementHostAddr := "localhost"
}
if indx := strings.Index(placementHostAddr, ":"); indx == -1 |
I think it need to be [<hostname>][:<port>], and default hostname is localhost. It will solve this problem. |
So once the dapr/cli#746 is merged and released you would accomplish what you want with the following:
Until that is merged, you can actually start the placement service on the Windows port (provided you don't have a service running on 6050):
Then if you use the CLI to run dapr, it will automatically set the components directory and the correct port:
|
So, I should use dapr run, rather than daprd, I will try it. |
Where you following this guide?: https://docs.dapr.io/operations/hosting/self-hosted/self-hosted-no-docker/ I think this doc needs an update to reflect that the placement server needs a different port on Windows. |
I use the warning message, and then look up the source code to locate the problem. |
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. |
In what area(s)?
What version of Dapr?
Expected Behavior
Get state success.
Actual Behavior
OS: Windows 10 19042.1052
Mode: Self hosted
Note: I run the .net program on windows, not docker.
RpcException: Status(StatusCode="FailedPrecondition", Detail="state store is not configured")
Steps to Reproduce the Problem
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered: