[midPoint] Intermittent error executing powershell script: The WS-Management service cannot process the request because the request contained invalid selectors for the resource.

Alcides Carlos de Moraes Neto alcides.neto at gmail.com
Thu Feb 7 15:11:21 CET 2019


So, I was checking the AdLdapConnector source code (
https://github.com/Evolveum/connector-ldap/blob/master/src/main/java/com/evolveum/polygon/connector/ldap/ad/AdLdapConnector.java
)

The method cleanupScriptingBeforeTest() cleans a powerhellMap, I think
that's what resolves the issue.

Shouldn't the connector detect the error and re-establish the connection?
Or should that be a task for the powerhell lib?

Em ter, 5 de fev de 2019 às 19:39, Alcides Carlos de Moraes Neto <
alcides.neto at gmail.com> escreveu:

> I figured that this has something to do with a  "Shellid" parameter that
> winrm4j uses.
> I believe the shellid that's being passed is for a dead/terminated shell
> and that gives the error.
> If I click on Test Connection on the resource page, the error stops.
> Something inside the connector is being reset.
> Does the AdLdap connector have a winrm connection pool  or something like
> that? Shouldn 't it be refreshed from time to time?
>
>
> Em ter, 5 de fev de 2019 às 16:57, Alcides Carlos de Moraes Neto <
> alcides.neto at gmail.com> escreveu:
>
>> Hello list,
>>
>> We have midPoint 3.8 running, with AD resource working fine most of the
>> time, with some Powershell scripts. Connector version is the one bundled
>> with midpoint, 1.6
>> The scripts execute fine most of the time, however sometimes they fail
>> with the following message:
>>
>> org.apache.cxf.binding.soap.SoapFault(The WS-Management service cannot
>> process the request because the request contained invalid selectors for the
>> resource. ):
>>
>> There is nothing else in the stack, just that repeated over and over.
>>
>> Usually, if you recompute the user one or two more times, the script will
>> eventually execute successfully. We do have a few users that fail
>> everytime, though. We have been debugging them but we can't seem to find
>> the point of failure
>> Any suggestions on what this may be?
>>
>> Here are snips of our resource and scripts configuration (private info
>> removed):
>>
>> <gen604:host>...
>> <gen604:port>636</gen604:port>
>> <gen604:connectionSecurity>ssl</gen604:connectionSecurity>
>> <gen604:bindDn>...
>> <gen604:bindPassword>...
>> <gen604:baseContext>DC=....
>> <gen604:referralStrategy>follow</gen604:referralStrategy>
>> <gen604:pagingStrategy>spr</gen604:pagingStrategy>
>> <gen604:operationalAttributes>....
>> <gen604:winRmHost>...
>>  <gen604:winRmUsername>...
>> <gen604:winRmDomain>...
>> <gen604:winRmPassword>...
>> <gen604:winRmPort>5986</gen604:winRmPort>
>> <gen604:winRmUseHttps>true</gen604:winRmUseHttps>
>>
>> <script>
>>          <host>resource</host>
>>          <language>cmd</language>
>>          <argument>....</argument>
>>          <code>powershell -file
>> "c:\midpoint-scripts\enable-mailbox.ps1"</code>
>> ...
>> </scripts>
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20190207/9c1781b3/attachment.htm>


More information about the midPoint mailing list