3 Replies Latest reply on Sep 20, 2018 12:48 PM by galder.zamarreno

    Change Infinispan cache-availability status

    purushos

      Hi,

       

      I am trying to change the cache-availability status of infinispan through the management REST interface as a work around to address the issue here. However, the REST request fails with the following error:

       

      curl -u <username>:<password> --digest -X POST --header "Content-Type: application/json" -L -D - "http://<hostname>:9900/management/subsystem/datagrid-infinispan/cache-container/clustered/replicated-cache/default?operation=write-attribute" --data "{name: cache-availability, value: AVAILABLE}"

      HTTP/1.1 401 Unauthorized

      Connection: keep-alive

      WWW-Authenticate: Digest realm="ManagementRealm",domain="/management",nonce="Y2XHA1pcp0ENMTUzNjk3MjY0OTczMDKGGS9biTFCjPo7lTl66kU=",opaque="00000000000000000000000000000000",algorithm=MD5,qop="auth"

      Content-Length: 77

      Content-Type: text/html

      Date: Sat, 15 Sep 2018 00:50:49 GMT

       

       

      HTTP/1.1 500 Internal Server Error

      Connection: keep-alive

      Authentication-Info: nextnonce="Y2XHA1pcp0ENMTUzNjk3MjY0OTczMDKGGS9biTFCjPo7lTl66kU=",qop="auth",rspauth="c4da7d4df96ae557cfc90b5e1eb10b42",cnonce="ICAgICAgICAgICAgICAgICAgICAgICAgIDE0MDM2Mzk=",nc=00000001

      Content-Type: application/json; charset=utf-8

      Content-Length: 43

      Date: Sat, 15 Sep 2018 00:50:49 GMT

       

       

      "java.io.IOException: Invalid character: n"

       

      It doesn't work even if I change the request type to PUT.

       

      However, I am able to set the cache-availability through Management CLI.

       

      Can you please let me know what is wrong with the REST request which I am sending here?

        • 1. Re: Change Infinispan cache-availability status
          galder.zamarreno

          Does the server show a stacktrace? Can you post it here? Have you tried with a more recent release? (e.g. 9.3.3.Final)

          • 2. Re: Change Infinispan cache-availability status
            purushos

            galder.zamarreno

             

            We tried this on 9.3.1.Final. The REST request in this case fails with the following error:

             

            curl -u <user>:<password> --digest -X POST --header "Content-Type: application/json" -L -D - "http://<hostname>:9900/management/subsystem/datagrid-infinispan/cache-container/clustered/replicated-cache/default?operation=write-attribute" --data "{name: cache-availability, value: AVAILABLE}"

            HTTP/1.1 401 Unauthorized

            Connection: keep-alive

            WWW-Authenticate: Digest realm="ManagementRealm", nonce="AAAJzAAAR2QM8q/1vwp2FihMah04yMQGt1D3iRjxBp4qCnoZeE16w/qPYcE=", opaque="00000000000000000000000000000000", algorithm=MD5, qop=auth

            X-Frame-Options: SAMEORIGIN

            Content-Length: 77

            Content-Type: text/html

            Date: Tue, 18 Sep 2018 21:21:52 GMT

             

            HTTP/1.1 500 Internal Server Error

            Connection: keep-alive

            X-Frame-Options: SAMEORIGIN

            Content-Type: application/json; charset=utf-8

            Content-Length: 90

            Date: Tue, 18 Sep 2018 21:21:52 GMT

             

            "java.io.IOException: org.jboss.dmr.stream.ModelException: Expecting OBJECT_END or STRING"

             

            However, there is no related stack trace in the server logs. Please find the logs attached.

             

            Also, as earlier we were able to change the cache status to 'AVAILABLE' through Infinispan CLI.

            • 3. Re: Change Infinispan cache-availability status
              galder.zamarreno

              This is probably a bug, can you add a JIRA in Infinispan - JBoss Issue Tracker