Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-8867

ScriptedCrest - livesync action request timed out

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • None
    • None
    • _Samples
    • OpenDJ 4.1.0-SNAPSHOT (28c846d4044), OpenIDM 5.5.0-SNAPSHOT (a2817d5), groovy 1.4.4.0-M2 c8349ccdf940fb6e923385b1edcc5f67839f0519

    Description

      When getting change in livesync, livesync doesn't return anything and timed out.

      Steps to reproduce

      1. Configure scriptedcrest sample
      2. Run livesync
        curl --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin"  --request POST "http://localhost:8080/openidm/system/scriptedcrest/users/?_action=liveSync&detailedFailure=True"
        
        {'_rev': '00000000240558d7', '_id': 'SYSTEMSCRIPTEDCRESTUSERS', 'connectorData': {'syncToken': '7', 'nativeType': 'string'}}
        
      3. Make a change in OpenDJ users
        curl --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --data '{"contactInformation":{"emailAddress":"u3_1501761615@xample.com", "telephoneNumber":"09876"}, "name": {"familyName":"Flemming", "givenName":"Bob"}, "displayName":"Bob Flemming", "_id":"u3_1501761615@xample.com"}' --request POST "http://localhost:8080/openidm/system/scriptedcrest/users/?_action=create"
        {"_id":"u3_1501761615@xample.com","_rev":"00000000cde7684b","displayName":"Bob Flemming","name":{"givenName":"Bob","familyName":"Flemming"},"contactInformation":{"emailAddress":"u3_1501761615@xample.com","telephoneNumber":"09876"}}
        
      4. Run livesync again
        curl --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin"  --request POST "http://localhost:8080/openidm/system/scriptedcrest/users/?_action=liveSync&detailedFailure=True"	
        ReadTimeout: HTTPConnectionPool(host='localhost', port=8080): Read timed out. (read timeout=20)
        

      OpenDJ CRest call returns correctly changed user

      curl -X GET 'http://idm:password@localhost:8090/api/changelog?_fields=/_id&_fields=/changeType&_fields=/targetDN&_queryFilter=(_id%20gt%20%227%22%20and%20targetDN%20co%20%22ou%3Dpeople,dc%3Dexample,dc%3Dcom%22)' | jq .
      {
        "remainingPagedResults": -1,
        "totalPagedResults": -1,
        "totalPagedResultsPolicy": "NONE",
        "pagedResultsCookie": null,
        "resultCount": 1,
        "result": [
          {
            "targetDN": "uid=u3_1501761615@xample.com,ou=people,dc=example,dc=com",
            "changeType": "add",
            "_id": "8"
          }
        ]
      }
      

      Also in OpenDJ httpaccess log file, OpenDJ returns 200 (for timed out livesync call)

      127.0.0.1       127.0.0.1       idm     03/Aug/2017:14:00:24 +0200      GET     /api/changelog  _fields=/_id&_fields=/changeType&_fields=/targetDN&_queryFilter=(_id%20gt%20%227%22%20and%20targetDN%20co%20%22ou%3Dpeople,dc%3Dexample,dc%3Dcom%22)    HTTP/1.1        200     Apache-HttpAsyncClient/4.1.2 (Java/1.8.0_111)   23      29      0
      

      OpenIDM log file

      Aug 03, 2017 2:01:37 PM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 lambda$handleRequestWithLogging$8
      WARNING: Resource exception: 500 Internal Server Error: "Failed to get OperationOptionsBuilder: Sync script error"
      org.forgerock.json.resource.InternalServerErrorException: Failed to get OperationOptionsBuilder: Sync script error
              at org.forgerock.openidm.provisioner.impl.SystemObjectSetService.actionInstance(SystemObjectSetService.java:381)
              at org.forgerock.json.resource.InterfaceSingletonHandler.handleAction(InterfaceSingletonHandler.java:26)
              at org.forgerock.json.resource.Router.handleAction(Router.java:250)
              at org.forgerock.json.resource.Router.handleAction(Router.java:250)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:55)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterAction$0(AuditFilter.java:112)
              at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:168)
              at org.forgerock.openidm.audit.filter.AuditFilter.filterAction(AuditFilter.java:112)
              at org.forgerock.openidm.filter.MutableFilterDecorator.filterAction(MutableFilterDecorator.java:66)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:42)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterAction$0(ServletConnectionFactory.java:373)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:430)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterAction(ServletConnectionFactory.java:373)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.openidm.filter.PassthroughFilter.filterAction(PassthroughFilter.java:42)
              at org.forgerock.openidm.filter.MutableFilterDecorator.filterAction(MutableFilterDecorator.java:66)
              at org.forgerock.openidm.filter.MutableFilterDecorator.filterAction(MutableFilterDecorator.java:66)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.json.resource.FilterChain.handleAction(FilterChain.java:222)
              at org.forgerock.json.resource.InternalConnection.actionAsync(InternalConnection.java:29)
              at org.forgerock.json.resource.AbstractAsynchronousConnection.action(AbstractAsynchronousConnection.java:32)
              at org.forgerock.json.resource.AbstractConnectionWrapper.action(AbstractConnectionWrapper.java:65)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$2$1.action(ServletConnectionFactory.java:327)
              at org.forgerock.json.resource.AbstractConnectionWrapper.action(AbstractConnectionWrapper.java:65)
              at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleLiveSync(ObjectClassResourceProvider.java:215)
              at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleAction(ObjectClassResourceProvider.java:233)
              at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassRequestHandler.handleAction(ObjectClassRequestHandler.java:89)
              at org.forgerock.json.resource.Router.handleAction(Router.java:250)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:55)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.openidm.filter.ScriptedFilter.lambda$filterAction$0(ScriptedFilter.java:80)
              at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:252)
              at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:216)
              at org.forgerock.openidm.filter.ScriptedFilter.filterRequest(ScriptedFilter.java:142)
              at org.forgerock.openidm.filter.ScriptedFilter.filterAction(ScriptedFilter.java:80)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:42)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterAction$0(AuditFilter.java:112)
              at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:168)
      ...
      Caused by: org.forgerock.json.resource.InternalServerErrorException: Failed to get OperationOptionsBuilder: Sync script error
              at org.forgerock.openidm.provisioner.openicf.impl.OpenICFProvisionerService.liveSynchronize(OpenICFProvisionerService.java:1000)
              at org.forgerock.openidm.provisioner.impl.SystemObjectSetService.liveSync(SystemObjectSetService.java:511)
              at org.forgerock.openidm.provisioner.impl.SystemObjectSetService.actionInstance(SystemObjectSetService.java:364)
              ... 135 more
      Caused by: org.identityconnectors.framework.common.exceptions.ConnectorException: Sync script error
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
              at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
              at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:255)
              at org.forgerock.openicf.misc.scriptedcommon.ScriptedConnectorBase.sync(ScriptedConnectorBase.groovy:473)
              at org.identityconnectors.framework.impl.api.local.operations.SyncImpl.sync(SyncImpl.java:73)
              at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.identityconnectors.framework.impl.api.local.operations.ConnectorAPIOperationRunnerProxy.invoke(ConnectorAPIOperationRunnerProxy.java:104)
              at com.sun.proxy.$Proxy66.sync(Unknown Source)
              at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.identityconnectors.framework.impl.api.local.operations.ThreadClassLoaderManagerProxy.invoke(ThreadClassLoaderManagerProxy.java:96)
              at com.sun.proxy.$Proxy66.sync(Unknown Source)
              at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.identityconnectors.framework.impl.api.BufferedResultsProxy$BufferedResultsHandler.run(BufferedResultsProxy.java:157)
      Caused by: org.forgerock.json.resource.InternalServerErrorException: Connection closed unexpectedly
              at org.forgerock.openicf.misc.crest.AbstractRemoteConnection.adapt(AbstractRemoteConnection.java:790)
              at org.forgerock.openicf.misc.crest.AbstractRemoteConnection$3.failed(AbstractRemoteConnection.java:234)
              at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:134)
              at org.apache.http.impl.nio.client.AbstractClientExchangeHandler.failed(AbstractClientExchangeHandler.java:419)
              at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.closed(HttpAsyncRequestExecutor.java:140)
              at org.apache.http.impl.nio.client.InternalIODispatch.onClosed(InternalIODispatch.java:71)
              at org.apache.http.impl.nio.client.InternalIODispatch.onClosed(InternalIODispatch.java:39)
              at org.apache.http.impl.nio.reactor.AbstractIODispatch.disconnected(AbstractIODispatch.java:100)
              at org.apache.http.impl.nio.reactor.BaseIOReactor.sessionClosed(BaseIOReactor.java:279)
              at org.apache.http.impl.nio.reactor.AbstractIOReactor.processClosedSessions(AbstractIOReactor.java:440)
              at org.apache.http.impl.nio.reactor.AbstractIOReactor.hardShutdown(AbstractIOReactor.java:576)
              at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.doShutdown(AbstractMultiworkerIOReactor.java:446)
              at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:374)
              at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192)
              at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.http.ConnectionClosedException: Connection closed unexpectedly
              ... 12 more
      

      Attachments

        Activity

          People

            gael Gael Allioux
            michal.orlik@profiq.cz Michal Orlik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: