Skip to content
This repository was archived by the owner on Dec 6, 2022. It is now read-only.

Sample - Workflow2 #65

Open
andreatosato opened this issue Oct 7, 2020 · 14 comments
Open

Sample - Workflow2 #65

andreatosato opened this issue Oct 7, 2020 · 14 comments

Comments

@andreatosato
Copy link

Hi,
I run successfull workflow1 but workflow2 report this error:

{
  "error": {
    "code": "NoResponse",
    "message": "The server did not received a response from an upstream server. Request tracking id '08585995089540340895731183776CU00'."
  }
}

How can I run workflow2?
I must create servicebus and store container but there isn't in deploy file o in docs. Could this be the mistake?
Thanks a lot

@yaron2
Copy link
Contributor

yaron2 commented Oct 16, 2020

hey @andreatosato, you need to set up a Service Bus and State Store with Dapr.

These are covered in the Dapr docs here:

https://github.com/dapr/docs/tree/master/howto/setup-state-store#reference
https://github.com/dapr/docs/tree/master/howto/setup-pub-sub-message-broker#related-links

@andreatosato
Copy link
Author

andreatosato commented Oct 18, 2020

deploy.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: dapr-workflows-host
  labels:
    app: dapr-workflows-host
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dapr-workflows-host
  template:
    metadata:
      labels:
        app: dapr-workflows-host
      annotations:
        dapr.io/id: "workflows"
        dapr.io/enabled: "true"
        dapr.io/port: "50003"
        dapr.io/protocol: "grpc"
    spec:
      containers:
      - name: host
        image: daprio/workflows:0.2.2
        env:
        - name: STORAGE_ACCOUNT_KEY
          valueFrom:
            secretKeyRef:
              name: dapr-workflows
              key: accountKey
        - name: STORAGE_ACCOUNT_NAME
          valueFrom:
            secretKeyRef:
              name: dapr-workflows
              key: accountName
        command: ["dotnet"]
        args: ["app/Dapr.Workflows.dll", "--workflows-path", "/workflows"]
        ports:
        - containerPort: 50003
        imagePullPolicy: Always
        volumeMounts:
        - name: workflows
          mountPath: /workflows
      volumes:
        - name: workflows
          configMap:
            name: workflows

cosmos.yaml

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: statestore
spec:
  type: state.azure.cosmosdb
  metadata:
  - name: url
    value: https://daprstatetosato.documents.azure.com:443
  - name: masterKey
    value: eEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE==
  - name: database
    value: state
  - name: collection
    value: dapr

azuresb.yaml

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: pubsub
  namespace: default
spec:
  type: pubsub.azure.servicebus
  metadata:
  - name: connectionString
    value: Endpoint=sb://daprbustosato.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=e44444444444444444444444= # Required.

Error:

curl http://localhost:3500/v1.0/invoke/workflows/method/workflow2


StatusCode        : 200
StatusDescription : OK
Content           : {
                      "error": {
                        "code": "NoResponse",
                        "message": "The server did not received a response from an upstream server. Request tracking
                    id '08585985684397997477337568394CU00'."
                      }
                    }
RawContent        : HTTP/1.1 200 OK
                    Dapr-Grpc-Accept-Encoding: identity,deflate,gzip
                    Accept-Encoding: identity,gzip
                    Traceparent: 00-aca3d0d638b23c0785e6d2105db52ecb-4c73f6be9dee2f91-00
                    Content-Length: 184
                    Content-Ty...
