本应由dapr运行时发送到zipkin服务器的跟踪以某种方式无法到达它。
情况如下:
我在我的Windows上使用Desktop。我已经从dapr存储库(https://github.com/dapr/samples/tree/master/hello-docker-compose)下载了这个示例,它完全用完了插补库的所有功能。
然后,我按照dapr文档添加了Zipkin支持:
docker-compose.yml底部的
zipkin:
image: "openzipkin/zipkin"
ports:
- "9411:9411"
networks:
- hello-dapr 中添加了config.yaml
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: daprsystem
spec:
mtls:
enabled: false
tracing:
enabled: true
exporterType: zipkin
samplingRate: "1"
expandParams: true
includeBody: true
zipkin:
endpointAddress: "http://zipkin:9411/api/v2/spans" 当应用程序运行时,它应该向服务器发送跟踪,但是在zipkin和日志中什么都找不到。
奇怪的事情开始出现在nodeapp_1服务的日志中:从client cert读取spiffe id时出现了错误
pythonapp-dapr_1 | time="2021-03-15T19:14:17.9654602Z" level=debug msg="found mDNS IPv4 address in cache: 172.19.0.7:34549" app_id=pythonapp instance=ce32220407e2 scope=dapr.contrib type=log ver=edge
nodeapp-dapr_1 | time="2021-03-15T19:14:17.9661792Z" level=debug msg="error while reading spiffe id from client cert: unable to retrieve peer auth info. applying default global policy action" app_id=nodeapp instance=773c486b5aac scope=dapr.runtime.grpc.api type=log ver=edge
nodeapp_1 | Got a new order! Order ID: 947
nodeapp_1 | Successfully persisted state.附加信息-目前使用的dapr版本是1.0.1。我确保在配置文件中禁用安全性(mtls)。
发布于 2021-06-16 16:39:38
配置文件应该位于不同的文件夹中,然后是components。
创建新文件夹,例如,在folder.
dapr。
components文件夹移动到新创建的dapr文件夹中。
H 110然后在dapr中创建config.yaml -组合
码头工
services:
nodeapp-dapr:
image: "daprio/daprd:edge"
command: ["./daprd",
"-app-id", "nodeapp",
"-app-port", "3000",
"-placement-host-address", "placement:50006",
"-dapr-grpc-port", "50002",
"-components-path", "/dapr/components",
"-config", "/dapr/config.yaml"]
volumes:
- "./dapr/components/:/dapr"
depends_on:
- nodeapp
network_mode: "service:nodeapp"config.yaml
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: daprConfig
spec:
mtls:
enabled: false
tracing:
enabled: true
samplingRate: "1"
expandParams: true
includeBody: true
zipkin:
endpointAddress: http://host.docker.internal:9411/api/v2/spans,我在URL中与
localhost和127.0.0.1有问题,我使用host.docker.internal作为主机名进行了解决。
PS:不要忘记杀死所有的*-dapr_1容器,这样它就可以加载新的配置。
https://stackoverflow.com/questions/66646250
复制相似问题