[SOGo] DATABASE on another host than Sogod
HelloI try to make run Sogo on a host and the database on another hosti set all the right in the DATABASE Host that the user sogo can connect from the SOGOhoston the SOGOhost i m able to interrogate the database sogo with psqlwithpsql --host DATABASEhost sogo sogoin /etc/sogo.conf i replaced 127.0.0.1 by the DATABASEhost IP (and too Ldap.. Imap .. Sieve ...and so on)/* Database configuration (mysql:// or postgresql://) */host SOGoProfileURL = postgresql://sogo:sogo@DATABASEhost:5432/sogo/sogo_user_profile; OCSFolderInfoURL = postgresql://sogo:sogo@DATABASEhost:5432/sogo/sogo_folder_info; OCSSessionsFolderURL = postgresql://sogo:sogo@DATABASEhost:5432/sogo/sogo_sessions_folder; SOGoMemcachedHost = 127.0.0.1;When i start Sogo all is ok :Aug 20 15:16:33 sogod [11478]: 0x0x7f50fa492750[WOWatchDog] listening on *:20 000Aug 20 15:16:33 sogod [11478]: 0x0x7f50fa492750[WOWatchDog] watchdog process pid: 11478Aug 20 15:16:33 sogod [11478]: 0x0x7f50f6fa72c0[WOWatchDogChild] watchdog request timeout set to 10 minutesAug 20 15:16:33 sogod [11478]: 0x0x7f50fa492750[WOWatchDog] preparing 1 childrenAug 20 15:16:33 sogod [11478]: 0x0x7f50fa492750[WOWatchDog] child spawned with pid 114962013-08-20 15:16:33.352 sogod[11496] PostgreSQL72 connection established: 0x0x7f50fa464c00[PGConnection]: connection=0x0x7f50fa76ca802013-08-20 15:16:33.353 sogod[11496] PostgreSQL72 channel 0x0x7f50fa723b00 opened (connection=0x0x7f50fa464c00[PGConnection]: connection=0x0x7f50fa76ca80)2013-08-20 15:16:33.353 sogod[11496] PG0x0x7f50fa723b00 SQL: SELECT count(*) FROM sogo_user_profile2013-08-20 15:16:33.354 sogod[11496] PG0x0x7f50fa723b00 SQL: SELECT count(*) FROM sogo_folder_info2013-08-20 15:16:33.356 so god[11496] PG0x0x7f50fa723b00 SQL: SELECT count(*) FROM sogo_sessions_folderI m able to use the webmail on SOGOhost for the mail partwhen i try to create an appontment or read i ve got this error :2013-08-20 15:40:34.972 sogod[11496] PG0x0x7f50faa41ee0 SQL: SELECT c_folder_id, c_path, c_location, c_quick_location, c_acl_location, c_folder_type FROM sogo_folder_info WHERE c_path1 = Users AND c_path2 = myuser AND c_path3 = Calendar AND c_path4 = personalAug 20 15:40:34 sogod [11496]: [ERROR] 0x0x7f50fa8ea7e0[GCSFolder] could not open storage channel!After a tcpdump and some seach it seems that sogod always try to read the database on the 127.0.0.1 for retrieve the folders and some stuffsIs it a bug or there are a way to set the database address ?Regards
Re: [SOGo] DATABASE on another host than Sogod
I found a workarround with xinetdwith this config :service postgresql { socket_type = stream wait = no user = root redirect = DATABASEhost 5432 bind = 127.0.0.1}it works well all the requests on the loopack are redirected on the DATABASEhostbutit is a worse if the loopback is hard written on the code ... and shouldn tRegardsLe Mardi 20 Aot 2013 15:53 CEST, ABBAS Alain alain.ab...@libertech.fr a crit:HelloI try to make run Sogo on a host and the database on another hosti set all the right in the DATABASE Host that the user sogo can connect from the SOGOhoston the SOGOhost i m able to interrogate the database sogo with psqlwithpsql --host DATABASEhost sogo sogoin /etc/sogo .conf i replaced 127.0.0.1 by the DATABASEhost IP (and too Ldap.. Imap .. Sieve ...and so on)/* Database configuration (mysql:// or postgresql://) */host SOGoProfileURL = postgresql://sogo:sogo@DATABASEhost:5432/sogo/sogo_user_profile; OCSFolderInfoURL = postgresql://sogo:sogo@DATABASEhost:5432/sogo/sogo_folder_info; OCSSessionsFolderURL = postgresql://sogo:sogo@DATABASEhost:5432/sogo/sogo_sessions_folder; SOGoMemcachedHost = 127.0.0.1;When i start Sogo all is ok :Aug 20 15:16:33 sogod [11478]: 0x0x7f50fa492750[WOWatchDog] listening on *:20 000Aug 20 15:16:33 sogod [11478]: 0x0x7f50fa492750[WOWatchDog] watchdog process pid: 11478Aug 20 15:16:33 sogod [11478]: 0x0x7f50f6fa72c0[WOWatchDogChild] watchdog request timeout set to 10 minutesAug 20 15:16:33 sogod [11478]: 0x0x7f50fa492750[WOWatchDog] preparing 1 child renAug 20 15:16:33 sogod [11478]: 0x0x7f50fa492750[WOWatchDog] child spawned with pid 114962013-08-20 15:16:33.352 sogod[11496] PostgreSQL72 connection established: 0x0x7f50fa464c00[PGConnection]: connection=0x0x7f50fa76ca802013-08-20 15:16:33.353 sogod[11496] PostgreSQL72 channel 0x0x7f50fa723b00 opened (connection=0x0x7f50fa464c00[PGConnection]: connection=0x0x7f50fa76ca80)2013-08-20 15:16:33.353 sogod[11496] PG0x0x7f50fa723b00 SQL: SELECT count(*) FROM sogo_user_profile2013-08-20 15:16:33.354 sogod[11496] PG0x0x7f50fa723b00 SQL: SELECT count(*) FROM sogo_folder_info2013-08-20 15:16:33.356 so god[11496] PG0x0x7f50fa723b00 SQL: SELECT count(*) FROM sogo_sessions_folderI m able to use the webmail on SOGOhost for the mail partwhen i try to create an appontment or read i ve got this error :2013-08-20 15:40:34.972 sogod[11496] PG0x0x7f50faa41ee0 SQL: SELECT c_folder_id, c_path, c_location, c_quick_location, c_acl_location, c_folder_type FROM sogo_folder_info WHERE c_path1 = Users AND c_path2 = myuser AND c_path3 = Calendar AND c_path4 = personalAug 20 15:40:34 sogod [11496]: [ERROR] 0x0x7f50fa8ea7e0[GCSFolder] could not open storage channel!After a tcpdump and some seach it seems that sogod always try to read the database on the 127.0.0.1 for retrieve the folders and some stuffsIs it a bug or there are a way to set the database address ?Regards
Re: [SOGo] DATABASE on another host than Sogod
Il 8/20/13 3:53 PM, ABBAS Alain ha scritto: Hello I try to make run Sogo on a host and the database on another host i set all the right in the DATABASE Host that the user sogo can connect from the SOGOhost on the SOGOhost i m able to interrogate the database sogo with psql with psql --host DATABASEhost sogo sogo in /etc/sogo.conf i replaced 127.0.0.1 by the DATABASEhost IP (and too Ldap.. Imap .. Sieve ...and so on) Sogo hardcodes db host you have specified in sogo.conf also in some db tables... this is the reason why even if you change db stuff in sogo.conf it still tries to connect to localhost. So, you have two ways: 1) the one you have choose: create a proxy/forwarder 2) put an alias hostname pointing to real db server in /etc/hosts, and replace all localhost occurences in sogo.conf/tables whit it. Have fun. -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] DATABASE on another host than Sogod
Hello ABBAS Alain Am 2013-08-20 16:18, schrieb Davide Bozzelli: Il 8/20/13 3:53 PM, ABBAS Alain ha scritto: Hello I try to make run Sogo on a host and the database on another host i set all the right in the DATABASE Host that the user sogo can connect from the SOGOhost on the SOGOhost i m able to interrogate the database sogo with psql with psql --host DATABASEhost sogo sogo in /etc/sogo.conf i replaced 127.0.0.1 by the DATABASEhost IP (and too Ldap.. Imap .. Sieve ...and so on) Sogo hardcodes db host you have specified in sogo.conf also in some db tables... this is the reason why even if you change db stuff in sogo.conf it still tries to connect to localhost. So, you have two ways: 1) the one you have choose: create a proxy/forwarder 2) put an alias hostname pointing to real db server in /etc/hosts, and replace all localhost occurences in sogo.conf/tables whit it. You also could backup all users with sogo-tool Stop sogod, then drop all tables in the remote db. Now restart sogod with the db options set to the remote db only. Then restore all users again with sogo-tool. Kind regards, Christian Mack -- Christian Mack Gruppe Informationsdienste Rechenzentrum Universität Konstanz -- users@sogo.nu https://inverse.ca/sogo/lists