1. 查看pod日志

1.1. 查看pod

kubectl get pods -n dapr-demo
NAME                         READY   STATUS             RESTARTS         AGE
service01-7cc7c54c65-g4jzw   1/2     CrashLoopBackOff   26 (2m22s ago)   111m
service01-7cc7c54c65-gsf8c   1/2     CrashLoopBackOff   26 (85s ago)     111m
service02-6d849d9f97-mk286   1/2     CrashLoopBackOff   26 (2m14s ago)   111m

1.2. 描述pod的整体信息

kubectl describe pod service01-7cc7c54c65-g4jzw -n dapr-demo
Name:         service01-7cc7c54c65-g4jzw
Namespace:    dapr-demo
Priority:     0
Node:         node-slave/192.168.0.204
Start Time:   Sat, 19 Feb 2022 13:37:05 +0800
Labels:       app=service01
              pod-template-hash=7cc7c54c65
Annotations:  dapr.io/app-id: service01
              dapr.io/app-port: 80
              dapr.io/enable-debug: true
              dapr.io/enabled: true
              dapr.io/log-as-json: true
              dapr.io/sidecar-liveness-probe-delay-seconds: 10
              dapr.io/sidecar-readiness-probe-delay-seconds: 10
Status:       Running
IP:           10.44.0.5
IPs:
  IP:           10.44.0.5
