502 Bad Gateway nginx/1.13.12 on localhost while creating a new policy in ditto

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-15 10:56:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!