问题
I am new to docker, I'm using docker on windows 10 and am using Eclipse Ditto and Eclipse Mosquitto, I have to create a twin device. Before that I have to create a new policy via Postman, While executing the policy am getting the following error:
The code to create the new policy is ass follow
curl -X put 'http://localhost:8080/api/2/policies/my.test:policy' -u 'ditto:ditto' -H 'Content-Type: application/json' -d '{
"entries": {
"owner": {
"subjects": {
"nginx:ditto": {
"type": "nginx basic auth user"
}
},
"resources": {
"thing:/": {
"grant": [
"READ","WRITE"
],
"revoke": []
},
"policy:/": {
"grant": [
"READ","WRITE"
],
"revoke": []
},
"message:/": {
"grant": [
"READ","WRITE"
],
"revoke": []
}
}
}
}
}'
I'm following the procedure given in this link
is there any solution to solve this kind of problem?
回答1:
Seems that the Eclipse Ditto gateway
service was not running correctly.
I'm confident that you figured out to look at the output of docker-compose ps
and restarted the services.
来源:https://stackoverflow.com/questions/53953975/502-bad-gateway-nginx-1-13-12-on-localhost-while-creating-a-new-policy-in-ditto