Setup of multiserver won't work currectly

Discussion in 'Installation/Configuration' started by AeroBytes, Mar 14, 2025.

  1. AeroBytes

    AeroBytes New Member

    upload_2025-3-14_12-55-35.png
    Hi. So i have a multi server setup.
    I've a MariaDB DB cluster and using CephFS for /var/www/.

    Now the main each ISPConfig instance has it's own DB. In the expert setup i selected multi server and that works.

    upload_2025-3-14_13-0-18.png

    But when i make a new client or site, it wont sync to the other servers.
    Also it wont make the web directory (in this case /var/www/clients/client8/web8).
    But that is a permission issue i think:

    root@Yuki:~# ls -l /var/www
    lrwxrwxrwx 1 root root 15 Mar 14 09:04 /var/www -> /mnt/cephfs/www
    root@Yuki:~# ls -l /mnt/cephfs/www/
    total 2
    drwxr-xr-x 2 ispapps ispapps 0 Mar 14 10:06 apps
    lrwxrwxrwx 1 root root 30 Mar 14 11:22 auticodes.nl -> /var/www/clients/client8/web8/
    drwxr-xr-x 2 root root 612 Mar 14 09:36 html

    I do now see that it makes an syslink back to /var/www with the web dir but it doesnt make it and the counter .
    of "The following changes are not yet populated to all servers" Stays on 48
    Who can help me? Thanks in advance! <3
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    AeroBytes likes this.
  3. AeroBytes

    AeroBytes New Member

    Hi! I indeed found some valuable information. My bad.
    The dbmaster credentials where wrong, and that fixed the sync issue.

    I did read the cannot write changes to the disk part but could not figure it out.

    Code:
    root@Yuki:/var/www# chown -R root:root clients/
    root@Yuki:/var/www# ls -l
    total 3
    drwxr-xr-x 2 ispapps ispapps     0 Mar 14 10:06 apps
    lrwxrwxrwx 1 root    root       30 Mar 14 12:20 auticodes.nl -> /var/www/clients/client8/web8/
    drwxr-xr-x 3 root    root    18798 Mar 14 12:08 clients
    drwxr-xr-x 2 root    root      612 Mar 14 09:36 html
    lrwxrwxrwx 1 root    root       31 Mar 14 12:24 test.auticodes.nl -> /var/www/clients/client8/web12/
    root@Yuki:/var/www# ls -l clients/
    total 1
    drwxr-xr-x 3 root root 18798 Mar 14 12:24 client8
    root@Yuki:/var/www# ls -l clients/client8/
    total 2
    lrwxrwxrwx 1 root root    30 Mar 14 12:09 auticodes.nl -> /var/www/clients/client8/web8/
    lrwxrwxrwx 1 root root    31 Mar 14 12:24 test.auticodes.nl -> /var/www/clients/client8/web12/
    drwxr-xr-x 2 root root 18737 Mar 14 12:14 web8
    root@Yuki:/var/www#
    Code:
    *:*:*:*::*:80           (209605/nginx:)
    [localhost]10           (186020/dovecot)
    *:*:*:*::**:*:*:*::*53          (186043/named)
    *:*:*:*::**:*:*:*::*53          (186043/named)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy DROP)
    target     prot opt source               destination
    DOCKER-USER  all  --  [anywhere]/0            [anywhere]/0
    DOCKER-ISOLATION-STAGE-1  all  --  [anywhere]/0            [anywhere]/0
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0            ctstate RELATED,ESTABLISHED
    DOCKER     all  --  [anywhere]/0            [anywhere]/0
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0
    ACCEPT     all  --  [anywhere]/0            [anywhere]/0
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain DOCKER (1 references)
    target     prot opt source               destination
    
    Chain DOCKER-ISOLATION-STAGE-1 (1 references)
    target     prot opt source               destination
    DOCKER-ISOLATION-STAGE-2  all  --  [anywhere]/0            [anywhere]/0
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain DOCKER-ISOLATION-STAGE-2 (1 references)
    target     prot opt source               destination
    DROP       all  --  [anywhere]/0            [anywhere]/0
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain DOCKER-USER (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    
    
    
    ##### LET'S ENCRYPT #####
    acme.sh is installed in /root/.acme.sh/acme.sh
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The ls output looks ok so far. So, does it work now? However, with CephFS, you will not have any website quota.
     
  5. AeroBytes

    AeroBytes New Member

    Im sadly still getting a 500 error with no logs in /var/log/nginx/error.log on any of the nodes
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the error.log of the website you access, not the global error.log file. Also use debug mode when you create a new site, as mentioned din read before posting.
     
  7. AeroBytes

    AeroBytes New Member

    Code:
    14.03.2025-12:24 - DEBUG [system.inc:2436] - safe_exec cmd: chown -R 'web12':'client8' '/var/www/clients/client8/web12/web/' - return code: 1
    14.03.2025-12:24 - DEBUG [system.inc:2436] - safe_exec cmd: chown 'web12':'client8' '/var/www/clients/client8/web12/web/' - return code: 1
    14.03.2025-12:24 - DEBUG [system.inc:1883] - Action aborted, target is a symlink: /var/www/clients/client8/web12
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/private
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/web
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/private
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/ssl
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/web/
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/tmp
    14.03.2025-12:24 - DEBUG [system.inc:2436] - safe_exec cmd: usermod --groups sshusers 'web12' 2>/dev/null - return code: 0
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/cgi-bin
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/cgi-bin
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/ssl
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/ssl
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/tmp
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/tmp
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/web
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/web
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/web/error
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/web/error
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/web/stats
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/web/stats
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/private
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/private
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/web/
    14.03.2025-12:24 - WARNING - Action aborted, file is a symlink: /var/www/clients/client8/web12/web/
    14.03.2025-12:24 - DEBUG [system.inc:1883] - Action aborted, target is a symlink: /var/www/clients/client8/web12
    14.03.2025-12:24 - DEBUG [system.inc:2436] - safe_exec cmd: touch '/var/log/ispconfig/httpd/test.auticodes.nl/error.log' - return code: 0
    14.03.2025-12:24 - DEBUG [nginx plugin.inc:1398] - SSL Disabled. test.auticodes.nl
    14.03.2025-12:24 - DEBUG [system.inc:2436] - safe_exec cmd: which 'nginx' 2> /dev/null - return code: 0
    14.03.2025-12:24 - DEBUG [system.inc:2436] - safe_exec cmd: which 'nginx' 2> /dev/null - return code: 0
    14.03.2025-12:24 - DEBUG [system.inc:2436] - safe_exec cmd: which 'nginx' 2> /dev/null - return code: 0
    14.03.2025-12:24 - DEBUG [nginx plugin.inc:1926] - Writing the vhost file: /etc/nginx/sites-available/test.auticodes.nl.vhost
    14.03.2025-12:24 - DEBUG [nginx plugin.inc:1956] - Creating symlink: /etc/nginx/sites-enabled/100-test.auticodes.nl.vhost->/etc/nginx/sites-available/test.auticodes.nl.vhost
    14.03.2025-12:24 - WARNING - No awstats base config found. Either awstats.conf or awstats.model.conf must exist in /etc/awstats.
    14.03.2025-12:24 - DEBUG [services.inc:56] - Calling function 'restartPHP_FPM' from module 'web_module'.
    14.03.2025-12:24 - DEBUG [system.inc:2089] - Trying to use Systemd to restart service
    14.03.2025-12:24 - DEBUG [system.inc:2436] - safe_exec cmd: systemctl is-enabled 'php8.1-fpm' 2>&1 - return code: 0
    14.03.2025-12:24 - DEBUG [web module.inc:316] - Restarting php-fpm: systemctl reload php8.1-fpm.service
    14.03.2025-12:24 - DEBUG [nginx plugin.inc:2027] - nginx status is: running
    14.03.2025-12:24 - DEBUG [services.inc:56] - Calling function 'restartHttpd' from module 'web_module'.
    I have enabled debug on the servers. Inside ISPConfig i do now see errors what i think are related:




    upload_2025-3-14_14-25-5.png
    upload_2025-3-14_14-26-13.png
    So its a spiderweb of links going to /mnt/cephfs/www to /var/www and /var/www goes to /mnt/cephfs/www. So i cannot find the website files (and thus the nginx error file for the specific sites)
    When i run cd /var/www/clients/client8/web16 (thats defined on the site page) it says no such file or directory.

    Command i ran on the nodes for CephFS:
    27 sudo mkdir -p /mnt/cephfs
    28 sudo ceph-fuse -m 10.0.0.2,10.0.0.3 /mnt/cephfs
    29 sudo rsync -avz /var/www/ /mnt/var/www/
    30 mkdir /var/www
    31 sudo rsync -avz /var/www/ /mnt/var/www/
    32 sudo mv /var/www /var/www_backup
    33 sudo ln -s /mnt/cephfs/www /var/www
     
    Last edited: Mar 14, 2025
  8. AeroBytes

    AeroBytes New Member

    upload_2025-3-14_14-46-16.png

    So i changed the default doc root to the mount and it works now! But idk if that's the correct way
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    This can not work, /var/www can not be a symlink. Ensure to mount your cephfs as /var/www instead of symlinking it. Also, do not alter permissions manually in /var/www as this might cause sites to fail.
     
  10. AeroBytes

    AeroBytes New Member

    Ah check!
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Really bad idea, you will have all kind of malfunctions by doing this. As you changed so many things manually already, incl. permissions of folders, it is better to reinstall the system from scratch to get back a clean system. And this time, do not symlink any folders, if you want to use a different filesystem for /var/www, then you must mount that filesystem as /var/www
     

Share This Page