Linux user/group not mirrored to 2nd server. Unison fails

Discussion in 'Installation/Configuration' started by K3nneth, Nov 12, 2014.

  1. K3nneth

    K3nneth New Member

    First of, I'd like to thank Till for hes quick response and activations of my forum account.

    And now to my problem...

    I followed 2 guides here on HowToForge, the reason for this is, that I wanted to have MASTER/MASTER replication between to two MySQL servers on CentOS 6.5. Since there was no guide for this i merged 2 guides to make it work. And i DID work, replication happend every 5 min just like the cronjob told it to.

    After that i created a website in ISPConfig and installed Wordpress Multisite. Again this worked fine and replication was happening. However, I made some FQDN and DNS mistakes installing Wordpress Multisite and i had to delete the site. I did that by deleting it from ISPConfig (I deleted DNS records, Site, Dabase, Database user and FTP user.)

    After that i re-created the site in ISPConfig with the correct FQDN - and this worked like a charm. BUT for some reason the file synchronization now failes.

    As far as i can tell, its because the linux users and group are not mirrored from server1 to server2. I have checked the mirror-option in ISPConfig so that server2 is mirrored from server1 and i have allso checked the option to link Linux userid to webid.

    As far as I can see MySQL MASTER/MASTER replication works fine, and I can log into ISPConfig from the webinterface on both servers.

    I dont understand why it stopped working, since i worked at the beginning setup up my first website in ISPConfig.

    I really hopy you gyus can help me.....below is a printout of "what i think you guys need" to solve my problem.

    By the way - Im using ISPConfig V. 3.0.5.4p4

    Unison Log on Server1:
    UNISON 2.40.63 finished propagating changes at 13:15:02.28 on 12 Nov 2014
    Synchronization incomplete at 13:15:02 (0 items transferred, 0 skipped, 8 failed)
    failed: www/clients/client0/web9/cgi-bin
    failed: www/clients/client0/web9/log/20141112-access.log
    failed: www/clients/client0/web9/private
    failed: www/clients/client0/web9/tmp
    failed: www/clients/client0/web9/webdav
    failed: www/php-fcgi-scripts/web5
    failed: www/php-fcgi-scripts/web9
    failed: www/clients/client0/web9/web
    UNISON 2.40.63 started propagating changes at 13:20:02.39 on 12 Nov 2014
    [BGN] Copying www/clients/client0/web9/cgi-bin from /var to //server2.example.com//var
    [BGN] Updating file www/clients/client0/web9/log/20141112-access.log from /var to //server2.example.com//var
    [BGN] Copying www/clients/client0/web9/private from /var to //server2.example.com//var
    [BGN] Copying www/clients/client0/web9/tmp from /var to //server2.example.com//var
    [BGN] Copying www/clients/client0/web9/web from /var to //server2.example.com//var
    [BGN] Copying www/clients/client0/web9/webdav from /var to //server2.example.com//var
    [BGN] Copying www/php-fcgi-scripts/web5 from /var to //server2.example.com//var
    [BGN] Copying www/php-fcgi-scripts/web9 from /var to //server2.example.com//var
    Failed: No user web9
    Failed: No user web9
    Failed: No user web9
    /var/www/clients/client0/web9/web/stats/.htaccess has already been transferred
    Failed: No user web9
    [END] Updating file www/clients/client0/web9/log/20141112-access.log
    Failed: No group client0
    Failed: No user web9
    Failed: No user web9
    UNISON 2.40.63 finished propagating changes at 13:20:02.91 on 12 Nov 2014
    Synchronization incomplete at 13:20:02 (1 item transferred, 0 skipped, 7 failed)
    failed: www/clients/client0/web9/cgi-bin
    failed: www/clients/client0/web9/private
    failed: www/clients/client0/web9/tmp
    failed: www/clients/client0/web9/webdav
    failed: www/php-fcgi-scripts/web5
    failed: www/php-fcgi-scripts/web9
    failed: www/clients/client0/web9/web


    Password file on Server1:
    root:x:0:0:root:/root:/bin/bash
    bin:x:1:1:bin:/bin:/sbin/nologin
    daemon:x:2:2:daemon:/sbin:/sbin/nologin
    adm:x:3:4:adm:/var/adm:/sbin/nologin
    lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
    sync:x:5:0:sync:/sbin:/bin/sync
    shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
    halt:x:7:0:halt:/sbin:/sbin/halt
    mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
    uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
    operator:x:11:0:eek:perator:/root:/sbin/nologin
    games:x:12:100:games:/usr/games:/sbin/nologin
    gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
    ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
    nobody:x:99:99:Nobody:/:/sbin/nologin
    dbus:x:81:81:System message bus:/:/sbin/nologin
    vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
    rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin
    abrt:x:173:173::/etc/abrt:/sbin/nologin
    rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
    nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
    haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
    ntp:x:38:38::/etc/ntp:/sbin/nologin
    saslauth:x:499:76:"Saslauthd user":/var/empty/saslauth:/sbin/nologin
    postfix:x:89:89::/var/spool/postfix:/sbin/nologin
    sshd:x:74:74:privilege-separated SSH:/var/empty/sshd:/sbin/nologin
    tcpdump:x:72:72::/:/sbin/nologin
    oprofile:x:16:16:Special user account to be used by OProfile:/home/oprofile:/sbin/nologin
    apache:x:48:48:Apache:/var/www:/sbin/nologin
    mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
    dovecot:x:97:97:Dovecot IMAP server:/usr/libexec/dovecot:/sbin/nologin
    dovenull:x:498:498:Dovecot's unauthorized user:/usr/libexec/dovecot:/sbin/nologin
    mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
    smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
    clam:x:497:497:Clam Anti Virus Checker:/var/lib/clamav:/sbin/nologin
    amavis:x:496:496:User for amavisd-new:/var/spool/amavisd:/sbin/nologin
    named:x:25:25:Named:/var/named:/sbin/nologin
    mailman:x:41:41:GNU Mailing List Manager:/usr/lib/mailman:/sbin/nologin
    vmail:x:5000:5000::/var/vmail:/bin/bash
    getmail:x:5001:5001::/etc/getmail:/bin/bash
    ispapps:x:5002:5003::/var/www/apps:/bin/bash
    ispconfig:x:5003:5004::/usr/local/ispconfig:/bin/bash
    ispconfigend:x:20000:20000::/usr/local/ispconfig:/bin/bash
    web9:x:10009:10002::/var/www/clients/client0/web9:/bin/false

    Password file on Server2:
    root:x:0:0:root:/root:/bin/bash
    bin:x:1:1:bin:/bin:/sbin/nologin
    daemon:x:2:2:daemon:/sbin:/sbin/nologin
    adm:x:3:4:adm:/var/adm:/sbin/nologin
    lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
    sync:x:5:0:sync:/sbin:/bin/sync
    shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
    halt:x:7:0:halt:/sbin:/sbin/halt
    mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
    uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
    operator:x:11:0:eek:perator:/root:/sbin/nologin
    games:x:12:100:games:/usr/games:/sbin/nologin
    gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
    ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
    nobody:x:99:99:Nobody:/:/sbin/nologin
    dbus:x:81:81:System message bus:/:/sbin/nologin
    vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
    rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin
    abrt:x:173:173::/etc/abrt:/sbin/nologin
    rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
    nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
    haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
    ntp:x:38:38::/etc/ntp:/sbin/nologin
    saslauth:x:499:76:"Saslauthd user":/var/empty/saslauth:/sbin/nologin
    postfix:x:89:89::/var/spool/postfix:/sbin/nologin
    sshd:x:74:74:privilege-separated SSH:/var/empty/sshd:/sbin/nologin
    tcpdump:x:72:72::/:/sbin/nologin
    oprofile:x:16:16:Special user account to be used by OProfile:/home/oprofile:/sbin/nologin
    apache:x:48:48:Apache:/var/www:/sbin/nologin
    mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
    dovecot:x:97:97:Dovecot IMAP server:/usr/libexec/dovecot:/sbin/nologin
    dovenull:x:498:498:Dovecot's unauthorized user:/usr/libexec/dovecot:/sbin/nologin
    mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
    smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
    clam:x:497:497:Clam Anti Virus Checker:/var/lib/clamav:/sbin/nologin
    amavis:x:496:496:User for amavisd-new:/var/spool/amavisd:/sbin/nologin
    named:x:25:25:Named:/var/named:/sbin/nologin
    mailman:x:41:41:GNU Mailing List Manager:/usr/lib/mailman:/sbin/nologin
    vmail:x:5000:5000::/var/vmail:/bin/bash
    getmail:x:5001:5001::/etc/getmail:/bin/bash
    ispapps:x:5002:5003::/var/www/apps:/bin/bash
    ispconfig:x:5003:5004::/usr/local/ispconfig:/bin/bash

    MySQL Slave Status Server1:
    *************************** 1. row ***************************
    Slave_IO_State: Waiting for master to send event
    Master_Host: 10.0.0.2
    Master_User: slaveuser
    Master_Port: 3306
    Connect_Retry: 60
    Master_Log_File: mysql-bin.000003
    Read_Master_Log_Pos: 106
    Relay_Log_File: mysqld-relay-bin.000533
    Relay_Log_Pos: 251
    Relay_Master_Log_File: mysql-bin.000003
    Slave_IO_Running: Yes
    Slave_SQL_Running: Yes
    Replicate_Do_DB:
    Replicate_Ignore_DB:
    Replicate_Do_Table:
    Replicate_Ignore_Table:
    Replicate_Wild_Do_Table:
    Replicate_Wild_Ignore_Table:
    Last_Errno: 0
    Last_Error:
    Skip_Counter: 0
    Exec_Master_Log_Pos: 106
    Relay_Log_Space: 552
    Until_Condition: None
    Until_Log_File:
    Until_Log_Pos: 0
    Master_SSL_Allowed: No
    Master_SSL_CA_File:
    Master_SSL_CA_Path:
    Master_SSL_Cert:
    Master_SSL_Cipher:
    Master_SSL_Key:
    Seconds_Behind_Master: 0
    Master_SSL_Verify_Server_Cert: No
    Last_IO_Errno: 0
    Last_IO_Error:
    Last_SQL_Errno: 0
    Last_SQL_Error:
    1 row in set (0.00 sec)


    MySQL Slave Status Server2:
    *************************** 1. row ***************************
    Slave_IO_State: Waiting for master to send event
    Master_Host: 10.0.0.1
    Master_User: slaveuser
    Master_Port: 3306
    Connect_Retry: 60
    Master_Log_File: mysql-bin.000007
    Read_Master_Log_Pos: 5349048
    Relay_Log_File: mysqld-relay-bin.000013
    Relay_Log_Pos: 2579254
    Relay_Master_Log_File: mysql-bin.000007
    Slave_IO_Running: Yes
    Slave_SQL_Running: Yes
    Replicate_Do_DB:
    Replicate_Ignore_DB:
    Replicate_Do_Table:
    Replicate_Ignore_Table:
    Replicate_Wild_Do_Table:
    Replicate_Wild_Ignore_Table:
    Last_Errno: 0
    Last_Error:
    Skip_Counter: 0
    Exec_Master_Log_Pos: 5349048
    Relay_Log_Space: 2579410
    Until_Condition: None
    Until_Log_File:
    Until_Log_Pos: 0
    Master_SSL_Allowed: No
    Master_SSL_CA_File:
    Master_SSL_CA_Path:
    Master_SSL_Cert:
    Master_SSL_Cipher:
    Master_SSL_Key:
    Seconds_Behind_Master: 0
    Master_SSL_Verify_Server_Cert: No
    Last_IO_Errno: 0
    Last_IO_Error:
    Last_SQL_Errno: 0
    Last_SQL_Error:
    1 row in set (0.00 sec)


    P.S. - In case I cant get Unison to work, do you guys know of any other filesync software I can use on ContOS 6.5?
     
    Last edited: Nov 12, 2014
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem is not unison here, the problem is that your slave seems stopped to have processing requests from master, this hapens mostly when the slave cant connet to the master database anymore.

    In a mirrors system, master and slave still have their own databases, the amster has a database dbispconfig1 and the slave dbispconfig2, the server.sh process on the slave now connects to the master database dbispconfig1 and checks if there are updates that need to be trsnaferred to dbispconfig2. so if the connect to dbispconfig1 fails, then no changes get processed. check server server/lib/config.inc.php file on the slave, it contains 2 sets of database login details, use the set for the master connection (the user is named ispcsrv2 and try to connect ith these excat details from master to slave with the mysql command to see if the connection works.
     
  3. K3nneth

    K3nneth New Member

    /etc/hosts file typo!!

    Omg!

    It turned out to be a typo in my /etc/hosts file!!

    Half a day spend troubleshooting this and it was a simple typo in a FQDN....I feel sooooo stupid :)

    Anyway - Thank you very much Till, I learned a lot about MySQL replication and hos ISPConfig works... :cool:
     

Share This Page