dapr-sandbox / dapr-logicapps-extension

Run Cloud Native workflows on any environment using Dapr
Apache License 2.0
136 stars 29 forks source link

Bad request #60

Closed stephaneey closed 3 years ago

stephaneey commented 3 years ago

Hello,

I've just tried the workflow1 sample in Kubernetes. I keep ending up with a Bad Request (400) issue with no error in the body.

The workflow engine is running together with the daprd:

dapr-workflows-host-76f9fc7b9b-x8hfj 2/2 Running 0 2m33s

Daprd logs are here

time="2020-07-30T15:27:57.39857996Z" level=info msg="starting Dapr Runtime -- version 0.9.0 -- commit 6babe85-dirty" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:27:57.398763266Z" level=info msg="log level set to: debug" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:27:57.399080878Z" level=info msg="metrics server started on :9090/" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.metrics type=log ver=0.9.0
time="2020-07-30T15:27:57.3996595Z" level=info msg="loading default configuration" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:27:57.399803705Z" level=info msg="kubernetes mode configured" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:27:57.399903309Z" level=info msg="app id: workflows" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:27:57.400008413Z" level=info msg="mTLS is disabled. Skipping certificate request and tls validation" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:27:57.436658671Z" 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-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:28:00.14391819Z" level=info msg="application discovered on port 50003" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:28:00.14474632Z" 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-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:28:00.144783922Z" level=info msg="Initialized name resolution to kubernetes" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:28:00.181670489Z" level=warning msg="actors: state store must be present to initialize the actor runtime" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime.actor type=log ver=0.9.0
time="2020-07-30T15:28:00.181897197Z" 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-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:28:00.182062103Z" level=info msg="enabled monitoring middleware" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime.grpc.api type=log ver=0.9.0
time="2020-07-30T15:28:00.182202808Z" level=info msg="API gRPC server is running on port 50001" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:28:00.182366815Z" level=info msg="enabled monitoring middleware" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime.grpc.internal type=log ver=0.9.0
time="2020-07-30T15:28:00.18252792Z" level=info msg="internal gRPC server is running on port 50002" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:28:00.182801731Z" level=info msg="enabled cors http middleware" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime.http type=log ver=0.9.0
time="2020-07-30T15:28:00.182904034Z" level=info msg="enabled metrics http middleware" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime.http type=log ver=0.9.0
time="2020-07-30T15:28:00.182997738Z" level=info msg="enabled tracing http middleware" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime.http type=log ver=0.9.0
time="2020-07-30T15:28:00.183091941Z" level=info msg="http server is running on port 3500" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0
time="2020-07-30T15:28:00.183188345Z" level=info msg="dapr initialized. Status: Running. Init Elapsed 2783.390141ms" app_id=workflows instance=dapr-workflows-host-76f9fc7b9b-x8hfj scope=dapr.runtime type=log ver=0.9.0

I have enabled debug level but nothing special is reported. I created the secret & configmap as stated in the read me. The logs of the host are:

Loading Configuration
Creating Edge Configuration
Registering Web Environment
Loading workflow: wf.json
Flow Created
Dapr LogicApps Server listening on port 50003

However, when doing the port forwarding and invoking http://localhost:3500/v1.0/invoke/workflows/method/workflow1, I get a 400 back and no error in the response so not sure what is bad in the request. Not a single extra logging info can be found nor in daprd, nor in the host logs. Note that I have disabled mTls because I'm also using Linderd but I suppose it is not related? Whether I inject the pod with Linkerd makes no difference anyway.

Any clue?

Thanks

yaron2 commented 3 years ago

I suspect the issue might be here:

Loading workflow: wf.json.

Can you try invoking this url?

http://localhost:3500/v1.0/invoke/workflows/method/wf

stephaneey commented 3 years ago

What a fast answer :). Good catch, that's indeed the problem. I renamed the workflow I guess to add my own bits :)...Don't you think some extra logging could be added?

Thanks

yaron2 commented 3 years ago

A log when invoking a missing workflow can be added, sure.

Would you mind opening a new issue for that?

stephaneey commented 3 years ago

I will, tomorrow. I even think that a 404 would be more appropriate in such case

yaron2 commented 3 years ago

Thanks. Closing this for now.