Login not working when load balancing over multiple Kallithea Instances
Robert Rauch
mail at robertrauch.de
Tue Jan 12 22:40:37 UTC 2016
Hi,
I've been experimenting with scaling Kallithea horizontally as described
at
http://kallithea.readthedocs.org/en/latest/usage/performance.html#performance
Everything is fine, however I cannot login into my 'Kallithea Cluster'...
I set up two Kallithea instances with shared repos/ and data/ dirs and
unique instance_ids. I'm using HAProxy as a reverse proxy, the relevant
listen stanza is given by
listen kallithea
bind 0.0.0.0:80
mode http
balance roundrobin
option tcplog
server node1.gns-systems.vm 192.168.33.10:5000 check
server node2.gns-systems.vm 192.168.33.11:5000 check
Accessing the / URL works perfectly in my browser. However, logging in
does not work. Here are the relevant logs from the Kallithea Instances:
node1:
------
Jan 12 22:31:49 node1.gns-systems.vm paster[30006]: 2016-01-12
22:31:49.795 INFO [kallithea.lib.base] IP: 192.168.33.6 User: accessed /
Jan 12 22:31:49 node1.gns-systems.vm paster[30006]: 2016-01-12
22:31:49.889 INFO [kallithea.lib.auth] user authenticated with regular
auth @ HomeController:index
Jan 12 22:31:50 node1.gns-systems.vm paster[30006]: 2016-01-12
22:31:50.425 INFO [kallithea.RequestWrapper] IP: 192.168.33.6 Request to
/ time: 0.675s
node2:
------
Jan 12 22:31:47 node2.gns-systems.vm paster[23887]: 2016-01-12
22:31:47.816 INFO [kallithea.lib.base] IP: 192.168.33.6 User: accessed
/_admin/login
Jan 12 22:31:47 node2.gns-systems.vm paster[23887]: 2016-01-12
22:31:47.959 INFO [kallithea.lib.auth_modules] Authenticating user using
kallithea.lib.auth_modules.auth_internal plugin
Jan 12 22:31:48 node2.gns-systems.vm paster[23887]: 2016-01-12
22:31:48.423 INFO [kallithea.lib.auth_modules.auth_internal] user admin
authenticated correctly Jan 12 22:31:48 node2.gns-systems.vm
paster[23887]: 2016-01-12 22:31:48.697 INFO [kallithea.lib.base] user
admin is now authenticated and stored in session, session attrs
{'is_authenticated': True, 'is_external_auth': False, 'user_id': 2L}
Jan 12 22:31:48 node2.gns-systems.vm paster[23887]: 2016-01-12
22:31:48.781 INFO [kallithea.RequestWrapper] IP: 192.168.33.6 Request to
/_admin/login time: 1.112s
It seems that the admin User has been successfully authenticated (at
node2), but then after being redirected (?) to the root URL we are
authenticated as an anonymous user again. Whats the problem?
Cheers,
Robert Rauch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20160112/932859e4/attachment.html>
More information about the kallithea-general
mailing list