https://cerbos.dev logo
#help
Title
# help
a

ANILA SOMAN

01/19/2023, 9:31 AM
Hi I have done a small POC in Cerebos using Rest Api and I used MySQL database. Now I changed all my rest API calls (addPolicy and checkPolicy) to grpc call after that I tried to run the docker compose but I got the below error.Do we need to do any changes in Dockerfile/Dockercomposefile/config.yaml file while changing from Rest API to grpc?
a

Alex Olivier (Cerbos)

01/19/2023, 9:34 AM
Hey that error is about Cerbos instance not being able to connect to the database rather than the rest/grpc change.
Is your DB running on that IP/port?
a

ANILA SOMAN

01/19/2023, 9:36 AM
Screenshot_2023-01-19_15-06-15.png
Screenshot_2023-01-19_15-07-01.png
a

Alex Olivier (Cerbos)

01/19/2023, 9:37 AM
The error would imply that it isn’t running on
172.18.0.2:3306
so my guess would be the IP is different
can you use the DNS name?
a

ANILA SOMAN

01/19/2023, 9:41 AM
ok let me try
thanks its connected to DB everything is working fine but still getting 1 error
2023-01-19 173212 {"log.level":"error","@timestamp":"2023-01-19T120212.578Z","log.logger":"cerbos.compiler","message":"Failed to recompile","id":{},"error":"1 compilation errors\nunknown<cerbos.resource.contact.vdefault/nokia> Missing ancestor policy \"resource.contact.vdefault\" (missing policy definition)"}
c

Charith (Cerbos)

01/19/2023, 12:10 PM
That means that you have a scoped policy set that's missing the "no scope" (empty) policy. Essentially, you have to create a
contact
policy with an empty
scope
. It could be a policy without any rules, but it must exist.
a

ANILA SOMAN

01/19/2023, 12:11 PM
@Charith (Cerbos) thank you for the update
yes tried, error gone!! Thanks @Charith (Cerbos) and @Alex Olivier (Cerbos)
4 Views