-2
    curl -X POST -i -u ditto:foobar -H 'Content-Type: application/json' -d '{
  "targetActorSelection": "/system/sharding/connection",
  "headers": {
    "aggregate": false
    },
  "piggybackCommand": {
  "type": "connectivity.commands:testConnection",
  "connection": {
    "id": "'$MY_DEVICE'",
    "connectionType": "amqp-10",
    "connectionStatus": "open",
    "uri": "amqp://consumer%40HONO:my-pwd@$AMQP_NETWORK_IP:15672",
    "failoverEnabled": true,
      "sources": [{
        "addresses": [
          "telemetry/$MY_TENANT",
          "event/$MY_TENANT"
        ]
      }]
      }
     }
  }' http://localhost:8080/devops/piggyback/connectivity?timeout=8000

错误提示:

HTTP/1.1 401 Unauthorized
Server: nginx/1.13.12
Date: Sun, 19 Jan 2020 11:20:52 GMT
Content-Type: text/plain; charset=UTF-8
Content-Length: 38
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
WWW-Authenticate: Basic realm="DITTO-DEVOPS",charset=UTF-8
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Accept,Authorization,Cache-Control,Content-Type,Content-Length,DNT,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Origin,User-Agent,X-Requested-With

提供的身份验证无效

4

1 回答 1

3

如果您的问题是(我必须假设没有问题)正确的凭据是什么,请查看Eclipse Ditto 操作文档

用户名:devops,密码:foobar

于 2020-01-20T07:14:37.997 回答