Resync hangs

Discussion in 'Installation/Configuration' started by rsteuer, Oct 16, 2018.

  1. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    On the control panel you can use mysql cli or phpmyadmin, I think the perfect server guides have example commands for adding the users, but you simply "update user ..." rather than inserting into it. For the web server the username/password is saved in /usr/local/ispconfig/server/lib/config.inc.php, make sure they are the dbmaster_* settings, not db_*.
     
  2. rsteuer

    rsteuer Member

    Thanks Jesse, but that's where the rub lies. I don't know what the password is on the webserver (unless it's in clear text, which I'm assuming it is not). So, if I reset the password in the master db, it's still not going to match the password stored in the webserver's db. Can I simply change the password using phpmyadmin in both databases? Do you know what hash MySQL uses for encrypting the password?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The password is in clear text in the config.inc.php file, just copy it from there for your test.
     
  4. rsteuer

    rsteuer Member

    Copying and pasting password
    didn't help resolve the issue. I found this article:
    https://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/
    When I attempted to set the debug level to Error, I received this message:
    1. tmp-dir Path is empty.
      Invalid tmp-dir path.
      Log retention must be a number > 0
    Found this article:
    https://www.howtoforge.com/communit...ath-in-a-server-settings-fresh-install.78413/
    still no help (and tmp-dir error is still 44there). Tried installing the git-stable and still no synchronization
     
  5. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    The password is in plaintext in config.inc.php on the slave server, but it must be converted to mysql password format on the master when updating the mysql.user table. Look up the username (ispcsrv#) and then:
    Code:
    UPDATE mysql.user SET Password=PASSWORD('plaintext password') WHERE user='ispcsrv#';
    flush privileges;
     
  6. rsteuer

    rsteuer Member

    Thanks Jesse. Still no luck. Here's what's been done:
    1. There are several entries in the master db for the web server (spider)
    2. I changed the user password on everyone of the ispc... users in the master db using the mysl cli.
    3. I changed the ispc… one at a time to match the users in the master db. without changing the password.
    4. Ran server.sh and in every instance received this error:

    01.11.2018-12:47 - WARNING - There is already a lockfile set, but no process running with this pid (57275). Continuing.
    PHP Warning: mysqli_real_connect(): (28000/1045): Access denied for user 'ispcsrv20'@'spider.domain'(using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 80
    PHP Warning: mysqli_real_connect(): (28000/1045): Access denied for user 'ispcsrv20'@'spider.domain'(using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 83
    PHP Warning: mysqli_real_connect(): (28000/1045): Access denied for user 'ispcsrv20'@'spider.domain'(using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 83
    PHP Warning: mysqli_real_connect(): (28000/1045): Access denied for user 'ispcsrv20'@'spider.domain'(using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 83

    I've truncated the error message because there are numerous messages that include other lines from the db_mysqli.inc.php file (line 198). However, there is one line:

    DB::query -> reconnectUnable to load the server configuration from database.PHP Warning: mysqli_real_connect(): (28000/1045): Access denied for user 'ispcsrv20'@'spider.domain'(using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 80
     
  7. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Did you run "flush privileges;" after changing a password? Other than that it sounds like you're going about it correctly. Do you have user entries for the slave server's ip address, as well as hostname? (if the master and slave differ in what they thing the slave server's hostname is, then an entry will be created using what the slave thinks the hostname is, which won't ever match on the master)

    Note you can test from mysql cli on the slave server to get the password tested and working, eg. "mysql -h spider.domain -u ispcsrv20 -p dbispconfig".
     
  8. rsteuer

    rsteuer Member

    I did not run flush privs. After doing so, errors stopped (thanks for the heads-up). However, the synch is still hung and I cannot connect to the master db from the slave using the creds saved in the config.inc.php file.
     
  9. rsteuer

    rsteuer Member

    BTW, yes, there is an IP and hostname in the master and slave dbs.
     
  10. rsteuer

    rsteuer Member

    Maybe a different approach. In the ISP Control Panel, the webserver's version is listed as 3.1.8p1. However, this was upgraded to ver 3.1.13 (which is when our problem started) and is correctly indicated in the confgi.inc.php file on the webserver.
    Is there a way to find out which server in the master's database is running version 3.1.8p1? I am hoping that I can then determine whether or not I've got the correct username in the config file. I can only see one web server listed in dbispconfig.server table, identified as server_id 16. Not sure that that ties int the username of ispcsrv16. If it does, then we still have an issue somewhere else.

    This is frustrating.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The numeric ID is ispcsrv user name is the server_id.
     
  12. rsteuer

    rsteuer Member

    Thanks Till. My ispcsrv# and server id march, so that's not the issue. Any suggestions on where to go from here? Our clients are getting very annoyed because their changes are not propagating. Is there a way to uninstall and reinstall without losing everything?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    No, that's not the right route. When the MySQL login fails, then you must find out why and when that's fixed, the changes will get propagated again. So it comes down to a simple mysql login problem then. The most likely case are wrong (or accidently changed) hostnames which may cause mysql to fail to resolve. Or you might consider contacting Florian from business support to take a look at the problem on your server. https://www.ispconfig.org/get-support/?type=ispconfig
     
  14. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Once you have the mysql login part working (which you do now?), run the server.sh cron job with debugging enabled, and see what you find. Remember to check the sys_datalog table on the master and see what the server_id is for pending jobs (maybe you ended up changing the server_id on your web server, so nothing propogates to it now).
     
  15. rsteuer

    rsteuer Member

    I finally have the ispcsrv* user authenticating to MySQL (don't ask how or why, because I have no idea!). But syncs still are not going through.
    [email protected]:/usr/local/ispconfig/server/lib# mysql -u ispcsrv16 -p -h webadmin
    Enter password:
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 1604732
    Server version: 10.0.36-MariaDB-0+deb8u1 (Debian)

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]>

    Jesse, I cannot enable debug mode (see post from yesterday at 1:49PM). You mentioned checking the sys_datalog table, but I have no idea how to read what I'm seeing. In phpmyadmin, can I create a search that will help identify the pending jobs?
     

Share This Page