upgrade to 3.0.3.x : login fails

Discussion in 'Installation/Configuration' started by borispapin, Mar 10, 2011.

  1. borispapin

    borispapin New Member

    Hello,

    I'm having trouble with upgrading ISPconfig from 3.0.2.2 to 3.0.3.2 (and since 3.0.3) on a debian lenny system.
    It's a single host with websites, mysql and fileserver(ftp) modules activated.

    When i try to login with a valid username/password, the login page is reloaded and it looks like i have to login again.
    A wrong password gives the normal "Error : Username or Password wrong." message.

    I had one error during the upgrade ( /usr/local/ispconfig/server/scripts/ispconfig_update.sh) but i'm not sure if it's related :
    [...]
    Starting full database update.
    ERROR 1054 (42S22) at line 483: Unknown column 'document_root_www' in 'field list'
    [...]

    I see no errors in /var/log/syslog, /var/log/ispconfig/ispconfig.log, everything seems to work fine (websites, ftp+ssh accounts), i can connect to mysql with the ispconfig user.

    Maybe someone had the same problem or will see what's wrong with my update...

    Many thanks

    Boris
     

    Attached Files:

  2. falko

    falko Super Moderator ISPConfig Developer

    That's the problem (did you have an ISPConfig 3 SVN version installed before instead of ISPConfig 3 stable?).

    Please create the column document_root_www in the web_domain table manually (VARCHAR 255) and then restore your database from the SQL dump in the /root directory. Afterwards, everything should be fine.
     
  3. borispapin

    borispapin New Member

    Hello,
    Thank you very much for your answer.

    First a few precisions that may be useful :
    - The svn version of ispconfig has been installed on this server a while ago.
    - Before the upgrade, column document_root_www exists and has only NULL entries
    - After the upgrade, document_root_www doesn't exist.


    Trying to follow your advices, I create it manually with :
    $ mysql -root -p dbispconfig
    ...
    mysql> ALTER TABLE web_domain ADD document_root_www VARCHAR(255);
    Query OK, 0 rows affected (0.21 sec)
    Records: 0 Duplicates: 0 Warnings: 0

    When importing the database directly i get :
    $ mysql -u root -p dbispconfig </root/ispconfig_db_backup_2011-03-14_02-15.sql
    Enter password:
    ERROR 1062 (23000) at line 33: Duplicate entry '1' for key 1

    ... if I empty each table (TRUNCATE) and try to import it again, it raises no error, all data seems here.

    But still the problem remains and I can't login to the web interface ;

    Do you see what I am doing wrong ?
    Should I better start over with fresh install (and backup/restore the web site data , passwd files, etc.)

    Thank you for your help,

    Boris
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The original problem was that you used a svn version. SVN versions are for developers only and may not be used for production systems as they might use a different table layout then the stable line. So updates from svn to stable might break the setup as it happened in your case.

    This should not be nescessary.

    Please check if the user that you try to use to login is listed in the sys_user database table in the ispconfig database.
     
  5. borispapin

    borispapin New Member

    yes, they are.
    One thing that may be interesting is that some of the passwort column entries are encrypted beginning with '$1$', others contain only letter/digits.
    If I enter a wrong password, i have the message "Username or Password wrong."
    Thanks again for taking time to answer my questions.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats ok. ISPConfig switched from md5 to crypt passwords, the interface detects the encryption automatically before the password gets verified.

    Are you able to login to mysql with the hostname, user and password that are in the file /usr/local/ispconfig/interface/lib/config.inc.php ?
     
  7. borispapin

    borispapin New Member

    yes, no problem to login with user ispconfig and the pasword in /usr/local/ispconfig/interface/lib/config.inc.php
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. Please edit the user in the sys_user table in the ispconfig database with phpmyadmin and set a new password for that user. Use the mysql md5 function to encrypt the password. Then try to login again with that user.
     
  9. borispapin

    borispapin New Member

    1. the command to generate the encrypted string :
    $ mysql -u ispconfig -p
    Enter password:
    mysql> SELECT MD5('my_pass');
    +----------------------------------+
    | MD5('my_pass') |
    +----------------------------------+
    | 81ed91e1131a3a5a50d8a68e8ef85fa0 |
    +----------------------------------+
    1 row in set (0.00 sec)

    2. Copy/paste the string in the 'passwort' column of sys_usr table for the user gives :
    Affected rows: 1
    SQL query:
    UPDATE `dbispconfig`.`sys_user` SET `passwort` = '81ed91e1131a3a5a50d8a68e8ef85fa0' WHERE `sys_user`.`userid` =1 LIMIT 1 ;


    Still no luck, the new password is seen by ispconfig (no error on login, Error with the old one) but i still am stuck on the login page.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Please try the following procedure:

    1) Delete the docroot_www column in the web_domain table of the ispconfig database to ensure that the new update does not fail.
    2) Run the update again by using the manual update procedure that is discribed here:

    http://www.howtoforge.com/forums/showthread.php?t=50824
     
  11. borispapin

    borispapin New Member

    Hello, thanks again for taking time to help to work around this problem.
    Trying to follow your advice :
    (hope I understood what you're telling me to do)

    mysql> ALTER TABLE web_domain DROP document_root_www;

    and then
    cd /tmp
    wget ...
    tar xvfz ISPConfig
    cd ispconfig3_install/install/
    php -q update.php

    leads to the error during update
    Code:
    >> Update  
    
    Operating System: Debian Lenny or compatible
    
    This application will update ISPConfig 3 on your server.
    Starting incremental database update.
    ERROR 1091 (42000) at line 4: Can't DROP 'document_root_www'; check that column/key exists
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0004.sql
    Reconfigure Permissions in master database? (yes,no) [no]: 
    ...
    
    and the same impossibility to login.
     

Share This Page