0

I've hit a problem when trying to install Sympa on an Ubuntu Hardy server.

The problem seems related with the associated PostreSQL database.

Steps I followed:

1) Installed PostreSQL.

sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev

2) Updated PostgreSQL's administrator passwords. PostgreSQL creates two accounts for its "administrator". One is a "database account" (for logging in to postgresql itself) and another is a "linux account" (for creating files on the server, I guess). I reset the password of the database account like this:

sudo su postgres -c psql
ALTER USER postgres WITH PASSWORD 'password';
\q

And then reset the "linux account" password the usual way:

sudo passwd -d postgres
sudo su postgres -c passwd

3) Enabled password access on PostgreSQL. By default PostgreSQL only lets you log in with your linux name. So if you are logged in on linux as the user "tim", it only lets you enter the database as "tim". We want to change this so it asks you for a username and password, so you can log in as other people.

sudo nano /etc/postgresql/8.3/main/pg_hba.conf

On that file I updated the following lines:

#local all all ident sameuser
local all all md5
#host all all 127.0.0.1/32 ident sameuser
host all all 127.0.0.1/32 md5
#host all all ::1/128 ident sameuser
host all all ::1/128 md5

4) Now it was time to install sympa. I just did this:

sudo apt-get install sympa

5) I was prompted to install lots of perl packages. I accepted the suggestions.

6) Then a dialog appeared and I answered 3 questions:

  • What type of Database will you be using? PostgreSQL
  • What is the hostname where your database is running? localhost
  • What is the sympa user password? entered a password (twice)
  • What is the db admin password? entered the password used on step 2)

At this point the installation shows the following messages:

/etc/sympa/sympa.conf file has been created
/etc/sympa/wwsympa.conf file has been created
 * Reloading system log daemon...         [ OK ] 
Upgrade::probe_db() Table user_table not found in database sympa
Upgrade::probe_db() Table subscriber_table not found in database sympa
Upgrade::probe_db() Table admin_table not found in database sympa
DBD::Pg::db do failed: ERROR:  permission denied to create database
Upgrade::probe_db() Failed to run script '/usr/lib/sympa/bin/create_db.Pg' : ERROR:  permission denied to create database

DBD::Pg::st execute failed: ERROR:  relation "user_table" does not exist
List::get_user_db() Unable to execute SQL statement "SELECT email_user AS email, gecos_user AS gecos, password_user AS password, cookie_delay_user AS cookie_delay, lang_user AS lang , attributes_user AS attributes FROM user_table WHERE email_user = '[email protected]' " : ERROR:  relation "user_table" does not exist

Language::SetLang() Language::SetLang(), missing locale parameter
Database sympa defined in sympa.conf has not the right structure or is unreachable. If you don't use any database, comment db_xxx parameters in sympa.conf
Sympa failed to prepare database.
dpkg: error processing sympa (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 sympa
E: Sub-process /usr/bin/dpkg returned an error code (1)

The sympa database and user are, however, created on the database - I see them if I do:

sudo su postgres -c psql
/du  (list of users contains sympa)
/l   (list of databases contains sympa)

It looks as if the sympa installer isn't able to connect to posgre, and thus it doesn't find the tables it needs... and then reinterprets this as a "database missing" error.

I don't know how to trace this error. Any pointers would be appreciated.

4 Answers 4

1

Try without resetting the psql database user's password.

According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440109#27, this fixes the problem.

1
  • I grew tired of this issue and just installed mySQL - I had no issues installing it then. Thanks for your comment anyway.
    – egarcia
    Jan 19, 2010 at 10:06
1

Old question, I know, but I just got the same error on ubuntu 14.04 with Sympa 6.1.17~dfsg-1.

I found that running the script manually works.

     sudo apt-get install sympa
     # errors happen
     psql -U postgres #or some superuser
     drop database sympa;
     \i /usr/lib/sympa/bin/create_db.Pg
     \q
     sudo dpkg-reconfigure sympa

Then, during the reconfigure, say that you want to set up the database again but this time it'll find the expected tables so it won't try to run the script again.

0

Sympa works quite nicely with PostgreSQL (tested both on 5.3 and 6.1). It only has some problems in Upgrade.pm module where it is checking for tables existence because PostgreSQL (its Perl module, more precisely) is returning table names with schema as a prefix and because of this table name comparison fails. I have submitted a bug for this with a patch.

1
  • And I am also using it with Postfix and no code changes were necessary for that.
    – Mitar
    Jan 28, 2011 at 12:36
-1

Sympa is only fully supported with MySQL and Sendmail (at least the version in the Hardy repositories is).

Trying to install it with other configuration (i.e. PosgreSQL + PostFix) you are more or less on your own ... be prepared to modify perl files and (possibly) recompile it at some point.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .