ISPconfig3 -> cannot select server during mail domain creation anymore!

Discussion in 'Installation/Configuration' started by mccyberix, Oct 3, 2014.

  1. mccyberix

    mccyberix Member

    Hello community,
    I have to report a strange behavior on my multiserver ISPconfig3 setup. I’m running 2 ISPconfig3 servers with MYSQL replication and load balancing since several years and never had big issues with my system but recently I tried to add a virtual mail domain and have noticed that there are no servers to select from the first dropdown list called “Server” on the “new Mail Domain” form anymore. I can add a new domain without selecting the server for it and also create a mailbox beneath this domain but cannot access the mailbox because no mailserver found. I don’t know what happened since I did not change anything on the server the only thing I did was to update the ISPconfig3 system, the update process did also not report any issues and everything seemed to work properly after update. One strange thing is that when I have configured my ISPconfig3 system (years ago) I named the master database “dbispconfig” and the slave db “dbispconfig1” but now there is no “dbispconfig” anymore instead of this I have now “dbispconfig1” and “dbispconfig2” did a update process change the names of the db’s or what happened here??? At the moment all my existing domains work properly but I’m not able to add a new one anymore since I cannot select the server for it. Any help will be appreciated!
    Thanks in advance!
     
  2. srijan

    srijan New Member HowtoForge Supporter

  3. mccyberix

    mccyberix Member

    thank you srijan :D, the debuging output gives me the following errors:

    Code:
    PHP Warning:  mysqli::mysqli(): (42000/1044): Access denied for user 'ispcsrv3'@'xxx.xxx.xxx.xxx' to database 'dbispconfig1' in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 62
    
    PHP Warning:  mysqli::mysqli(): (42000/1044): Access denied for user 'ispcsrv3'@'xxx.xxx.xxx.xxx' to database 'dbispconfig1' in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 72
    
    I have several of this lines but they are all the same, there must be some authentication issue, what I've noticed is that there is no mysql user with the coresponding host entry in the mysql user table, I have tried to create the missing user but since the passwords are generated by the setup script I was able only to copy the MD5 hash to the password table manually but the connection error still persists. What makes me wonder is that I have the user "ispconfig2" in all my postfix *.cf files but I cannot find any "ispcsrv3" within a config file. I guess that some update process has messed my installation up... maybe someone can tell me where to look in order to verify the users and their passwords used in ispconfig3.

    thanks in advance!
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This is a connect to the master server. Did you check the user table of the amster server or the local server? This user shall only exist on the master. The password is not a md5, ist the cleartext password, so you can use it in mysql.
     
  5. mccyberix

    mccyberix Member

    thank you till ;)

    now I understand why the "ispcsrv3" is only enabled to connect from master to slave, I have tried to create additional "ispcsrv3" user to enable the slave server to connect to the master but I have reverted this. I have to mention that I run mysql in master/master mode so I have exactly the same users on both servers. I think my problem would be solved if I recreate the "ispcsrv3" user, because when I try to edit the "ispcsrv3" user over phpmyadmin I see the settings but get also an error that this user cannot be found in the user table... thats really strange... is there a way to securely recreate the "ispcsrv3" user?

    thanks in advance!
     
  6. mccyberix

    mccyberix Member

    have to mention that I get this error entry only on the slave server!
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The ispcsrv* user is used by the slave to connect to the master. It does not matter if you use mysql master/master replication for this as the connection and the direction of the connection is still the same.

    Yes, off course. as the amster doe snot use any ispcsrv* mysql users as he is the master.
     
  8. mccyberix

    mccyberix Member

    ok, I have figured out that the ispcsrv3 user had no rights and that was the cause for the connection error mentioned above, now I have granted the following rights: SELECT, INSERT, UPDATE, DELETE, resynced the mysql dbs and the connection error is gone but this still did not help me to solve my initial problem to create new mail domain... I'm simply not able to select the server, dont know where to look... any advice will be appreciated!

    thanks!
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    This user shall have no global righs in the mysql.user table as this would allow an potential attacker to get access to the amster server from the slave. The rights are granted for single tables and columns only.

    is the server lsited in the server table of the dbispconfig database on the master?
     
  10. mccyberix

    mccyberix Member

    I've checked that and the user "ispcsrv3" has definitly no global rights, but now I know why this user had no rights on the "dbispconfig1" and "dbispconfig2" as mentioned in my initial post I have named my db's "dbispconfig" and "dbispconfig1" for the slave db, I dont know how they get renamed but the user "ispcsrv3" had rights only on the old "dbispconfig" which does not exist... so my debug output is empty now but I'm still not able to create new domains :(
     
  11. mccyberix

    mccyberix Member

    and yes the user is now listed in the usertable of the master db ;)
     
  12. mccyberix

    mccyberix Member

    I've noticed that when I create a new mail domain it will be saved but without the server entry, after this step I'm able to create a mailbox also. The mailbox will be replicated to the slave but the mail domain not. When I try to access the new mailbox I get an error that there is no mail server specified.

    [​IMG]
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Check that you have at least one server with mailserver activated under System > server services.
     
  14. mccyberix

    mccyberix Member

    they are both activated, I,ve tried to de/reactiavte them but it still not works...
     
  15. mccyberix

    mccyberix Member

    has someone any idea what caused this issue? I have tried everything without success...
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    the change will get applied onyl to new domains. Exising domains will not change when you activate or deactivate email for a server.
     
  17. mccyberix

    mccyberix Member

    I know this, but the problem is that I cannot create any new domain since I cannot select the server for it, if I leave the server selectbox empty, I cannot login to the mailbox getting this error: No E-Mail - Server found!
     
  18. mccyberix

    mccyberix Member

    I have now found out that my issue must be caused by a previous ISPConfig3 update, somehow the database names are messed up, when I try to update the ISPConfig3 with the option to reconfigure the db permissions the script tries to work on the old db name which is not present on my system, so can anybody please tell me where to look in the config files to correct the name of the databases? this is my last efffort to repair my ISPConfig3 Cluster, the next thing will be that I have to build it up from scratch again and this is annoying because I have build this cluster to prevent exactly this.

    thank you in advance!
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    The database details are in /usr/local/ispconfig/server/lib/config.inc.php and /usr/local/ispconfig/interface/lib/config.inc.php
     
  20. mccyberix

    mccyberix Member

    thank you till, I have now tried to fix the config issues but I'm not sure what is going on, here is a snippet of my ISPConfi3 config file from the master server:

    Code:
    //** Database settings for the master DB. This setting is only used in multiserver setups
    $conf['dbmaster_type']                  = 'mysql';
    $conf['dbmaster_host']                  = '';
    $conf['dbmaster_database']              = 'dbispconfig';
    $conf['dbmaster_user']                  = '';
    $conf['dbmaster_password']              = 'xxxxxxxxxxxxxxxxxxx';
    $conf['dbmaster_new_link']              = false;
    $conf['dbmaster_client_flags']  = 0;
    
    
    I dont think this is right, have the same entries in all config files (I have just changed the password to xxx)
     

Share This Page