dapr / dapr/go-sdk

couldn't find output binding

Open
#265 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
479
Forks
187
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

try call the http bindings with curl, but get this error:
```sh
curl -d '{ "operation": "get" }' http://localhost:3500/v1.0/bindings/dclient
{"errorCode":"ERR_INVOKE_OUTPUT_BINDING","message":"error when invoke output binding dclient: couldn't find output binding dclient"}
```

**To Reproduce**

this is my config:

```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: dclient
spec:
type: bindings.http
version: v1
metadata:
- name: url
value: http://app_host:8013
```

The logs:

```sh
ℹ️ Starting Dapr with id myapp. HTTP Port: 3500. gRPC Port: 50001
time="2022-03-09T18:04:55.685793437Z" level=info msg="starting Dapr Runtime -- version 1.6.0 -- commit 4bb25fab444c4f1a1bf0ffd74293dbd4fdcea580" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.68581967Z" level=info msg="log level set to: debug" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.685877632Z" level=info msg="metrics server started on :38203/" app_id=myapp instance=919c5137cd58 scope=dapr.metrics type=log ver=1.6.0
time="2022-03-09T18:04:55.688250096Z" level=info msg="standalone mode configured" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.688262817Z" level=info msg="app id: myapp" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.688346367Z" level=info msg="mTLS is disabled. Skipping certificate request and tls validation" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.70333092Z" level=info msg="service:myapp registered on consul agent" app_id=myapp instance=919c5137cd58 scope=dapr.contrib type=log ver=1.6.0
time="2022-03-09T18:04:55.703356741Z" level=info msg="Initialized name resolution to consul" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.703410327Z" level=info msg="loading components" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704478967Z" level=debug msg="found component. name: dclient, type: bindings.http/v1" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704491215Z" level=debug msg="found component. name: secretstore, type: secretstores.local.file/v1" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704496855Z" level=debug msg="found component. name: alicloudobjectstorage, type: bindings.alicloud.oss/v1" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704501551Z" level=debug msg="found component. name: pubsub, type: pubsub.rabbitmq/v1" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704506605Z" level=debug msg="found component. name: redis, type: bindings.redis/v1" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704511172Z" level=debug msg="found component. name: statestore, type: state.redis/v1" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704519632Z" level=info msg="waiting for all outstanding components to be processed" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704561083Z" level=debug msg="loading component. name: secretstore, type: secretstores.local.file/v1" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704698053Z" level=info msg="component loaded. name: secretstore, type: secretstores.local.file/v1" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704715328Z" level=info msg="all outstanding components processed" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704748931Z" level=info msg="enabled gRPC tracing middleware" app_id=myapp instance=919c5137cd58 scope=dapr.runtime.grpc.api type=log ver=1.6.0
time="2022-03-09T18:04:55.704758222Z" level=info msg="enabled gRPC metrics middleware" app_id=myapp instance=919c5137cd58 scope=dapr.runtime.grpc.api type=log ver=1.6.0
time="2022-03-09T18:04:55.704791598Z" level=info msg="API gRPC server is running on port 50001" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704937089Z" level=info msg="enabled metrics http middleware" app_id=myapp instance=919c5137cd58 scope=dapr.runtime.http type=log ver=1.6.0
time="2022-03-09T18:04:55.704946387Z" level=info msg="enabled tracing http middleware" app_id=myapp instance=919c5137cd58 scope=dapr.runtime.http type=log ver=1.6.0
time="2022-03-09T18:04:55.704965307Z" level=info msg="http server is running on port 3500" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704971792Z" level=info msg="The request body size parameter is: 4" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.704983747Z" level=info msg="enabled gRPC tracing middleware" app_id=myapp instance=919c5137cd58 scope=dapr.runtime.grpc.internal type=log ver=1.6.0
time="2022-03-09T18:04:55.704990225Z" level=info msg="enabled gRPC metrics middleware" app_id=myapp instance=919c5137cd58 scope=dapr.runtime.grpc.internal type=log ver=1.6.0
time="2022-03-09T18:04:55.705004156Z" level=info msg="internal gRPC server is running on port 42403" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.705010663Z" level=info msg="application protocol: http. waiting on port 8019. This will block until the app is listening on that port." app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.705184678Z" level=info msg="application discovered on port 8019" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.705681384Z" level=info msg="application configuration loaded" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.705728661Z" level=warning msg="failed to init actors: no actor state store defined" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
time="2022-03-09T18:04:55.705743884Z" level=info msg="dapr initialized. Status: Running. Init Elapsed 17.494691ms" app_id=myapp instance=919c5137cd58 scope=dapr.runtime type=log ver=1.6.0
```

I can see the it from `dashboard Dapr Components` list.

**Expected behavior**

expect the call sccuess

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by reproducing the curl request with the supplied component YAML, then trace the HTTP binding registration and invocation entry points in the Go SDK/runtime integration. Done means the configured dclient binding can be invoked successfully through the shown endpoint, with a regression test covering the case.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.