HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   upgrade to 3.0.3.x : login fails (http://www.howtoforge.com/forums/showthread.php?t=51838)

borispapin 10th March 2011 18:24

upgrade to 3.0.3.x : login fails
 
1 Attachment(s)
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

falko 11th March 2011 15:49

Quote:

Originally Posted by borispapin (Post 253127)
[...]
Starting full database update.
ERROR 1054 (42S22) at line 483: Unknown column 'document_root_www' in 'field list'
[...]

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.

borispapin 14th March 2011 15:51

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

till 14th March 2011 15:56

Quote:

Do you see what I am doing wrong ?
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.

Quote:

Should I better start over with fresh install (and backup/restore the web site data , passwd files, etc.)
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.

borispapin 14th March 2011 16:17

Quote:

Please check if the user that you try to use to login is listed in the sys_user database table in the ispconfig database.
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.

till 14th March 2011 16:20

Quote:

One thing that may be interesting is that some of the passwort column entries are encrypted beginning with '$1$', others contain only letter/digits.
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 ?

borispapin 14th March 2011 16:47

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

till 14th March 2011 17:17

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.

borispapin 14th March 2011 17:38

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.

till 14th March 2011 17:53

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


All times are GMT +2. The time now is 06:04.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.