1

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:

enter image description here

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?

Thomas Jäckle
  • 1,123
  • 2
  • 7
  • 21

1 Answers1

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.

Thomas Jäckle
  • 1,123
  • 2
  • 7
  • 21
  • I followed your explainations and made sure that the services are up but still get 502 Bad Gateway - Also for "Create Thing" - Any idea whad need to be configured in the Nginx ? – otluk Dec 26 '19 at 22:44