<div dir="ltr"><div>Hi,</div><div><br></div><div>We did it this way so we could call a ps1 file and pass midpoint parameters, we found out this way was faster/easier. I don't think it'll make any difference, it fails before the shell session even starts.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qui, 14 de fev de 2019 às 16:17, Sylvaire kevin TIPA <<a href="mailto:sylvaire-kevin.tipa@mythalesgroup.io">sylvaire-kevin.tipa@mythalesgroup.io</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="FR">
<div class="gmail-m_-3555707108009694817WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Why do you call « cmd » ? In my case I calling directly powershell and it’s work find (maybe i twill change nothing, but in any case
 you will remove 1 step)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><script><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <host>resource</host><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <language>powershell</language><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <argument><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">               <c:path xsi:type="t:ItemPathType">$user/name</c:path><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">              <name>identity</name><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            </argument><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <code>powershell "C:\midpoint\myscript.ps1 $identity"</code><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <operation>add</operation><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <kind>account</kind><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <order>after</order><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"></script><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">I have testing to call directly powershell also, and It work, I think this is the best way :
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><script><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <host>resource</host><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <language>powershell</language><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <argument><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">               <c:path xsi:type="t:ItemPathType">$user/name</c:path><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">              <name>identity</name><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            </argument><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <code>"C:\midpoint\myscript.ps1 $identity"</code><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <operation>add</operation><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <kind>account</kind><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">            <order>after</order><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"></script><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">MP 3.7.2 for me, with std AD and AD connector.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Br,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:"Calibri",sans-serif">De :</span></b><span style="font-size:11pt;font-family:"Calibri",sans-serif"> midPoint <<a href="mailto:midpoint-bounces@lists.evolveum.com" target="_blank">midpoint-bounces@lists.evolveum.com</a>>
<b>De la part de</b> Alcides Carlos de Moraes Neto<br>
<b>Envoyé :</b> jeudi 14 février 2019 18:45<br>
<b>À :</b> midpoint <<a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a>><br>
<b>Objet :</b> Re: [midPoint] Intermittent error executing powershell script: The WS-Management service cannot process the request because the request contained invalid selectors for the resource.<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">We have raised every Windows parameter related to number of powershell sessions, timeouts, maximum memory, etc.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">After a week, the error returned. Testing the connection made it go away again.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Stack trace:<u></u><u></u></p>
</div>
<div>
<pre>2019-02-14T14:33:04.556 ERROR [com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnIdUtil] (midPointScheduler_Worker-4) ConnId Exception javax.xml.ws.soap.SOAPFaultException in connector:949134f0-413d-46b2-ac63-f4bf28c7f9ba(ConnId com.evolveum.polygon.connector.ldap.ad.AdLdapConnector v1.6): ConnectorSpec(resource:3341f1ce-f96f-43fe-8bc9-7a9ec051b71b(ADSFPRD), name=null, oid=949134f0-413d-46b2-ac63-f4bf28c7f9ba): The WS-Management service cannot process the request because the request contained invalid selectors for the resource. <u></u><u></u></pre>
<pre>javax.xml.ws.soap.SOAPFaultException: The WS-Management service cannot process the request because the request contained invalid selectors for the resource. <u></u><u></u></pre>
<pre>        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy257.command(Unknown Source)<u></u><u></u></pre>
<pre>        at io.cloudsoft.winrm4j.client.WinRmClient.command(WinRmClient.java:274)<u></u><u></u></pre>
<pre>        at com.evolveum.powerhell.PowerHellWinRmExecImpl.runCommand(PowerHellWinRmExecImpl.java:56)<u></u><u></u></pre>
<pre>        at com.evolveum.polygon.connector.ldap.ad.AdLdapConnector.runScriptOnResource(AdLdapConnector.java:630)<u></u><u></u></pre>
<pre>        at org.identityconnectors.framework.impl.api.local.operations.ScriptOnResourceImpl.runScriptOnResource(ScriptOnResourceImpl.java:66)<u></u><u></u></pre>
<pre>        at sun.reflect.GeneratedMethodAccessor1404.invoke(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<u></u><u></u></pre>
<pre>        at java.lang.reflect.Method.invoke(Method.java:498)<u></u><u></u></pre>
<pre>        at org.identityconnectors.framework.impl.api.local.operations.ConnectorAPIOperationRunnerProxy.invoke(ConnectorAPIOperationRunnerProxy.java:98)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy227.runScriptOnResource(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.GeneratedMethodAccessor1404.invoke(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<u></u><u></u></pre>
<pre>        at java.lang.reflect.Method.invoke(Method.java:498)<u></u><u></u></pre>
<pre>        at org.identityconnectors.framework.impl.api.local.operations.ThreadClassLoaderManagerProxy.invoke(ThreadClassLoaderManagerProxy.java:96)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy227.runScriptOnResource(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.GeneratedMethodAccessor1404.invoke(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<u></u><u></u></pre>
<pre>        at java.lang.reflect.Method.invoke(Method.java:498)<u></u><u></u></pre>
<pre>        at org.identityconnectors.framework.impl.api.DelegatingTimeoutProxy.invoke(DelegatingTimeoutProxy.java:99)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy227.runScriptOnResource(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.GeneratedMethodAccessor1404.invoke(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<u></u><u></u></pre>
<pre>        at java.lang.reflect.Method.invoke(Method.java:498)<u></u><u></u></pre>
<pre>        at org.identityconnectors.framework.impl.api.LoggingProxy.invoke(LoggingProxy.java:83)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy227.runScriptOnResource(Unknown Source)<u></u><u></u></pre>
<pre>        at org.identityconnectors.framework.impl.api.AbstractConnectorFacade.runScriptOnResource(AbstractConnectorFacade.java:265)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnectorInstanceConnIdImpl.executeScriptIcf(ConnectorInstanceConnIdImpl.java:2957)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnectorInstanceConnIdImpl.checkAndExecuteAdditionalOperations(ConnectorInstanceConnIdImpl.java:2892)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnectorInstanceConnIdImpl.modifyObject(ConnectorInstanceConnIdImpl.java:1878)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.provisioning.impl.ResourceObjectConverter.executeModify(ResourceObjectConverter.java:782)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.provisioning.impl.ResourceObjectConverter.modifyResourceObject(ResourceObjectConverter.java:584)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.provisioning.impl.ShadowCache.modifyShadow(ShadowCache.java:906)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.modifyObject(ProvisioningServiceImpl.java:644)<u></u><u></u></pre>
<pre>        at sun.reflect.GeneratedMethodAccessor888.invoke(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<u></u><u></u></pre>
<pre>        at java.lang.reflect.Method.invoke(Method.java:498)<u></u><u></u></pre>
<pre>        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.wrapSubsystem(MidpointInterceptor.java:137)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.invoke(MidpointInterceptor.java:53)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy124.modifyObject(Unknown Source)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.lens.ChangeExecutor.modifyProvisioningObject(ChangeExecutor.java:1505)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.lens.ChangeExecutor.executeModification(ChangeExecutor.java:1379)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.lens.ChangeExecutor.executeDelta(ChangeExecutor.java:915)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.lens.ChangeExecutor.executeChanges(ChangeExecutor.java:318)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.lens.Clockwork.lambda$processSecondary$0(Clockwork.java:630)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.lens.ClockworkMedic.partialExecute(ClockworkMedic.java:170)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.lens.ClockworkMedic.partialExecute(ClockworkMedic.java:150)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.lens.Clockwork.processSecondary(Clockwork.java:628)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.lens.Clockwork.click(Clockwork.java:471)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.lens.Clockwork.run(Clockwork.java:196)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:547)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:338)<u></u><u></u></pre>
<pre>        at sun.reflect.GeneratedMethodAccessor1387.invoke(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<u></u><u></u></pre>
<pre>        at java.lang.reflect.Method.invoke(Method.java:498)<u></u><u></u></pre>
<pre>        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.wrapSubsystem(MidpointInterceptor.java:137)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.invoke(MidpointInterceptor.java:53)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy126.executeChanges(Unknown Source)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.scripting.helpers.OperationsHelper.applyDelta(OperationsHelper.java:79)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.scripting.actions.RecomputeExecutor.execute(RecomputeExecutor.java:82)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator.executeAction(ScriptingExpressionEvaluator.java:227)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator.evaluateExpression(ScriptingExpressionEvaluator.java:206)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.scripting.expressions.SearchEvaluator.lambda$evaluate$1(SearchEvaluator.java:141)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.controller.ModelController.lambda$searchObjectsIterative$1(ModelController.java:1111)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.repo.cache.RepositoryCache$1.handle(RepositoryCache.java:357)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever.searchObjectsIterativeAttempt(ObjectRetriever.java:769)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.searchObjectsIterativeBySingleTransaction(SqlRepositoryServiceImpl.java:873)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.searchObjectsIterative(SqlRepositoryServiceImpl.java:847)<u></u><u></u></pre>
<pre>        at sun.reflect.GeneratedMethodAccessor658.invoke(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<u></u><u></u></pre>
<pre>        at java.lang.reflect.Method.invoke(Method.java:498)<u></u><u></u></pre>
<pre>        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.wrapSubsystem(MidpointInterceptor.java:137)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.invoke(MidpointInterceptor.java:53)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy60.searchObjectsIterative(Unknown Source)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.repo.cache.RepositoryCache.searchObjectsIterative(RepositoryCache.java:362)<u></u><u></u></pre>
<pre>        at sun.reflect.GeneratedMethodAccessor658.invoke(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<u></u><u></u></pre>
<pre>        at java.lang.reflect.Method.invoke(Method.java:498)<u></u><u></u></pre>
<pre>        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.wrapSubsystem(MidpointInterceptor.java:137)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.invoke(MidpointInterceptor.java:53)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy60.searchObjectsIterative(Unknown Source)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.controller.ModelController.searchObjectsIterative(ModelController.java:1121)<u></u><u></u></pre>
<pre>        at sun.reflect.GeneratedMethodAccessor2389.invoke(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<u></u><u></u></pre>
<pre>        at java.lang.reflect.Method.invoke(Method.java:498)<u></u><u></u></pre>
<pre>        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.wrapSubsystem(MidpointInterceptor.java:137)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.invoke(MidpointInterceptor.java:53)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy126.searchObjectsIterative(Unknown Source)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.scripting.expressions.SearchEvaluator.evaluate(SearchEvaluator.java:165)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator.evaluateExpression(ScriptingExpressionEvaluator.java:204)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator.evaluateExpression(ScriptingExpressionEvaluator.java:174)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator.evaluateExpression(ScriptingExpressionEvaluator.java:148)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.controller.ModelController.evaluateExpression(ModelController.java:2037)<u></u><u></u></pre>
<pre>        at sun.reflect.GeneratedMethodAccessor2388.invoke(Unknown Source)<u></u><u></u></pre>
<pre>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<u></u><u></u></pre>
<pre>        at java.lang.reflect.Method.invoke(Method.java:498)<u></u><u></u></pre>
<pre>        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.wrapSubsystem(MidpointInterceptor.java:137)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.util.aspect.MidpointInterceptor.invoke(MidpointInterceptor.java:53)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)<u></u><u></u></pre>
<pre>        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)<u></u><u></u></pre>
<pre>        at com.sun.proxy.$Proxy126.evaluateExpression(Unknown Source)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.model.impl.scripting.ScriptExecutionTaskHandler.run(ScriptExecutionTaskHandler.java:80)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executePlainTaskHandler(JobExecutor.java:671)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeHandler(JobExecutor.java:660)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeRecurrentTask(JobExecutor.java:535)<u></u><u></u></pre>
<pre>        at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.execute(JobExecutor.java:190)<u></u><u></u></pre>
<pre>        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)<u></u><u></u></pre>
<pre>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:588)<u></u><u></u></pre>
<pre>Caused by: org.apache.cxf.binding.soap.SoapFault: The WS-Management service cannot process the request because the request contained invalid selectors for the resource. <u></u><u></u></pre>
<pre>        at org.apache.cxf.binding.soap.interceptor.Soap12FaultInInterceptor.unmarshalFault(Soap12FaultInInterceptor.java:155)<u></u><u></u></pre>
<pre>        at org.apache.cxf.binding.soap.interceptor.Soap12FaultInInterceptor.handleMessage(Soap12FaultInInterceptor.java:66)<u></u><u></u></pre>
<pre>        at org.apache.cxf.binding.soap.interceptor.Soap12FaultInInterceptor.handleMessage(Soap12FaultInInterceptor.java:52)<u></u><u></u></pre>
<pre>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)<u></u><u></u></pre>
<pre>        at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112)<u></u><u></u></pre>
<pre>        at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)<u></u><u></u></pre>
<pre>        at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)<u></u><u></u></pre>
<pre>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)<u></u><u></u></pre>
<pre>        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:805)<u></u><u></u></pre>
<pre>        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1684)<u></u><u></u></pre>
<pre>        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1560)<u></u><u></u></pre>
<pre>        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1361)<u></u><u></u></pre>
<pre>        at org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit$AsyncWrappedOutputStream.close(AsyncHTTPConduit.java:415)<u></u><u></u></pre>
<pre>        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)<u></u><u></u></pre>
<pre>        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:658)<u></u><u></u></pre>
<pre>        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)<u></u><u></u></pre>
<pre>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)<u></u><u></u></pre>
<pre>        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:518)<u></u><u></u></pre>
<pre>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:427)<u></u><u></u></pre>
<pre>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:328)<u></u><u></u></pre>
<pre>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:281)<u></u><u></u></pre>
<pre>        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)<u></u><u></u></pre>
<pre>        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)<u></u><u></u></pre>
<pre>        ... 135 common frames omitted<u></u><u></u></pre>
<pre>2019-02-14T14:33:04.556 ERROR [com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnIdUtil] (midPointScheduler_Worker-4) FALLBACK: javax.xml.ws.soap.SOAPFaultException -> null<u></u><u></u></pre>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Em qui, 7 de fev de 2019 às 12:11, Alcides Carlos de Moraes Neto <<a href="mailto:alcides.neto@gmail.com" target="_blank">alcides.neto@gmail.com</a>> escreveu:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">So, I was checking the AdLdapConnector source code (<a href="https://github.com/Evolveum/connector-ldap/blob/master/src/main/java/com/evolveum/polygon/connector/ldap/ad/AdLdapConnector.java" target="_blank">https://github.com/Evolveum/connector-ldap/blob/master/src/main/java/com/evolveum/polygon/connector/ldap/ad/AdLdapConnector.java</a>)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The method <span class="gmail-m_-3555707108009694817gmail-m7836248100546039813gmail-pl-en">
cleanupScriptingBeforeTest() cleans a powerhellMap, I think that's what resolves the issue.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span class="gmail-m_-3555707108009694817gmail-m7836248100546039813gmail-pl-en">Shouldn't the connector detect the error and re-establish the connection? Or should that be a task for the powerhell lib?
</span><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Em ter, 5 de fev de 2019 às 19:39, Alcides Carlos de Moraes Neto <<a href="mailto:alcides.neto@gmail.com" target="_blank">alcides.neto@gmail.com</a>> escreveu:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">I figured that this has something to do with a  "Shellid" parameter that winrm4j uses.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I believe the shellid that's being passed is for a dead/terminated shell and that gives the error.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">If I click on Test Connection on the resource page, the error stops. Something inside the connector is being reset.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Does the AdLdap connector have a winrm connection pool  or something like that? Shouldn 't it be refreshed from time to time?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Em ter, 5 de fev de 2019 às 16:57, Alcides Carlos de Moraes Neto <<a href="mailto:alcides.neto@gmail.com" target="_blank">alcides.neto@gmail.com</a>> escreveu:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Hello list,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">The scripts execute fine most of the time, however sometimes they fail with the following message:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">org.apache.cxf.binding.soap.SoapFault(The WS-Management service cannot process the request because the request contained invalid selectors for the resource. ):<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">There is nothing else in the stack, just that repeated over and over.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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<u></u><u></u></p>
</div>
<p class="MsoNormal">Any suggestions on what this may be? <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Here are snips of our resource and scripts configuration (private info removed):<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:host>...<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:port>636</gen604:port><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:connectionSecurity>ssl</gen604:connectionSecurity><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:bindDn>...<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:bindPassword>...<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:baseContext>DC=....<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:referralStrategy>follow</gen604:referralStrategy><br>
<gen604:pagingStrategy>spr</gen604:pagingStrategy><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:operationalAttributes>....<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:winRmHost>...<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <gen604:winRmUsername>...<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:winRmDomain>...<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:winRmPassword>...<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><gen604:winRmPort>5986</gen604:winRmPort><br>
<gen604:winRmUseHttps>true</gen604:winRmUseHttps><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><script><br>
         <host>resource</host><br>
         <language>cmd</language><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">         <argument>....</argument><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">         <code>powershell -file "c:\midpoint-scripts\enable-mailbox.ps1"</code><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">...<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"></scripts><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
<p style="font-size:8pt;line-height:10pt;font-family:"Cambria","times roman",serif">
This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are
 notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
</p>
</div>

_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote></div>