Le 15/06/2011 16:43, Romain LE DISEZ a écrit :
Hello all,
Hi
just a little tip, it could be useful to someone.
Problem with memcached is that there is no access control. You can force
memcached to bind to 127.0.0.1, but it's a poor option because every
process can access it.
With UNIX socket, you can strictly restrict access to memcached.
Run memcached (use the configuration file of your distrib):
memcached -d -u sogo -s /tmp/memcached.sock -a 0700
And update the configuration of SOGo:
defaults -u sogo write sogod SOGoMemcachedHost /tmp/memcached.sock
I tried this method, but unfortunatly, it doesn't work, SOGo cannot
connect to memcached:
Sep 01 11:14:40 sogod [32276]: <0x0x9427068[SOGoCache]> Using host(s)
'/var/run/memcached/memcached.sock' as server(s)
[...]
Sep 01 11:14:45 sogod [32276]: <0x0x9427068[SOGoCache]> an error
occurred when caching value for key 'dani+attributes': "HOSTNAME LOOKUP
FAILURE"
Sep 01 11:14:45 sogod [32276]: SOGoRootPage successful login for user
'dani' - expire = -1 grace = -1
Sep 01 11:14:45 sogod [32276]: <0x0x9427068[SOGoCache]> an error
occurred when caching value for key 'session:uJj9J5D3Mj7PRCEEg1HXmw==':
"HOSTNAME LOOKUP FAILURE"
Sep 01 11:14:45 sogod [32276]: <0x0x9427068[SOGoCache]> an error
occurred when caching value for key 'dani+attributes': "HOSTNAME LOOKUP
FAILURE"
Sep 01 11:14:45 sogod [32276]: <0x0x9427068[SOGoCache]> an error
occurred when caching value for key '[email protected]+attributes':
"HOSTNAME LOOKUP FAILURE"
Sep 01 11:14:45 sogod [32276]: <0x0x9427068[SOGoCache]> an error
occurred when caching value for key '[email protected]+attributes':
"HOSTNAME LOOKUP FAILURE"
Sep 01 11:14:45 sogod [32276]: <0x0x9427068[SOGoCache]> an error
occurred when caching value for key '[email protected]+attributes':
"HOSTNAME LOOKUP FAILURE"
Sep 01 11:14:45 sogod [32276]: <0x0x9427068[SOGoCache]> an error
occurred when caching value for key '[email protected]+attributes':
"HOSTNAME LOOKUP FAILURE"
Looks like SOGo is trying to resolve /var/run/memcached/memcached.sock
(which is the path of the socket I use for memcached) as a hostname
instead of using it as a unix socket.
am I missing something ?
Regards, Daniel
You can also use UNIX socket for PostgreSQL. On EL6, by default, the
UNIX socket of PostgreSQL is in /tmp:
/tmp/.s.PGSQL.5432
So, set your configuration as following:
defaults -u sogo write sogod OCSFolderInfoURL
postgresql://%2Ftmp/sogo/sogo_folder_info
defaults -u sogo write sogod OCSSessionsFolderURL
postgresql://%2Ftmp/sogo/sogo_sessions_folder
defaults -u sogo write sogod SOGoProfileURL
postgresql://%2Ftmp/sogo/sogo_user_profile
/!\ WARNING /!\
You can't update the PostgreSQL URL without updating the content of the
table sogo_folder_info.
Please note that:
- thanks to ident, you don't need to specify user and password if the
database owner is "sogo".
- You must only specify the folder containing the socket file,
replacing / with %2F
Greetings.
--
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: [email protected]
Web : http://www.firewall-services.com
--
[email protected]
https://inverse.ca/sogo/lists