Problem ending setup with airtime-install.php
  • Vote Up0Vote Down OlivOliv
    Posts: 1Member
    hello everyone,
    I come from France, I've searched on FAQ and on google but I can't solved my problem.
    I'm on dedicated server using Debian Squeeze and PostgreSQL 8.4

    when I try to execute airtime-install.php with root, it return me this error

    ******************************** Install Begin *********************************
     *** Database Installation ***
       * User airtime already exists.
       * Database 'airtime' already exists.
    DB Error: connect failed
     [nativecode=pg_pconnect(): Unable to connect to PostgreSQL server: FATAL:  authentification par mot de passe échouée pour l'utilisateur  << airtime >>
    FATAL:  authentification par mot de passe échouée pour l'utilisateur  << airtime >>] ** pgsql(pgsql)://airtime:PASSWORD@localhost/airtime
    Database connection problem.
    Check if database 'airtime' exists with corresponding permissions.
    


    It say in french that it can't auth because password failed..

    when I use the command psql -l, it return me this

                                 Liste des bases de données
        Nom    | Propriétaire | Encodage |  Tri  | Type caract. |    Droits d'accès
    -----------+--------------+----------+-------+--------------+-----------------------
     postgres  | postgres     | LATIN1   | fr_FR | fr_FR        |
     template0 | postgres     | LATIN1   | fr_FR | fr_FR        | =c/postgres
                                                                : postgres=CTc/postgres
     template1 | postgres     | LATIN1   | fr_FR | fr_FR        | =c/postgres
                                                                : postgres=CTc/postgres
    (3 lignes)
    


    can't see airtime db ou user...

    Did I miss somethings..

    Thanks for reading and try to help me

    Cheers!
  • 10 Comments sorted by
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    Please put the attached file into your install directory and run the install again. It should give you a more informative error message. Please post that error message as a reply to this message.

    - Paul
  • Oliv, any luck?
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    I think you have some sort of different permissions set on your database...

    What happens when you run this command?

    sudo -u postgres psql postgres --command "CREATE USER airtime ENCRYPTED
    PASSWORD 'airtime' LOGIN CREATEDB NOCREATEUSER;"

    Paul Baranowski
    CTO, Sourcefabric, http://sourcefabric.org

    +1 (416) 832-6436 (Cell)
    Skype: paulbaranowski
    720 Bathurst St. / Suite 203 / Toronto / ON / M5S 2R4 / Canada



    On Mon, Mar 14, 2011 at 1:56 PM, Oliv <
    airtime-support@lists.sourcefabric.org> wrote:

    > hello everyone,
    > I come from France, I've searched on FAQ and on google but I can't solved
    > my problem.
    > I'm on dedicated server using Debian Squeeze and PostgreSQL 8.4
    >
    > when I try to execute airtime-install.php with root, it return me this
    > error
    >
    > ******************************** Install Begin *********************************
    > *** Database Installation ***
    > * User airtime already exists.
    > * Database 'airtime' already exists.
    > DB Error: connect failed
    > [nativecode=pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: authentification par mot de passe échouée pour l'utilisateur << airtime >>
    > FATAL: authentification par mot de passe échouée pour l'utilisateur << airtime >>] ** pgsql(pgsql)://airtime:PASSWORD@localhost/airtime
    > Database connection problem.
    > Check if database 'airtime' exists with corresponding permissions.
    >
    >
    >
    > It say in french that it can't auth because password failed..
    >
    > when I use the command psql -l, it return me this
    >
    > Liste des bases de données
    > Nom | Propriétaire | Encodage | Tri | Type caract. | Droits d'accès
    > -----------+--------------+----------+-------+-------------- +-----------------------
    > postgres | postgres | LATIN1 | fr_FR | fr_FR |
    > template0 | postgres | LATIN1 | fr_FR | fr_FR | =c/postgres
    > : postgres=CTc/postgres
    > template1 | postgres | LATIN1 | fr_FR | fr_FR | =c/postgres
    > : postgres=CTc/postgres
    > (3 lignes)
    >
    >
    >
    > can't see airtime db ou user...
    >
    > Did I miss somethings..
    >
    > Thanks for reading and try to help me
    >
    > Cheers!
    >

  • Same problem for me on a clean installation of Debian Squeeze.

    I used the man here: http://new.flossmanuals.net/airtime/

    (Small error in it... it's :
    sudo nano /var/lib/airtime/application/configs/conf.php
    and not:
    sudo nano /var/lib/airtime/application/configs/config.php)

    However, no way to complete the installation...

    I downloaded your file and that's my output:

    root@dhcppc1:/var/lib/airtime/install# php airtime-install.php 
    ******************************** Install Begin *********************************
     *** Database Installation ***
       * Could not create user airtime: Array.
       * Could not create database 'airtime': Array
    DB Error: connect failed
     [nativecode=pg_pconnect(): Unable to connect to PostgreSQL server: FATAL:  password authentication failed for user "airtime"
    FATAL:  password authentication failed for user "airtime"] ** pgsql(pgsql)://airtime:PASSWORD@localhost/airtime
    Database connection problem.
    Check if database 'airtime' exists with corresponding permissions.


    psql -l said:

    root@dhcppc1:/var/lib/airtime/application/configs# psql -l
    psql: FATAL:  Ident authentication failed for user "root
    "

    I think that there is a problem using command postgresql ("Command Not Found").

    Please help me! Smile

    p.s. sorry for my bad english
  • Updates:

    In this way i created a database on my psql installation:

    root@dhcppc1:/var/lib/airtime/install# su postgres
    postgres@dhcppc1:/var/lib/airtime/install$ psql
    psql (8.4.7)
    
    postgres=# CREATE DATABASE airtime;
    CREATE DATABASE
    postgres=# GRANT ALL PRIVILEGES ON DATABASE airtime TO airtime;
    GRANT
    postgres=# \q
    


    So the installation continues... But i've got some errors Sad

    root@dhcppc1:/var/lib/airtime/install# php airtime-install.php 
    ******************************** Install Begin *********************************
     *** Database Installation ***
       * Could not create user airtime: Array.
       * Could not create database 'airtime': Array
     * Connected to database
     * Installing Postgres scripting language
    Error! DB Error: unknown error
       SQL statement was:
       CREATE LANGUAGE 'plpgsql'
    
     * Creating database tables
     *** Directory Setup ***
       * Directory /var/lib/airtime/files created
       * Directory /var/lib/airtime/files/stor created
       * Setting dir permissions...
     * Importing sample audio clips 
    liquidsoap: nessun processo trovato
    Impossibile trovare l'utente pypo
    /usr/sbin/deluser: L'utente «pypo» non esiste.
    Immettere nuova password UNIX: Reimmettere la nuova password UNIX: passwd: password aggiornata correttamente
    Starting daemontool script pypo-fetch
    Starting daemontool script pypo-push
    Starting daemontool script pypo-liquidsoap
    /var/lib/airtime/pypo/install
    Checking and removing any existing pypo processes
    Checking for user pypo
    Creating user pypo
    Creating log directories
    Creating directory /var/log/pypo
    Creating directory /opt/pypo/
    Creating directory /opt/pypo/bin
    Creating directory /opt/pypo/cache
    Creating directory /opt/pypo/files
    Creating directory /opt/pypo/tmp
    Creating directory /opt/pypo/files/basic
    Creating directory /opt/pypo/files/fallback
    Creating directory /opt/pypo/files/jingles
    Creating directory /opt/pypo/archive
    Copying pypo files
    Installing 32-bit liquidsoap binary
    Removing old directory /opt/pypo/bin/
    Copying directory /var/lib/airtime/pypo/install/.. to /opt/pypo/bin/
    Setting permissions
    Installing daemontool script pypo-fetch
    Creating directory /etc/service/pypo-fetch
    Creating directory /etc/service/pypo-fetch/log
    Installing daemontool script pypo-push
    Creating directory /etc/service/pypo-push
    Creating directory /etc/service/pypo-push/log
    Installing daemontool script pypo-liquidsoap
    Creating directory /etc/service/pypo-liquidsoap
    Creating directory /etc/service/pypo-liquidsoap/log
    Waiting for processes to start...
    /var/lib/airtime/pypo/install
    /etc/service/pypo-fetch: up (pid 6512) 0 seconds
    
    /etc/service/pypo-push: up (pid 6511) 0 seconds
    
    /etc/service/pypo-liquidsoap: up (pid 6513) 0 seconds
    
    ******************************* Install Complete *******************************
    


    Suggestions? Sad

    p.s. Airtime doesn't work, when i try to open it with my browser i got a blank page with a 404 error on localhost/login

    p.p.s. I did this on a fresh install and now seems to work (i edited some things in apache configuration) Now testing....
  • I found a little workaround that seems to work....

    take your server shell and write:

    su postgres
    psql
    CREATE USER airtime ENCRYPTED PASSWORD 'airtime' LOGIN CREATEDB NOCREATEUSER;
    CREATE DATABASE airtime;
    ALTER DATABASE airtime OWNER TO airtime;
    \q


    now let's edit the install file:

    cd [your_dir]/install
    nano airtime-install.php


    And modify those two lines for version 1.7.0:

    echo "* Creating Airtime database user".PHP_EOL;
    AirtimeInstall::CreateDatabaseUser();
    
    echo "* Creating Airtime database".PHP_EOL;
    AirtimeInstall::CreateDatabase();
    


    in this way:

    echo "* Creating Airtime database user".PHP_EOL;
    //AirtimeInstall::CreateDatabaseUser();
    
    echo "* Creating Airtime database".PHP_EOL;
    //AirtimeInstall::CreateDatabase();
    


    for previous version, delete these lines from the installer (or comment, do whatever you want Very Happy )
    // Create the database user
    $command = "sudo -u postgres psql postgres --command \"CREATE USER {$CC_CONFIG['dsn']['username']} "
      ." ENCRYPTED PASSWORD '{$CC_CONFIG['dsn']['password']}' LOGIN CREATEDB NOCREATEUSER;\" 2>/dev/null";
    //echo $command."\n";
    @exec($command, $output, $results);
    if ($results == 0) {
      echo "   * User {$CC_CONFIG['dsn']['username']} created.\n";
    } else {
      echo "   * Could not create user {$CC_CONFIG['dsn']['username']}: $output.\n";
    }
    
    $command = "sudo -u postgres createdb {$CC_CONFIG['dsn']['database']} --owner {$CC_CONFIG['dsn']['username']} 2> /dev/null";
    //echo $command."\n";
    @exec($command, $output, $results);
    if ($results == 0) {
      echo "   * Database '{$CC_CONFIG['dsn']['database']}' created.\n";
    } else {
      echo "   * Could not create database '{$CC_CONFIG['dsn']['database']}': $output\n";
    }
    


    Run the installer and enjoy! Wink
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    Thanks Andrea!




    On Wed, Apr 13, 2011 at 2:03 PM, Andrea Giardini <
    airtime-support@lists.sourcefabric.org> wrote:

    > I found a little workaround that seems to work....
    >
    > take your server shell and write:
    >
    > su postgres
    > psql
    > CREATE USER airtime ENCRYPTED PASSWORD 'airtime' LOGIN CREATEDB NOCREATEUSER;
    > CREATE DATABASE airtime;
    > ALTER DATABASE airtime OWNER TO airtime;
    > \q
    >
    >
    >
    > now let's edit the install file:
    >
    > cd [your_dir]/install
    > nano airtime-install.php
    >
    >
    >
    > And modify those two lines:
    >
    > echo "* Creating Airtime database user".PHP_EOL;
    > AirtimeInstall::CreateDatabaseUser();
    >
    > echo "* Creating Airtime database".PHP_EOL;
    > AirtimeInstall::CreateDatabase();
    >
    >
    >
    > in this way:
    >
    > echo "* Creating Airtime database user".PHP_EOL;
    > //AirtimeInstall::CreateDatabaseUser();
    >
    > echo "* Creating Airtime database".PHP_EOL;
    > //AirtimeInstall::CreateDatabase();
    >
    >
    >
    > Run the installer and enjoy! [image: Wink]
    >

  • It seems that the installer can't create correctly the database... I'm not so good with php so i can't help a lot, but please, solve this problem in the next release (installer doesn't work also in 1.7.0) but using Debian stable for testing Smile
  • Andrea,

    I've created a ticket for this problem:
    http://dev.sourcefabric.org/browse/CC-2193
    Airtime Pro Hosting: http://airtime.pro
  • Thanks a lot Razz