Currently running under Centos7.5.1804 with a master->master server setup. The vhost for a certain domain is generated correctly on the primary ns1 server with the selected directive snippet. However when the vhost gets updated on the secondary server ns3 the vhost does NOT contain the directive snippet. The file is updated but the content is not correct. Both servers are running ISPConfig 3.1.12. This has all worked correctly in the past so not sure what is happening now
vhost is not created on name servers. Do you mean the zone for the domain name? I am confused about what exactly is not working.
You can use the debug mode to find out why the second server is not able to pick up the changes from master: https://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/ Enable debug log level for ns3, comment out server.sh cronjob on ns3, do a change in that website settings and run server.sh on ns3. With
I'm referring to the nginx domain vhost file that is updated / generated when changes are made to the domains ISPConfig, in this example its the web domains "Web Server Config" value which is a defined nginx Directive Snippet. So the file matches between servers up until the directive snippet which is correct on the primary ns1 but not the secondary ns3 server.
Yes should have done that already but was too pushed for time with other support issues to resolve. I just set the debug on both and ran the server.sh which did not show any errors that I can see.... on ns1 ``` 27.11.2018-11:44 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'. 27.11.2018-11:44 - DEBUG - Found 1 changes, starting update process. 27.11.2018-11:44 - DEBUG - Calling function 'ssl' from plugin 'nginx_plugin' raised by event 'web_domain_update'. 27.11.2018-11:44 - DEBUG - Calling function 'update' from plugin 'nginx_plugin' raised by event 'web_domain_update'. 27.11.2018-11:44 - DEBUG - Enable SSL for: <example.domain> 27.11.2018-11:44 - DEBUG - Writing the vhost file: /etc/nginx/sites-available/<example.domain>.vhost 27.11.2018-11:44 - DEBUG - Writing the PHP-FPM config file: /opt/php-7.1.8/etc/pool.d/web2.conf 27.11.2018-11:44 - DEBUG - Calling function 'restartPHP_FPM' from module 'web_module'. 27.11.2018-11:44 - DEBUG - Restarting php-fpm: systemctl reload php-7.1.8-fpm.service 27.11.2018-11:44 - DEBUG - nginx status is: running 27.11.2018-11:44 - DEBUG - Calling function 'restartHttpd' from module 'web_module'. 27.11.2018-11:44 - DEBUG - Checking nginx configuration... 27.11.2018-11:44 - DEBUG - nginx configuration ok! 27.11.2018-11:44 - DEBUG - Restarting httpd: systemctl restart nginx.service 27.11.2018-11:44 - DEBUG - nginx restart return value is: 0 27.11.2018-11:44 - DEBUG - nginx online status after restart is: running 27.11.2018-11:44 - DEBUG - Processed datalog_id 8839 27.11.2018-11:44 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock finished. ``` on ns3 ``` 26.11.2018-22:44 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'. 26.11.2018-22:44 - DEBUG - Found 1 changes, starting update process. 26.11.2018-22:44 - DEBUG - Replicated from master: REPLACE INTO.....etc 26.11.2018-22:44 - DEBUG - Calling function 'ssl' from plugin 'nginx_plugin' raised by event 'web_domain_update'. 26.11.2018-22:44 - DEBUG - Calling function 'update' from plugin 'nginx_plugin' raised by event 'web_domain_update'. 26.11.2018-22:44 - DEBUG - Enable SSL for: <example.domain> 26.11.2018-22:44 - DEBUG - Writing the vhost file: /etc/nginx/sites-available/<example.domain>.vhost 26.11.2018-22:44 - DEBUG - Writing the PHP-FPM config file: /opt/php-7.1.8/etc/pool.d/web2.conf 26.11.2018-22:44 - DEBUG - Calling function 'restartPHP_FPM' from module 'web_module'. 26.11.2018-22:44 - DEBUG - Restarting php-fpm: systemctl reload php-7.1.8-fpm.service 26.11.2018-22:44 - DEBUG - nginx status is: running 26.11.2018-22:44 - DEBUG - Calling function 'restartHttpd' from module 'web_module'. 26.11.2018-22:44 - DEBUG - Checking nginx configuration... 26.11.2018-22:44 - DEBUG - nginx configuration ok! 26.11.2018-22:45 - DEBUG - Restarting httpd: systemctl restart nginx.service 26.11.2018-22:45 - DEBUG - nginx restart return value is: 0 26.11.2018-22:45 - DEBUG - nginx online status after restart is: running 26.11.2018-22:45 - DEBUG - Processed datalog_id 8839 26.11.2018-22:45 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock finished. ``` I then check both vhost files have updated timestamp but file on the second server is missing the directive snippet.
I just tested now using the Options and nginx Directives: by selecting the Available nginx Directive Snippets: which fills that directive into the edit field. I then saved and it is now output to the vhost on the secondary ns3 server. Maybe setting the Web Server Config: and nginx directive snippet from the drop down is the wrong way of doing it ?
Do not do both things at the same time as both things do actually the same. Either use web config or use the nginx directives field.
Hi Till, yes I did realize that and cleared the Web Server Config first before setting the directive part. I should have mentioned that as well. The strange part is setting it in the directive works but not the other way on second server, I'm pretty sure it used to work. I have done a full re-synch of the database from ns1 to ns3 so that aspect should be the same.
Maybe the snippet is missing in the database of that node, the resync is not syncing snippets as far as I know.
ok so your saying the only reliable way is to use the Options->Ngix Directive location which does get pushed to secondary server and not use the Web Server Config menu.
The web server config menu works reliably as well, it#s just that you added the new server after you added or updated that snippet which means that it can not exist on that specific slave.yet and therefore it can not be used on that server.
ok so I think you mentioned rsync doesn't push the snippets across I take it to the ispconfi2 tables. I'm not sure when the snippet got created to be honest but I would have thought it was done moving the secondary master to ns3. However I can't say that for sure. I have manually synched both databases the other day but assume that entry may still be missing from the ispconfig2. I guess one way to verify would be to delete that snippet then add it and select it from the menu.
rsync is not used here. the snippets are in the ispconfig database and ispconfig syncs records in its database to other servers when the record is inserted or updated.
ah ok so I should be update to update the snippet and it will get updated to the second server. And then try again. As mentioned I had exported all of ns1 and updated ns3 with an exact copy of ns1 due to server outages. Which is why I was referring to the ispconfig2, as I assume the snippet needs to exist in both ispconfig and ispconfi2.
Yes, the snippet is loaded by the server process, so it must exist in the local database of the server.