From dev-return-10282-archive-asf-public=cust-asf.ponee.io@chemistry.apache.org Tue Oct 22 16:39:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4237A18062C for ; Tue, 22 Oct 2019 18:39:02 +0200 (CEST) Received: (qmail 4524 invoked by uid 500); 22 Oct 2019 16:39:01 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 4513 invoked by uid 99); 22 Oct 2019 16:39:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2019 16:39:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AD044E2DF9 for ; Tue, 22 Oct 2019 16:39:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 26CC37804F2 for ; Tue, 22 Oct 2019 16:39:00 +0000 (UTC) Date: Tue, 22 Oct 2019 16:39:00 +0000 (UTC) From: "Florent Guillaume (Jira)" To: dev@chemistry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CMIS-1082) error in clustered deplomentos, cmislib doesn't use Alfresco JSESSION cookies MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CMIS-1082?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16957= 216#comment-16957216 ]=20 Florent Guillaume commented on CMIS-1082: ----------------------------------------- Unrelated to CMIS: are you sure that {{LWPCookieJar}} allows you to share t= he file between several processes? I doubt that's the case, and I don't see= anything in the doc about this. > error in clustered deplomentos, cmislib doesn't use Alfresco JSESSION coo= kies > -------------------------------------------------------------------------= ---- > > Key: CMIS-1082 > URL: https://issues.apache.org/jira/browse/CMIS-1082 > Project: Chemistry > Issue Type: Improvement > Components: python-cmislib > Affects Versions: cmislib 0.6.0 > Environment: Alfresco Enterprise 5.2.4, two repo nodes, same DB, = one SOLR deployment. > Reporter: Ernesto Revilla > Priority: Major > > When using clustered deployments, 404 errors can appear when load balance= r is only configured to use sticky sessions based on JSESSIONID cookie. > =C2=A0 > It would be good to have cmislib to support cookies. > For 0.5.1 I could use a cookiejar in=C2=A0{{cmislib/net.py}}, like this: > =C2=A0 > {{ > from cookielib import LWPCookieJar > from urllib2 import=C2=A0=C2=A0HTTPCookieProcessor > ... > class RESTService(object):=20 > ...=20 > =C2=A0 =C2=A0 def __init__(self): > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ... > =C2=A0 =C2=A0 =C2=A0 =C2=A0 cookiejar =3D LWPCookieJar('/tmp/alfresco-co= okies.txt') > =C2=A0 =C2=A0 =C2=A0 =C2=A0 try: > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cokiejar.load(ignore_discard= =3DTrue, ignore_expires=3DTrue) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 except IOError: > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pass}} > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self.cook= iejar =3D cookiejar > =C2=A0 =C2=A0 def get(self,=C2=A0 > ... > =C2=A0 =C2=A0 =C2=A0 =C2=A0 opener =3D build_opener(SmartRedirectHandler= (), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 DefaultErrorHandler(), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ContextualBasicAuthHandler(passwordManag= er), > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 HTTPCookieProcessor(self.cookiejar)) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 res =3D=C2=A0opener.open(request) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 self.cookiejar.save(ignore_discard=3DTrue, i= gnore_expires=3DFalse) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 return res > }} > =C2=A0 > I use a file as cookiejar because I have to share the cookies between sev= eral processes. -- This message was sent by Atlassian Jira (v8.3.4#803005)