Controlled By:  ReplicaSet/service01-7cc7c54c65
Containers:
  service01:
    Container ID:   docker://e875b665df3b0ce52e07635ac587ae1406ff9e208d197083b5ad921eb3edde46
    Image:          docker.io/k8schina/service01:v1
    Image ID:       docker-pullable://k8schina/service01@sha256:8ead4a7aa2eac005badfbac0c615b2be930aada2a17994e7891b720c62da2abb
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Running
      Started:      Sat, 19 Feb 2022 13:37:25 +0800
    Ready:          True
    Restart Count:  0
    Environment:
      DAPR_HTTP_PORT:  3500
      DAPR_GRPC_PORT:  50001
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-s2f8g (ro)
  daprd:
    Container ID:  docker://4cf1fac4f809945132bcb28f00b62bd974c1036c32f56b56781fa3cd958f8dd1
    Image:         docker.io/daprio/daprd:1.6.0
    Image ID:      docker-pullable://daprio/daprd@sha256:db7ce4723d61566a2e6be24bd7d136e317023cf11ee78b9c6f55c00ec0c6223f
    Ports:         3500/TCP, 50001/TCP, 50002/TCP, 9090/TCP, 40000/TCP
    Host Ports:    0/TCP, 0/TCP, 0/TCP, 0/TCP, 0/TCP
    Command:
      /dlv
    Args:
      --listen=:40000
      --accept-multiclient
      --headless=true
      --log
      --api-version=2
      exec
      /daprd
      --
      --mode
      kubernetes
      --dapr-http-port
      3500
      --dapr-grpc-port
      50001
      --dapr-internal-grpc-port
      50002
      --dapr-listen-addresses
      [::1],127.0.0.1
      --dapr-public-port
      3501
      --app-port
      80
      --app-id
      service01
      --control-plane-address
      dapr-api.dapr-system.svc.cluster.local:80
      --app-protocol
      http
      --placement-host-address
      dapr-placement-server.dapr-system.svc.cluster.local:50005
      --config

      --log-level
      info
      --app-max-concurrency
      -1
      --sentry-address
      dapr-sentry.dapr-system.svc.cluster.local:80
      --enable-metrics=true
      --metrics-port
      9090
      --dapr-http-max-request-size
      -1
      --dapr-http-read-buffer-size
      -1
      --dapr-graceful-shutdown-seconds
      -1
      --log-as-json
      --enable-mtls
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       ContainerCannotRun
      Message:      OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/dlv": stat /dlv: no such file or directory: unknown
      Exit Code:    127
      Started:      Sat, 19 Feb 2022 16:01:45 +0800
      Finished:     Sat, 19 Feb 2022 16:01:45 +0800
    Ready:          False
    Restart Count:  33
    Liveness:       http-get http://:3501/v1.0/healthz delay=10s timeout=3s period=6s #success=1 #failure=3
    Readiness:      http-get http://:3501/v1.0/healthz delay=10s timeout=3s period=6s #success=1 #failure=3
    Environment:
      NAMESPACE:              dapr-demo
      DAPR_TRUST_ANCHORS:     -----BEGIN CERTIFICATE-----
                              MIIB2zCCAYKgAwIBAgIRAMWpJtBC5uk9Folb7dBap/0wCgYIKoZIzj0EAwIwMTEX
                              MBUGA1UEChMOZGFwci5pby9zZW50cnkxFjAUBgNVBAMTDWNsdXN0ZXIubG9jYWww
                              HhcNMjIwMjE5MDMyNTI0WhcNMjMwMjE5MDM0MDI0WjAxMRcwFQYDVQQKEw5kYXBy
                              LmlvL3NlbnRyeTEWMBQGA1UEAxMNY2x1c3Rlci5sb2NhbDBZMBMGByqGSM49AgEG
                              CCqGSM49AwEHA0IABFe0HFo8WfhDK3UzH84uh3ra9veCh4YBUH3eLD7XaaDR/gnG
                              K28DDP+P6YMVzhV0/sWe2/Ztr2ggQmWensD09K2jezB5MA4GA1UdDwEB/wQEAwIC
                              BDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDwYDVR0TAQH/BAUwAwEB
                              /zAdBgNVHQ4EFgQUCMQ2YWm8hnbar1tunG0+zkyehn0wGAYDVR0RBBEwD4INY2x1
                              c3Rlci5sb2NhbDAKBggqhkjOPQQDAgNHADBEAiB+v/xvuHpKwkyTvdLDjFLEStRP
                              GcqVXqp5WbMlFs2JTwIgVR3ehcuItyV872tFUYFCISbiARGxbJzgPs9OQnvHjPM=
                              -----END CERTIFICATE-----

      DAPR_CERT_CHAIN:        -----BEGIN CERTIFICATE-----
                              MIIBxjCCAWugAwIBAgIRAIXuoUC5KTyCXjVOdmbhI1UwCgYIKoZIzj0EAwIwMTEX
                              MBUGA1UEChMOZGFwci5pby9zZW50cnkxFjAUBgNVBAMTDWNsdXN0ZXIubG9jYWww
                              HhcNMjIwMjE5MDMyNTI0WhcNMjMwMjE5MDM0MDI0WjAYMRYwFAYDVQQDEw1jbHVz
                              dGVyLmxvY2FsMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeGahgXjsvOXPIkAW
                              opUtFHvvBUNFWkmDyxdllNVJKvH6X0JYmW7y88VeVIeHIr0qHefaQxSw0xBJgaK0
                              EdQG7qN9MHswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
                              BBYEFIAvF908laB8Y4eSZCq+3lBWHIJNMB8GA1UdIwQYMBaAFAjENmFpvIZ22q9b
                              bpxtPs5MnoZ9MBgGA1UdEQQRMA+CDWNsdXN0ZXIubG9jYWwwCgYIKoZIzj0EAwID
                              SQAwRgIhANvDUJA1fE3Vu0NlrDVIua2Zq/ooaDbiFqnYHYSRJ298AiEA8KTqLv2R
                              f39t2rMQc1UEQEMMGY8GAhX6k0a169kbz8Y=
                              -----END CERTIFICATE-----

      DAPR_CERT_KEY:          -----BEGIN EC PRIVATE KEY-----
                              MHcCAQEEIIYFyiu9kkn89a5lfBBgmiPIH7UGDet1FxlmLqdKZnhPoAoGCCqGSM49
                              AwEHoUQDQgAEeGahgXjsvOXPIkAWopUtFHvvBUNFWkmDyxdllNVJKvH6X0JYmW7y
                              88VeVIeHIr0qHefaQxSw0xBJgaK0EdQG7g==
                              -----END EC PRIVATE KEY-----

      SENTRY_LOCAL_IDENTITY:  dapr-demo:default
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-s2f8g (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  kube-api-access-s2f8g:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason   Age                     From     Message
  ----     ------   ----                    ----     -------
  Warning  BackOff  2m23s (x712 over 147m)  kubelet  Back-off restarting failed container

1.3. 查看pod中所有container的日志

kubectl logs service01-7cc7c54c65-g4jzw --all-containers=true -n dapr-demo
{"EventId":14,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Now listening on: http://[::]:80","State":{"Message":"Now listening on: http://[::]:80","address":"http://[::]:80","{OriginalFormat}":"Now listening on: {address}"}}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Application started. Press Ctrl\u002BC to shut down.","State":{"Message":"Application started. Press Ctrl\u002BC to shut down.","{OriginalFormat}":"Application started. Press Ctrl\u002BC to shut down."}}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Hosting environment: Production","State":{"Message":"Hosting environment: Production","envName":"Production","{OriginalFormat}":"Hosting environment: {envName}"}}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Content root path: /app/","State":{"Message":"Content root path: /app/","contentRoot":"/app/","{OriginalFormat}":"Content root path: {contentRoot}"}}

1.4. 查看pod中dapr container的日志

kubectl logs service01-7cc7c54c65-g4jzw -c daprd -n dapr-demo

1.5. 查看pod中dapr container最近几行日志

  • --tail=-1 查看所有行日志
kubectl logs --tail=10 service01-7cc7c54c65-g4jzw -c daprd -n dapr-demo

1.6. 持续查看pod中dapr container的日志

kubectl logs -f service01-7cc7c54c65-g4jzw -c daprd -n dapr-demo

1.7. 按label查看日志

kubectl logs --selector=app=service01 --all-containers -n dapr-demo

2. 查看系统日志

2.1. 使用 tail 工具

tail /var/log/messages -f
Feb 19 16:32:58 localhost kubelet[1077]: E0219 16:32:58.466307    1077 pod_workers.go:918] "Error syncing pod, skipping" err="failed to \"StartContainer\" for \"daprd\" with CrashLoopBackOff: \"back-off 5m0s restarting failed container=daprd pod=service01-7cc7c54c65-gsf8c_dapr-demo(efa871c5-0f1d-41e1-b66f-95fff64c9d37)\"" pod="dapr-demo/service01-7cc7c54c65-gsf8c" podUID=efa871c5-0f1d-41e1-b66f-95fff

2.2. 使用 journalctl 工具

2.2.1. 查看最近的所有日志的前10行

journalctl -r -n 10
-- Logs begin at Tue 2021-12-28 23:05:04 CST, end at Sat 2022-02-19 16:41:01 CST. --
Feb 19 16:40:09 node-master systemd[1]: sysstat-collect.service: Succeeded.
Feb 19 16:40:09 node-master systemd[1]: Starting system activity accounting tool...
Feb 19 16:36:04 node-master systemd-logind[802]: Removed session 4.
Feb 19 16:36:04 node-master systemd-logind[802]: Session 4 logged out. Waiting for processes to exit.
Feb 19 16:36:04 node-master systemd[1]: session-4.scope: Succeeded.
Feb 19 16:36:04 node-master sshd[39571]: pam_unix(sshd:session): session closed for user root
Feb 19 16:36:01 node-master systemd-logind[802]: Removed session 1.
Feb 19 16:36:01 node-master systemd[1]: session-1.scope: Succeeded.
Feb 19 16:36:01 node-master systemd-logind[802]: Session 1 logged out. Waiting for processes to exit.
Feb 19 16:36:01 node-master sshd[3605]: pam_unix(sshd:session): session closed for user root

2.2.2. 查看指定应用的日志

journalctl -ru kubelet
journalctl -ru kube-scheduler
journalctl -ru kube-apiserver

2.2.3. 结合使用

journalctl -ru kubelet | grep cni | tail -n 5
 network plugin is not ready: cni config uninitialized"
Feb 17 17:18:56 node-master kubelet[42457]: I0217 17:18:56.564503   42457 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"
Feb 17 17:18:56 node-master kubelet[42457]: I0217 17:18:56.564436   42457 docker_service.go:258] "Docker cri networking managed by the network plugin" networkPluginName="cni"
Feb 17 17:18:56 node-master kubelet[42457]: I0217 17:18:56.564377   42457 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"
Feb 17 17:18:56 node-master kubelet[42457]: I0217 17:18:56.560754   42457 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"

