在同上创建新策略时,本地主机上的502 Bad Gateway nginx/1.13.12 [英] 502 Bad Gateway nginx/1.13.12 on localhost while creating a new policy in ditto

查看:187
本文介绍了在同上创建新策略时,本地主机上的502 Bad Gateway nginx/1.13.12的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是docker的新手,我在Windows 10上使用docker,并且正在使用Eclipse Ditto和Eclipse Mosquitto,我必须创建一个孪生设备.在此之前,我必须通过邮递员创建新政策, 执行策略时出现以下错误:

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?

推荐答案

似乎Eclipse Ditto gateway服务未正确运行. 我相信您已经找到了docker-compose ps的输出并重新启动了服务.

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.

这篇关于在同上创建新策略时,本地主机上的502 Bad Gateway nginx/1.13.12的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