VMware Cloud Community
qc4vmware
Virtuoso
Virtuoso

AD Plugin errors - Error when destroying an element: Connection reset

I have a workflow which needs to cleanup our environment after removing a vApp and I am trying to use the AD plugin to destroy the machine object using the computerAd.destroy() method and I keep getting the following error popping up.  It seems like it goes away for a couple of deletions if I reset the services but then comes back:

2012-12-17 16:59:50.945-0800 INFO  [ADBase] Destroying object!!! CN=grnfldw2k80147,OU=someOU,OU=Servers,OU=backyard,DC=qualcomm,DC=com
2012-12-17 16:59:50.945-0800 ERROR [ADBase] Error when destroying an element: Connection reset
2012-12-17 16:59:50.945-0800 WARN  [WorkflowItemTaskRunner] Script execution error on workflow : QCretirevApp / 'Remove AD'(item0) : Error when destroyingan element: Connection reset (Workflow:QCretireVm / Remove AD (item0)#6)

Anyone have a clue what might be going on?

Paul

0 Kudos
22 Replies
igaydajiev
VMware Employee
VMware Employee

There is a issue with the plugin when multiple operation are performed in paralel ( Ussualy the error appears when multiple operations are perfomed over one entity at the same time  e.g group, OU .. )

The issue will be fixed in next plugin release.

qc4vmware
Virtuoso
Virtuoso

What would qualify as a paralell operation? I don't think I am initiating anything against the OU or object aside from the removal.  Would inserting a loop or pause alleviate the error?

Paul

0 Kudos
igaydajiev
VMware Employee
VMware Employee

This error ussually appears appear If you have one or more workflows trying to add/remove user to given group  and one or more workflows trying to list the users of the same group.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

That is definitely not going on here.  This happens when no other workflows are running.  Literally the only thing that is executing is the computerAD.destroy() method. This is on a machine object in a computer OU. 

0 Kudos
igaydajiev
VMware Employee
VMware Employee

Similar thing can happen if you remove/add computer to OU, and then  trying to read some info from the same OU, like users, computers ... or simply browsing it trough the inventory or doing some modification to the OU like addding more computers, users ..

0 Kudos
qc4vmware
Virtuoso
Virtuoso

When is the updated plugin scheduled to be released?

0 Kudos
aleksandarp
VMware Employee
VMware Employee

It is not yet fully known but ther is high probability to be available first half of 2013.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

Well for anyone that might come across the same issue I am working around it currently in this manner.  My example will only work if you have vCO installed on a windows host and you set the vmo.properties file with com.vmware.js.allow-local-process=true.  I first attempt to run it with the plugin and if that fails I fall back to the windows command line utility. If you have the vCO services set to run under a priveledged account I don't think you'll need the user and pwd vars but I haven't tested it.

System.log("Attempting to remove AD object distinguishedName: " + computerAD.distinguishedName);

var tryDsrm = false;
var returnVal = true;

try {
    computerAD.destroy();
}
catch (err) {
    System.log("AD Computer deletion with vCO plugin attempt failed with error: " + err.message);
    tryDsrm = true;
    returnVal = false;
}

if (tryDsrm) {
    var user = "someusername";
    var pwd = "somepasswd";
    var commandTxt = "c:/windows/system32/dsrm.exe -noprompt \""+ computerAD.distinguishedName + "\" -u " + user + " -p " + pwd;
    var cmd = new Command(commandTxt);
    cmd.execute(true);

    System.log("Command result: " + cmd.result);
    System.log("Command output: " + cmd.output);

    if (cmd.result == 0 && cmd.output.indexOf("dsrm succeeded") >= 0) {
        System.log("AD computer object deletion successful with DSRM.");
        returnVal = true;
    }
    else {
        throw "Failed to remove computer object from AD!  Both vCO plugin and DSRM attempts were unsuccessful.";
    }

}
else {
    System.log("AD computer deletion successful with vCO plugin");
}

return returnVal;

0 Kudos
igaydajiev
VMware Employee
VMware Employee

Pre-release  version of Active Drivetory plugin containing fix for described issue can be found here :

http://communities.vmware.com/docs/DOC-21481

0 Kudos
qc4vmware
Virtuoso
Virtuoso

Thanks!  I will download it later today and try and run some tests.

0 Kudos
igaydajiev
VMware Employee
VMware Employee

There is a newer version of the file. Please make sure to download the new one.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

I did some testing today and so far it looks like it has eliminated the error I have been seeing.  It was sporadic so I will keep an eye on things.  I have one set of workflows that i run regularly that seem to tickle it.  If you don't hear back assume I haven't hit any more errors.

0 Kudos
igaydajiev
VMware Employee
VMware Employee

Great..

Thanks for the feedback.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

Something happend today and my plugin is getting errors now.  It won't load up in the inventory if I click through it justd show a red x with "Error in plugin".  Is this possibly a bug in the plugin?  I was playing around with the configuration but I have set it back to a known good config and the error persists.  I am seeing these errors in the server log (just the start of the error:

2013-01-29 14:51:09.901-0800 ERROR [ADBase] GetUUID

java.lang.NullPointerException

at ch.dunes.ad.object.ADBase.getUUID(ADBase.java:192)

at ch.dunes.ad.object.ADBase.<init>(ADBase.java:47)

at ch.dunes.ad.object.ADLeafElement.<init>(ADLeafElement.java:29)

at ch.dunes.ad.object.ADUnknown.<init>(ADUnknown.java:24)

at ch.dunes.ad.object.ADObjectFactory.createADUnknown(ADObjectFactory.java:37)

at ch.dunes.ad.object.Container.putNewInstanceInList(Container.java:291)

at ch.dunes.ad.object.Container.refreshChildren(Container.java:248)

at ch.dunes.ad.object.Container.findRelation(Container.java:178)

at ch.dunes.common.plugin.MSPluginFactory.findRelation(MSPluginFactory.java:177)

0 Kudos
igaydajiev
VMware Employee
VMware Employee

Hi, I have updated once more the AD plugin preview version.

Updated version (o11nplugin-ad-1.0.2-683) contains fix for "Null pointer exception".

Let me know if this resolves your issue.

Thanks, Ivo

0 Kudos
qc4vmware
Virtuoso
Virtuoso

It won't download for me... I have tried on several machines on different networks.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

Never mind I got it finally... must have been a glitch.

0 Kudos
qc4vmware
Virtuoso
Virtuoso

So far so good.  Looks like it is behaving now.

0 Kudos
babarton
Contributor
Contributor

I just noticed this thread today, but we too have been struggling with this "connection reset" and "null pointer

exception" while interacting with AD.  I put this latest plugin in today and have been testing it pretty hard.  It seems solid.

Thanks for the update

0 Kudos