3. 用docker查看日志

3.1. 查看docker container

docker ps | grep k8schina/service02
690594264b75   k8schina/service02                                  "dotnet Service02.dll"   3 hours ago    Up 3 hours              k8s_service02_service02-6d849d9f97-mk286_dapr-demo_f3274fb9-9ce3-4a58-9872-bfccf4f473b6_0

3.2. 查看指定container日志

docker logs 690594264b75
{"EventId":14,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Now listening on: http://[::]:80","State":{"Message":"Now listening on: http://[::]:80","address":"http://[::]:80","{OriginalFormat}":"Now listening on: {address}"}}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Application started. Press Ctrl\u002BC to shut down.","State":{"Message":"Application started. Press Ctrl\u002BC to shut down.","{OriginalFormat}":"Application started. Press Ctrl\u002BC to shut down."}}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Hosting environment: Production","State":{"Message":"Hosting environment: Production","envName":"Production","{OriginalFormat}":"Hosting environment: {envName}"}}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Hosting.Lifetime","Message":"Content root path: /app/","State":{"Message":"Content root path: /app/","contentRoot":"/app/","{OriginalFormat}":"Content root path: {contentRoot}"}}
{"EventId":13,"LogLevel":"Error","Category":"Microsoft.AspNetCore.Server.Kestrel","Message":"Connection id \u00220HMFJDGT5UAFQ\u0022, Request id \u00220HMFJDGT5UAFQ:00000002\u0022: An unhandled exception was thrown by the application.","Exception":"Dapr.Client.InvocationException: An exception occurred while invoking method: \u0027api/hello\u0027 on app-id: \u0027service01\u0027  ---\u003E System.Net.Http.HttpRequestException: Connection refused (127.0.0.1:3500)  ---\u003E System.Net.Sockets.SocketException (111): Connection refused    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)    at System.Net.Sockets.Socket.\u003CConnectAsync\u003Eg__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)    --- End of inner exception stack trace ---    at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)    at System.Threading.Tasks.TaskCompletionSourceWithCancellation\u00601.WaitWithCancellationAsync(CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)    at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.HttpClient.\u003CSendAsync\u003Eg__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)    at Dapr.Client.DaprClientGrpc.InvokeMethodWithResponseAsync(HttpRequestMessage request, CancellationToken cancellationToken)    --- End of inner exception stack trace ---    at Dapr.Client.DaprClientGrpc.InvokeMethodWithResponseAsync(HttpRequestMessage request, CancellationToken cancellationToken)    at Dapr.Client.DaprClientGrpc.InvokeMethodAsync[TResponse](HttpRequestMessage request, CancellationToken cancellationToken)    at Service02.Controllers.HelloController.Hello() in /src/Service02/Controller/HelloController.cs:line 20    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003Eg__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)    at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)    at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication\u00601 application)","State":{"Message":"Connection id \u00220HMFJDGT5UAFQ\u0022, Request id \u00220HMFJDGT5UAFQ:00000002\u0022: An unhandled exception was thrown by the application.","ConnectionId":"0HMFJDGT5UAFQ","TraceIdentifier":"0HMFJDGT5UAFQ:00000002","{OriginalFormat}":"Connection id \u0022{ConnectionId}\u0022, Request id \u0022{TraceIdentifier}\u0022: An unhandled exception was thrown by the application."}}
{"EventId":13,"LogLevel":"Error","Category":"Microsoft.AspNetCore.Server.Kestrel","Message":"Connection id \u00220HMFJDGT5UAFR\u0022, Request id \u00220HMFJDGT5UAFR:00000002\u0022: An unhandled exception was thrown by the application.","Exception":"Dapr.Client.InvocationException: An exception occurred while invoking method: \u0027api/hello\u0027 on app-id: \u0027service01\u0027  ---\u003E System.Net.Http.HttpRequestException: Connection refused (127.0.0.1:3500)  ---\u003E System.Net.Sockets.SocketException (111): Connection refused    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)    at System.Net.Sockets.Socket.\u003CConnectAsync\u003Eg__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)    --- End of inner exception stack trace ---    at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)    at System.Threading.Tasks.TaskCompletionSourceWithCancellation\u00601.WaitWithCancellationAsync(CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)    at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)    at System.Net.Http.HttpClient.\u003CSendAsync\u003Eg__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)    at Dapr.Client.DaprClientGrpc.InvokeMethodWithResponseAsync(HttpRequestMessage request, CancellationToken cancellationToken)    --- End of inner exception stack trace ---    at Dapr.Client.DaprClientGrpc.InvokeMethodWithResponseAsync(HttpRequestMessage request, CancellationToken cancellationToken)    at Dapr.Client.DaprClientGrpc.InvokeMethodAsync[TResponse](HttpRequestMessage request, CancellationToken cancellationToken)    at Service02.Controllers.HelloController.Hello() in /src/Service02/Controller/HelloController.cs:line 20    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003Eg__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)    at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)    at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication\u00601 application)","State":{"Message":"Connection id \u00220HMFJDGT5UAFR\u0022, Request id \u00220HMFJDGT5UAFR:00000002\u0022: An unhandled exception was thrown by the application.","ConnectionId":"0HMFJDGT5UAFR","TraceIdentifier":"0HMFJDGT5UAFR:00000002","{OriginalFormat}":"Connection id \u0022{ConnectionId}\u0022, Request id \u0022{TraceIdentifier}\u0022: An unhandled exception was thrown by the application."}}

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