Can't Login After Update

Discussion in 'Installation/Configuration' started by samuch, May 26, 2007.

  1. samuch

    samuch New Member

    Just ran the update and it appeared to install fine. However when I go to and attempt to use my admin login it fails.

    I noticed I'm now getting this when I start the server:

    Ok: Pass Phrase Dialog successful.
    /root/ispconfig/httpd/bin/apachectl startssl: httpd started
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /root/ispconfig/scripts/lib/ on line 47
    No results found!ISPConfig system is now up and running!

    I'm guessing this is the root of the problem. Any thoughts?

    Thanks in advance.
  2. samuch

    samuch New Member

    Does anyone have any thoughts or has anyone else experienced this? I'm quite stuck if I can't add or maintain any of my sites. Any thoughts are appreciated.

  3. falko

    falko Super Moderator ISPConfig Developer

    Did you get any errors during the update?
    Can you check if the ISPConfig database exists?
  4. samuch

    samuch New Member

    There were no errors during the update until the very end when it started the services and gave the error I listed.

    Do you know the link to phpmyadmin for the default install? I can't remember it as I usually logged in as admin and then clicked the link.
  5. samuch

    samuch New Member

    Anyone have any thoughts? Would it hurt if I ran the setup again just in case something didn't go through? I surely don't want to do any damage but it's important that I get back in.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have the backups in /tmp that were created automatically during the update? It must be 2 tar.gz files and 1 .sql file.
  7. samuch

    samuch New Member

    I see home_admispconfig_05_26_2007__09_05_45.tar.gz and root_ispconfig_05_26_2007__09_05_45.tar.gz and existing_db_05_26_2007__09_05_45.sql.
  8. samuch

    samuch New Member

    I figured out the phpmyadmin address and logged in to look for the database. All my databases are there EXCEPT "ispconfig". I checked the to make sure it was looking for this database and it is.

    I ran a mysqlcheck on the database and it says "Unknown database".

    Why would this database have disappeared? Also, how could the sites be running if the database is gone? How do I restore the database from the backup made when I upgraded?
    Last edited: May 30, 2007
  9. falko

    falko Super Moderator ISPConfig Developer

    You can restore /home/admispconfig/ from home_admispconfig_05_26_2007__09_05_45.tar.gz and /root/ispconfig/ from root_ispconfig_05_26_2007__09_05_45.tar.gz.
    The ISPConfig db can be restored from existing_db_05_26_2007__09_05_45.sql like this:

    The web sites have nothing to do with the database. The datbase is used by ISPConfig to write the configuration files; once that's done the web sites works regardless if there's an ISPConfig database or not.
  10. samuch

    samuch New Member

    New problem. I went to import the last database backup and noticed nothing was imported. I looked in the backup file and this is all that was there:

    -- MySQL dump 10.10
    -- Host: localhost    Database: ispconfig
    -- ------------------------------------------------------
    -- Server version       5.0.26
    /*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
    /*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
    /*!40101 SET @[email protected]@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40103 SET @[email protected]@TIME_ZONE */;
    /*!40103 SET TIME_ZONE='+00:00' */;
    /*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */;
    Any thoughts on why this would have been emptied? Am I pretty much screwed? Is there anyway to save this? I appreciate all the help so far. I'm getting pretty nervous.
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have any backups of your mysql databases?
  12. samuch

    samuch New Member

    I do have one from March, the last time I updated. But when I go to import it it tells me all the tables don't exist. I'm not sure of what the table structures are so I can't manually create them all and then try to import. Am I missing something on the import? Is it not able to create all the tables as it imports?

    Is there any way to create email accounts for site that already exist via command line? I'm pretty stuck if I can't get some emails up by the morning.

    Thanks for all the help so far and PLEASE help me get this back up and going. PLEASE.
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    If you do not have a backup of the data structure, you can get the data structure from the sql database dump that is in the ispconfig installer tar.gz file.

    You can not craete email addresses on the command line that can later be used from within ISPConfig.
  14. samuch

    samuch New Member

    I went ahead and populated the DB using the db_ispconfig.sql file in the install folder. I then imported my sql dump from March. It didn't go very smooth but I got it all in gradually.

    However, it appears that it reset my admin login password to admin. I can now login to with admin:admin however none of my clients, or sites are listed here. It's as if it's a new installation.

    If I go to Management > Server > Settings I can see those settings are proper but like I said, no sites are listed at all.

    Any ideas on how to fix this?

  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Then you either did not import your backup or your backup was empty.
  16. samuch

    samuch New Member

    If I look in the database itself I can see some of my sites and users so it's not empty. I looked at the backup file as well and confirmed it's not empty.

    Is it possible that after I login it's not reading from the correct spots in the database?

  17. falko

    falko Super Moderator ISPConfig Developer

    Please do not import the db_ispconfig.sql file. I suggest to restore your database from your SQL dump from March only.
  18. samuch

    samuch New Member

    I was not able to import the March SQL dump as there was no database structure yet. Without the structure it was not able to do simple inserts.

    Should the March dump be able to recreate the structure?

  19. falko

    falko Super Moderator ISPConfig Developer

    I'm not sure right now. If it doesn't, you can take the structure from db_ispconfig.sql, but please do not use the INSERTs from that file.
  20. samuch

    samuch New Member

    I was able to get the backup database restored by taking the db_ispconfig.sql file and stripping out all the INSERT commands to rebuild the database, then I imported the March backup file I had.

    Now I can login and see sites. However, the backup that attempted when I ran the initial update did not complete so I'm looking back 3 months. This means I have two sites on the server that aren't showing up in ISPConfig.

    Is there a way for me to manually add those sites into ISPConfig so I can continue administering them?

    Thank you very much for your help in getting the database back up!

Share This Page