Forms             : {}
Headers           : {[Dapr-Grpc-Accept-Encoding, identity,deflate,gzip], [Accept-Encoding, identity,gzip],
                    [Traceparent, 00-aca3d0d638b23c0785e6d2105db52ecb-4c73f6be9dee2f91-00], [Content-Length, 184]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 184

image

My commands:

dapr init --kubernetes
kubectl create configmap workflows --from-file ./samples/workflow2.json
kubectl create secret generic dapr-workflows --from-literal=accountName=daprstoragetosato --from-literal=accountKey=ydddddddddddddddddddddddddddddd0f9hh8Cqsl2v5Vlw==
kubectl apply -f .\deploy\workflow2
kubectl port-forward deploy/dapr-workflows-host 3500:3500

Where is my error? @yaron2

@andreatosato
Copy link
Author

maybe?

time="2020-10-18T17:01:17.5400839Z" level=warning msg="failed to init actors: state store does not support transactions which actors require to save state - please see https://github.com/dapr/docs" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-gtpl4 scope=dapr.runtime type=log ver=0.11.2

@andreatosato
Copy link
Author

andreatosato commented Oct 18, 2020

Now i configure redis:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: statestore
  namespace: default
spec:
  type: state.redis
  metadata:
  - name: redisHost
    value: redis-master:6379
  - name: redisPassword
    value: Xetb4vCjEj

Or
value: redis-master.default.svc.cluster.local:6379

But not work!

@andreatosato
Copy link
Author

andreatosato commented Oct 18, 2020

Full container log:

time="2020-10-18T19:20:29.9272195Z" level=info msg="dapr initialized. Status: Running. Init Elapsed 2421.2793ms" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:29.9271836Z" level=info msg="http server is running on port 3500" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:29.9271457Z" level=info msg="enabled tracing http middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.http type=log ver=0.11.2

time="2020-10-18T19:20:29.9271331Z" level=info msg="enabled metrics http middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.http type=log ver=0.11.2

time="2020-10-18T19:20:29.9271037Z" level=info msg="enabled cors http middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.http type=log ver=0.11.2

time="2020-10-18T19:20:29.926907Z" level=info msg="starting workload cert expiry watcher. current cert expires on: 2020-10-19 19:35:29 +0000 UTC" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.grpc.internal type=log ver=0.11.2

time="2020-10-18T19:20:29.9268755Z" level=info msg="internal gRPC server is running on port 50002" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:29.9266415Z" level=info msg="certificate signed successfully" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.grpc.internal type=log ver=0.11.2

time="2020-10-18T19:20:29.9161433Z" level=info msg="sending workload csr request to sentry" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.grpc.internal type=log ver=0.11.2

time="2020-10-18T19:20:29.9161113Z" level=info msg="enabled gRPC metrics middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.grpc.internal type=log ver=0.11.2

time="2020-10-18T19:20:29.9160706Z" level=info msg="enabled gRPC tracing middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.grpc.internal type=log ver=0.11.2

time="2020-10-18T19:20:29.9160179Z" level=info msg="API gRPC server is running on port 50001" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:29.9159748Z" level=info msg="enabled gRPC metrics middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.grpc.api type=log ver=0.11.2

time="2020-10-18T19:20:29.9159557Z" level=info msg="enabled gRPC tracing middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.grpc.api type=log ver=0.11.2

time="2020-10-18T19:20:29.9158866Z" level=warning msg="failed to init actors: state store does not support transactions which actors require to save state - please see https://github.com/dapr/docs" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:29.9158216Z" level=warning msg="actors: state store must be present to initialize the actor runtime" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.actor type=log ver=0.11.2

time="2020-10-18T19:20:29.9157957Z" level=info msg="all outstanding components processed" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:29.9157782Z" level=error msg="process component statestore error, redis store: error connecting to redis at redis-master:6379: dial tcp 127.0.0.2:6379: connect: connection refused" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:29.9157399Z" level=warning msg="error initializing state store state.redis: redis store: error connecting to redis at redis-master:6379: dial tcp 127.0.0.2:6379: connect: connection refused" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.802145Z" level=info msg="waiting for all outstanding components to be processed" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.8019226Z" level=info msg="component loaded. name: pubsub, type: pubsub.azure.servicebus" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.6496503Z" level=info msg="component loaded. name: kubernetes, type: secretstores.kubernetes" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.6476306Z" level=info msg="Initialized name resolution to kubernetes" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.6470269Z" level=info msg="application discovered on port 50003" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

Dapr LogicApps Server listening on port 50003

Flow Created

time="2020-10-18T19:20:27.5256998Z" level=info msg="application protocol: grpc. waiting on port 50003.  This will block until the app is listening on that port." app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.5062422Z" level=info msg="authenticator created" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.5062053Z" level=info msg="trust anchors and cert chain extracted successfully" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime.security type=log ver=0.11.2

time="2020-10-18T19:20:27.5060008Z" level=info msg="mTLS enabled. creating sidecar authenticator" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.5059837Z" level=info msg="app id: workflows" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.5059454Z" level=info msg="kubernetes mode configured" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.5059076Z" level=info msg="loading default configuration" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.505726Z" level=info msg="metrics server started on :9090/" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.metrics type=log ver=0.11.2

time="2020-10-18T19:20:27.5054935Z" level=info msg="log level set to: info" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

time="2020-10-18T19:20:27.5054047Z" level=info msg="starting Dapr Runtime -- version 0.11.2 -- commit c704551" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-64b9m scope=dapr.runtime type=log ver=0.11.2

Loading workflow: workflow2.json

Registering Web Environment

Creating Edge Configuration

Loading Configuration

No registered Dapr Actors
image

@andreatosato
Copy link
Author

After re-create redis, I have this error:

time="2020-10-19T06:22:36.1515192Z" level=info msg="dapr initialized. Status: Running. Init Elapsed 5175.216200000001ms" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:36.1515019Z" level=info msg="http server is running on port 3500" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:36.1514747Z" level=info msg="enabled tracing http middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.http type=log ver=0.11.2

time="2020-10-19T06:22:36.1514364Z" level=info msg="enabled metrics http middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.http type=log ver=0.11.2

time="2020-10-19T06:22:36.1513011Z" level=info msg="enabled cors http middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.http type=log ver=0.11.2

time="2020-10-19T06:22:36.1509145Z" level=info msg="starting workload cert expiry watcher. current cert expires on: 2020-10-20 06:37:36 +0000 UTC" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.grpc.internal type=log ver=0.11.2

time="2020-10-19T06:22:36.1507616Z" level=info msg="internal gRPC server is running on port 50002" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:36.1505247Z" level=info msg="certificate signed successfully" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.grpc.internal type=log ver=0.11.2

time="2020-10-19T06:22:36.1378184Z" level=info msg="sending workload csr request to sentry" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.grpc.internal type=log ver=0.11.2

time="2020-10-19T06:22:36.1378024Z" level=info msg="enabled gRPC metrics middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.grpc.internal type=log ver=0.11.2

time="2020-10-19T06:22:36.1377892Z" level=info msg="enabled gRPC tracing middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.grpc.internal type=log ver=0.11.2

time="2020-10-19T06:22:36.1377561Z" level=info msg="API gRPC server is running on port 50001" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:36.1377008Z" level=info msg="enabled gRPC metrics middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.grpc.api type=log ver=0.11.2

time="2020-10-19T06:22:36.1376842Z" level=info msg="enabled gRPC tracing middleware" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.grpc.api type=log ver=0.11.2

time="2020-10-19T06:22:36.1375944Z" level=warning msg="failed to init actors: state store does not support transactions which actors require to save state - please see https://github.com/dapr/docs" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:36.1375354Z" level=warning msg="actors: state store must be present to initialize the actor runtime" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.actor type=log ver=0.11.2

time="2020-10-19T06:22:36.1375077Z" level=info msg="all outstanding components processed" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:36.1374185Z" level=info msg="component loaded. name: pubsub, type: pubsub.azure.servicebus" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:35.9975973Z" level=info msg="waiting for all outstanding components to be processed" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:35.997421Z" level=info msg="component loaded. name: statestore, type: state.redis" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:35.9971892Z" level=warning msg="either no actor state store or multiple actor state stores are specified in the configuration, actor stores specified: 0" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:34.5296837Z" level=info msg="component loaded. name: kubernetes, type: secretstores.kubernetes" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:34.5285482Z" level=info msg="Initialized name resolution to kubernetes" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:34.5274747Z" level=info msg="application discovered on port 50003" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

Dapr LogicApps Server listening on port 50003

Flow Created

Loading workflow: workflow2.json

Registering Web Environment

time="2020-10-19T06:22:30.9867556Z" level=info msg="application protocol: grpc. waiting on port 50003.  This will block until the app is listening on that port." app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:30.9765464Z" level=info msg="authenticator created" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:30.9765265Z" level=info msg="trust anchors and cert chain extracted successfully" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime.security type=log ver=0.11.2

time="2020-10-19T06:22:30.9763367Z" level=info msg="mTLS enabled. creating sidecar authenticator" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:30.9763245Z" level=info msg="app id: workflows" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:30.9763084Z" level=info msg="kubernetes mode configured" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:30.9762535Z" level=info msg="loading default configuration" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:30.9760591Z" level=info msg="metrics server started on :9090/" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.metrics type=log ver=0.11.2

time="2020-10-19T06:22:30.9758532Z" level=info msg="log level set to: info" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

time="2020-10-19T06:22:30.9757931Z" level=info msg="starting Dapr Runtime -- version 0.11.2 -- commit c704551" app_id=workflows instance=dapr-workflows-host-6f9bb59f5f-drb7x scope=dapr.runtime type=log ver=0.11.2

Creating Edge Configuration

Loading Configuration

I have changed my yaml redis like this, but there is error either no actor state store or multiple actor state stores are specified in the configuration, actor stores specified: 0:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: statestore
  namespace: default
spec:
  type: state.redis
  metadata:
  - name: redisHost
    value: redis-master.default.svc.cluster.local:6379
  - name: redisPassword
    value: OxfY3mNISM
  - name: enableTLS
    value: false
  - name: actorStateStore
    value: "true"

@yaron2
Copy link
Contributor

yaron2 commented Oct 19, 2020

That error is safe to ignore for this scenario, unless you are using actors. So if you're still getting an error, it's not because of the actor state store.

Can you remove the enableTLS field entirely from the YAML, restart the pod and try again?

@andreatosato
Copy link
Author

andreatosato commented Oct 19, 2020

I have already tried, but not work.
Isn't there logicapps error? Isn't there logicapps component error?

@yaron2
Copy link
Contributor

yaron2 commented Oct 19, 2020

What error are you getting when invoking the workflow?

@andreatosato
Copy link
Author

{
  "error": {
    "code": "NoResponse",
    "message": "The server did not received a response from an upstream server. Request tracking id '08585995089540340895731183776CU00'."
  }
}

@yaron2
Copy link
Contributor

yaron2 commented Oct 19, 2020

I'll look into it this week.

@andreatosato
Copy link
Author

Ok, thanks, friday I have an community event 🙏

@andreatosato
Copy link
Author

@yaron2 do you have any news?

@xdmushui
Copy link

Is there an example that can be run locally without using any Azure services?

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

No branches or pull requests

3 participants