Round Cube on MultiServer?

Discussion in 'Installation/Configuration' started by electron79, Oct 26, 2020.

  1. electron79

    electron79 Member

    Test:

    From NS1 to Master with bd user c1db:
    Last login: Thu Oct 29 16:18:59 2020 from 192.168.2.172
    root@ns1:~# mysql -hwww.lasandino.com.ni -uc1db -p
    Enter password:
    ERROR 1045 (28000): Access denied for user 'c1db'@'ns1.lasandino.com.ni' (using password: YES)->FAIL

    From NS1 to Server DataBase with user c1db:
    root@ns1:~# mysql -hbd.lasandino.com.ni -uc1db -p
    Enter password:
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 3457
    Server version: 10.5.6-MariaDB-1:10.5.6+maria~buster mariadb.org binary distribution
    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)]> ->->OK

    /////////////////
    From NS2 to Master with user c1db:
    root@bd:~# mysql -hwww.lasandino.com.ni -uc1db -p
    Enter password:
    ERROR 1045 (28000): Access denied for user 'c1db'@'bd.lasandino.com.ni' (using password: YES) ->FAIL

    From NS2 to Server DataBase with user c1db:
    root@bd:~# mysql -hbd.lasandino.com.ni -uc1db -p
    Enter password:
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 3463
    Server version: 10.5.6-MariaDB-1:10.5.6+maria~buster mariadb.org binary distribution
    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)]> ->->OK

    ///////////////////
    From Mail to Master with user c1db:
    root@mail:~# mysql -hwww.lasandino.com.ni -uc1db -p
    Enter password:
    ERROR 1045 (28000): Access denied for user 'c1db'@'mail.lasandino.com.ni' (using password: YES) -> FAIL

    From NS2 to Server DataBase with user c1db:
    root@mail:~# mysql -hbd.lasandino.com.ni -uc1db -p
    Enter password:
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 3487
    Server version: 10.5.6-MariaDB-1:10.5.6+maria~buster mariadb.org binary distribution
    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)]> ->OK

    //////////////////////////////////////////////
    On Master with user c1db:
    root@www:/# mysql -hwww.lasandino.com.ni -uc1db -p
    Enter password:
    ERROR 1045 (28000): Access denied for user 'c1db'@'localhost' (using password: Y ES) -> FAIL

    From Master to Server DataBase with user c1db:
    root@www:/# mysql -hbd.lasandino.com.ni -uc1db -p
    Enter password:
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 3512
    Server version: 10.5.6-MariaDB-1:10.5.6+maria~buster mariadb.org binary distribution
    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)]> ->OK

    ////////////////////////////////////////////
    Whats mean this on my server master log (/var/log/mysql/error.log)

    2020-10-29 16:46:19 154006 [Warning] Access denied for user 'c1db'@'localhost' (using password: YES)
    2020-10-29 16:48:12 154077 [Warning] Access denied for user 'c1db'@'localhost' (using password: YES)

    ///////////////////////////////////////////
    Some idea?

    Note: Another piece of information, these servers have private ip, but I will publish them using NAT port forwarding.

    Thanks...
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    So everything is working correctly here, you can login with your database user on the database server, where the user exists, and you can not login with your database user on the master server, where that user does not exist.

    That means you/something (website?) tried to log in to the local mysql server as the c1db user. That 'localhost' is a touch misleading, as it indicates either a mysql connection over the unix socket or over a tcp connection to localhost addr (127.0.0.1), but either way it's the same issue. So if this log file is on your database server, it would probably indicate using a bad password. If that log file is on your web server, it might indicate you have a website connecting to the local mysql server instead of connecting to your actual database server (which works, per your tests above).

    Sounds like you're making good progress!
     
  3. electron79

    electron79 Member

    Right!

    Yes, its my error, now i go to fix. But, how to do, that my users to access his databases with GUI Web "master.com/phpmyadmin"?

    Thanks...
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    I've never done this, but I'd guess it's probably fairly easy to change the database server that phpmyadmin connects to if you only want it to access one (open your phpmyadmin config file and see what settings there are, there's certainly going to be one for the db server). If you need it to manage multiple servers (and can accept the reduced security that sort of a configuration would require), you could try https://www.howtoforge.com/managing...-phpmyadmin-installation-using-ssl-encryption
     
  5. electron79

    electron79 Member

    I will review and comment.
     
  6. electron79

    electron79 Member

    It is required to enter with a database user x from the Master server (phpmyadmin), allowing the user to modify their data according to their needs.

    Thank you ...
     
  7. electron79

    electron79 Member

    On the master server is where all the modifications are created, from websites, dns records and databases, not if what I have shown you so far, there is a problem, this because I see that the mail server has created domains for it mail and accounts from the Master server, but to be able to log in with a "Webmal" mail client like RoundCube, is there any special configuration to modify, such as the database theme?

    Note: I still can't see the user's database data in PHPMyAdmin from the master, using the users' database account.

    Could it be some configuration that I need to make in phpmyadmin on the master?

    Thanks guys ...
     
  8. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Yes, see my last reply.
     
  9. electron79

    electron79 Member

    With some changes and some adjustments in the master, but I do not see that the Server finishes updating, please see the image.

    Thank you.
     

    Attached Files:

  10. electron79

    electron79 Member

    I decided not to install RoundCube and not to modify mysql on the remote server so that the Master server could access via PHPMyAdmin, for now I will work like this, on another occasion I will create an environment not in production.

    Thanks for the help, it only remains for me to see what happens that does not update a change from the Server Master.

    Note: the change or adjustment was at the time of creating a mail domain and updating an email account password. But as you saw, the Master does not finish updating, this is the pending red icon ...

    Thank you ....
     
  11. electron79

    electron79 Member

    More information.

    Thanks guys...
     

    Attached Files:

  12. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    See the "read before posting" thread at the top of this forum for instructions to set your slave server to debug mode and find why it is not clearing the job queue.
     
  13. electron79

    electron79 Member

    Hi, following my problem with the "Changes not updating sitting in Que." Post.

    Look for information to activate debugging on the servers, once debugging is enabled, I found one of the servers, specifically the mail one, since from the master server I made a change for some mail accounts and this appeared:

    root @ mail: / # /usr/local/ispconfig/server/server.sh
    10/31/2020-13: 48 - WARNING - There is already a lockfile set, but no process running with this pid (1222). Continuing.
    PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failed PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failed PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failed PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failed PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failed Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible! PHP Fatal error: Uncaught Error: Call to a member function testConnection () on bool in /usr/local/ispconfig/server/server.php:64
    Stack trace:
    # 0 {main}
    thrown in /usr/local/ispconfig/server/server.php on line 64
    PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
    PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failed PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failed PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failed PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failed PHP Warning: mysqli_real_connect (): (HY000 / 2002): Connection timed out in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 91
    Database connection failed Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible! root @ mail: / #

    Before this make the following change to the mail server:

    https://blog.schaal-24.de/server/error-error-in-accept-too-many-open-files/?lang=en

    then I got these messages in /var/log/ispconfig/ispconfig.log


    Thanks ...
     

    Attached Files:

  14. electron79

    electron79 Member

    A query!!

    When you have to install PHPMyAdmin on the master, I should have placed the database server in the following:

    from
    mysql -u root -p
    MariaDB [(none)]> CREATE DATABASE phpmyadmin;
    MariaDB [(none)]> CREATE USER 'pma' @ 'localhost' IDENTIFIED BY 'PASSWORD';
    MariaDB [(none)]> GRANT ALL PRIVILEGES ON phpmyadmin. * TO 'pma' @ 'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
    MariaDB [(none)]> FLUSH PRIVILEGES;
    MariaDB [(none)]> EXIT;

    to
    mysql -u root -p
    MariaDB [(none)]> CREATE DATABASE phpmyadmin;
    MariaDB [(none)]> CREATE USER 'pma'@'bd.lasandino.com.ni' IDENTIFIED BY 'PASSWORD';
    MariaDB [(none)]> GRANT ALL PRIVILEGES ON phpmyadmin. * TO 'pma' @ 'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
    MariaDB [(none)]> FLUSH PRIVILEGES;
    MariaDB [(none)]> EXIT;


    And in the file:

    nano /usr/share/phpmyadmin/config.inc.php

    from
    .
    .
    / * User used to manipulate with storage * /
    $ cfg ['Servers'] [$ i] ['controlhost'] = 'localhost';
    $ cfg ['Servers'] [$ i] ['controlport'] = '';
    $ cfg ['Servers'] [$ i] ['controluser'] = 'pma';
    $ cfg ['Servers'] [$ i] ['controlpass'] = 'PASSWORD';
    / * Storage database and tables * /
    $ cfg ['Servers'] [$ i] ['pmadb'] = 'phpmyadmin';
    $ cfg ['Servers'] [$ i] ['bookmarktable'] = 'pma__bookmark';
    $ cfg ['Servers'] [$ i] ['relation'] = 'pma__relation';
    .
    .

    to
    .
    .
    / * User used to manipulate with storage * /
    $ cfg ['Servers'] [$ i] ['controlhost'] = 'bd.lasandino.com.ni';
    $ cfg ['Servers'] [$ i] ['controlport'] = '';
    $ cfg ['Servers'] [$ i] ['controluser'] = 'pma';
    $ cfg ['Servers'] [$ i] ['controlpass'] = 'PASSWORD';
    / * Storage database and tables * /
    $ cfg ['Servers'] [$ i] ['pmadb'] = 'phpmyadmin';
    $ cfg ['Servers'] [$ i] ['bookmarktable'] = 'pma__bookmark';
    $ cfg ['Servers'] [$ i] ['relation'] = 'pma__relation';

    From localhost to bd.lasandino.com.ni? I think I have an error, is what I am saying correct?

    Thanks.
     
  15. electron79

    electron79 Member

    More information:

    On my Mail Server:
    root@mail:/# colortail -f /var/log/ispconfig/ispconfig.log
    ==> /var/log/ispconfig/ispconfig.log <==

    ***************
    On my Master Server:
    root@www:/# colortail -f /var/log/ispconfig/ispconfig.log
    ==> /var/log/ispconfig/ispconfig.log <==
    31.10.2020-12:46 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    31.10.2020-12:46 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-12:47 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    31.10.2020-12:47 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-12:48 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    31.10.2020-12:48 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:43 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    31.10.2020-13:43 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:44 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    31.10.2020-13:44 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:49 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:50 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    31.10.2020-13:57 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:58 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.

    ****************
    On my DataBase Server:

    root@bd:/# colortail -f /var/log/ispconfig/ispconfig.log
    ==> /var/log/ispconfig/ispconfig.log <==
    31.10.2020-13:53 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:54 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:55 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:56 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:57 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:58 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-13:59 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-14:00 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-14:01 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-14:02 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-14:03 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-14:04 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    31.10.2020-14:05 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
     

Share This Page