Uploaded image for project: 'Chemistry'
  1. Chemistry
  2. CMIS-1082

error in clustered deployments, cmislib doesn't use Alfresco JSESSION cookies

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • cmislib 0.6.0
    • None
    • python-cmislib
    • None
    • Alfresco Enterprise 5.2.4, two repo nodes, same DB, one SOLR deployment.

    Description

      When using clustered deployments, 404 errors can appear when load balancer is only configured to use sticky sessions based on JSESSIONID cookie.

       

      It would be good to have cmislib to support cookies.

      For 0.5.1 I could use a cookiejar in cmislib/net.py, like this:

       

      {{
      from cookielib import LWPCookieJar
      from urllib2 import  HTTPCookieProcessor
      ...
      class RESTService(object):
      ...
          def _init_(self):
              ...
              cookiejar = LWPCookieJar('/tmp/alfresco-cookies.txt')
              try:
                  cokiejar.load(ignore_discard=True, ignore_expires=True)
              except IOError:
                  pass}}
                        self.cookiejar = cookiejar

          def get(self, 
      ...
              opener = build_opener(SmartRedirectHandler(),
                                    DefaultErrorHandler(),
                                    ContextualBasicAuthHandler(passwordManager),
                                    HTTPCookieProcessor(self.cookiejar))
              res = opener.open(request)
              self.cookiejar.save(ignore_discard=True, ignore_expires=False)
              return res
      }}
       

      I use a file as cookiejar because I have to share the cookies between several processes.

      Attachments

        Activity

          People

            Unassigned Unassigned
            erny Ernesto Revilla
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: