ncekic
Contributor
Contributor

Troubleshooting vRO Policy problem

Hey Guys,

i have Problems with my vRO policies and do not know how to solve that Problem. Daily my policies are stopping due to an unkonw reason. what i found is the following:

Connection error: org.postgresql.util.PSQLException: FATAL: remaining Connection Slots are reserved for non-replication superuser Connection

Is it possible to see if the policies are running like:

systemctl  <Status> <servicename>

I would like to create a script in the appliance which checks if the policies are running and if not to send an email.

Where can i find the policies which are running on vRO in my console?

0 Kudos
3 Replies
iiliev
VMware Employee
VMware Employee

Hi,

This error message likely means that there are database connections' leaks somewhere.

To enumerate vRO policies and their statuses, you can use vRO scripting like the following:

var all = Server.findAllForType("Policy");

for each (var p in all) {

  System.log("Policy name: '" + p.name + "'  status: " + p.status);

}

0 Kudos
ncekic
Contributor
Contributor

Hey thx a lot and sorry for my late answer. I was abroad and 1 month off.

One question, how i Configure my vro appliance to start the policies again when they were stopped for any reason? For now i have everyday to Login into the appliance and check if the policies are running. I want to have a Job on the appliance a script or something else which is checking if the policies are running and if not to start them.

Is there a smart solution for that?

0 Kudos
iiliev
VMware Employee
VMware Employee

You can write a workflow and schedule it to be executed regularly (eg. every 15 minutes, or at any interval you want).

Inside this workflow, you can enumerate all policies, using the code provided above, then check the current status for the each policy object using its status property, and if the status is stopped, start the policy again using its start() method.

0 Kudos