JezK
Edit File: switch_apache_and_haproxy_ports.log
++ hostname + hostname=md-97.webhostbox.net + slowroll_folder=/etc/slowroll + flag_folder=/etc/slowroll/flags + main_backup_folder=/etc/slowroll/apache_haproxy_port_switch_backups + apache_backup_folder=/etc/slowroll/apache_haproxy_port_switch_backups/apache_backups + haproxy_backup_folder=/etc/slowroll/apache_haproxy_port_switch_backups/haproxy_backups + firewall_backup_folder=/etc/slowroll/apache_haproxy_port_switch_backups/firewall_backups + flag_switch_apache=/etc/slowroll/flags/switch_apache + flag_switch_haproxy=/etc/slowroll/flags/switch_haproxy + flag_switch_firewall=/etc/slowroll/flags/switch_firewall + inform_hipchat_start + /usr/bin/curl -d '{"color":"green","message":"Switching Apache and HAProxy ports on md-97.webhostbox.net","notify":false,"message_format":"text"}' -H 'Content-Type: application/json' 'https://eigi.hipchat.com/v2/room/3653520/notification?auth_token=oVHkuZMtJCn5XbE0ejiFyXpPOtguv4XmbdoqMKv3' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 127 0 298 --:--:-- --:--:-- --:--:-- 298 0 0 0 0 0 127 0 234 --:--:-- --:--:-- --:--:-- 0 + initialise + /bin/mkdir -p /etc/slowroll/flags + /bin/mkdir -p /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups + /bin/mkdir -p /etc/slowroll/apache_haproxy_port_switch_backups/haproxy_backups + /bin/mkdir -p /etc/slowroll/apache_haproxy_port_switch_backups/firewall_backups + echo bypass_varnish + switch_apache_ports + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/cpanel.config.template ]] + /bin/cp /var/cpanel/cpanel.config.template /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/ + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/cpanel.config ]] + /bin/cp /var/cpanel/cpanel.config /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/ + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/main.local ]] + /bin/cp /var/cpanel/templates/apache2/main.local /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/ + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/vhost.local ]] + /bin/cp /var/cpanel/templates/apache2/vhost.local /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/ + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/httpd.conf ]] + /bin/cp /usr/local/apache/conf/httpd.conf /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/ + [[ ! -f /etc/slowroll/flags/switch_apache ]] ++ /usr/local/cpanel/cpanel -V ++ cut -d. -f1 + cpanel_version=62 ++ /bin/hostname ++ cut -d- -f1 + product=md + /usr/bin/chattr -i /var/cpanel/cpanel.config.template /var/cpanel/cpanel.config /var/cpanel/templates/apache2/main.local /var/cpanel/templates/apache2/vhost.local /usr/local/apache/conf/httpd.conf + [[ 0 -eq 0 ]] + /bin/cp /usr/local/scripts/apache_haproxy_port_switch_data/cpanel.config.11.62.md /var/cpanel/cpanel.config.template + [[ 0 -eq 0 ]] + /bin/sed -i s/:80/:8080/g /var/cpanel/templates/apache2/main.local /var/cpanel/templates/apache2/vhost.local + [[ 0 -eq 0 ]] + touch /etc/slowroll/flags/switch_apache + [[ 0 -eq 0 ]] + /usr/local/scripts/cron/check_n_fix_crons/whostmgr_updatetweaksettings.sh + [[ 0 -eq 0 ]] + /scripts/rebuildhttpdconf Built /usr/local/apache/conf/httpd.conf OK + [[ 0 -eq 0 ]] + /usr/sbin/httpd -t [Tue Sep 19 14:12:48 2017] [warn] module h264_streaming_module is already loaded, skipping [Tue Sep 19 14:12:48 2017] [warn] module flvx_module is already loaded, skipping Warning: DocumentRoot [/home/activfkv/public_html/anavsari/clients/meet-shah-photography] does not exist Warning: DocumentRoot [/home/activfkv/public_html/anavsari/clients/ashapurasharee] does not exist Warning: DocumentRoot [/home/clienvae/public_html/snvp/school/backend/web] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/ixpertize-store.com/main] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/www.snehwebtech.com/main] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/snehwebtech.biz/main] does not exist Warning: DocumentRoot [/home/tanvegfi/public_html/musicallyyours.co.in/public] does not exist Warning: DocumentRoot [/home/tanvegfi/public_html/admin.musicallyyours.co.in/public] does not exist Warning: DocumentRoot [/home/technvtf/public_html/qwid/public_html] does not exist Syntax OK + [[ 0 -ne 0 ]] + /bin/cp /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/httpd.conf /usr/local/apache/conf/httpd.conf + /bin/cp /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/cpanel.config /var/cpanel/cpanel.config + /bin/cp /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/main.local /var/cpanel/templates/apache2/main.local + /bin/cp /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/vhost.local /var/cpanel/templates/apache2/vhost.local + /bin/rm /etc/slowroll/flags/switch_apache + [[ ! -f /etc/slowroll/flags/switch_apache ]] + /usr/bin/curl -d '{"color":"green","message":"Apache update step failed while switching Apache and HAProxy ports on md-97.webhostbox.net","notify":false,"message_format":"text"}' -H 'Content-Type: application/json' 'https://eigi.hipchat.com/v2/room/3653520/notification?auth_token=oVHkuZMtJCn5XbE0ejiFyXpPOtguv4XmbdoqMKv3' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 159 0 848 --:--:-- --:--:-- --:--:-- 848 0 0 0 0 0 159 0 531 --:--:-- --:--:-- --:--:-- 0 + echo '' + exit 1 ++ hostname + hostname=md-97.webhostbox.net + slowroll_folder=/etc/slowroll + flag_folder=/etc/slowroll/flags + main_backup_folder=/etc/slowroll/apache_haproxy_port_switch_backups + apache_backup_folder=/etc/slowroll/apache_haproxy_port_switch_backups/apache_backups + haproxy_backup_folder=/etc/slowroll/apache_haproxy_port_switch_backups/haproxy_backups + firewall_backup_folder=/etc/slowroll/apache_haproxy_port_switch_backups/firewall_backups + flag_switch_apache=/etc/slowroll/flags/switch_apache + flag_switch_haproxy=/etc/slowroll/flags/switch_haproxy + flag_switch_firewall=/etc/slowroll/flags/switch_firewall + inform_hipchat_start + /usr/bin/curl -d '{"color":"green","message":"Switching Apache and HAProxy ports on md-97.webhostbox.net","notify":false,"message_format":"text"}' -H 'Content-Type: application/json' 'https://eigi.hipchat.com/v2/room/3653520/notification?auth_token=oVHkuZMtJCn5XbE0ejiFyXpPOtguv4XmbdoqMKv3' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 127 0 605 --:--:-- --:--:-- --:--:-- 605 0 0 0 0 0 127 0 302 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 127 0 302 --:--:-- --:--:-- --:--:-- 0 + initialise + /bin/mkdir -p /etc/slowroll/flags + /bin/mkdir -p /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups + /bin/mkdir -p /etc/slowroll/apache_haproxy_port_switch_backups/haproxy_backups + /bin/mkdir -p /etc/slowroll/apache_haproxy_port_switch_backups/firewall_backups + echo bypass_varnish + switch_apache_ports + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/cpanel.config.template ]] + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/cpanel.config ]] + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/main.local ]] + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/vhost.local ]] + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/apache_backups/httpd.conf ]] + [[ ! -f /etc/slowroll/flags/switch_apache ]] ++ /usr/local/cpanel/cpanel -V ++ cut -d. -f1 + cpanel_version=62 ++ /bin/hostname ++ cut -d- -f1 + product=md + /usr/bin/chattr -i /var/cpanel/cpanel.config.template /var/cpanel/cpanel.config /var/cpanel/templates/apache2/main.local /var/cpanel/templates/apache2/vhost.local /usr/local/apache/conf/httpd.conf + [[ 0 -eq 0 ]] + /bin/cp /usr/local/scripts/apache_haproxy_port_switch_data/cpanel.config.11.62.md /var/cpanel/cpanel.config.template + [[ 0 -eq 0 ]] + /bin/sed -i s/:80/:8080/g /var/cpanel/templates/apache2/main.local /var/cpanel/templates/apache2/vhost.local + [[ 0 -eq 0 ]] + touch /etc/slowroll/flags/switch_apache + [[ 0 -eq 0 ]] + /usr/local/scripts/cron/check_n_fix_crons/whostmgr_updatetweaksettings.sh + [[ 0 -eq 0 ]] + /scripts/rebuildhttpdconf Built /usr/local/apache/conf/httpd.conf OK + [[ 0 -eq 0 ]] + /usr/sbin/httpd -t [Tue Sep 19 14:23:15 2017] [warn] module h264_streaming_module is already loaded, skipping [Tue Sep 19 14:23:15 2017] [warn] module flvx_module is already loaded, skipping Warning: DocumentRoot [/home/activfkv/public_html/anavsari/clients/meet-shah-photography] does not exist Warning: DocumentRoot [/home/activfkv/public_html/anavsari/clients/ashapurasharee] does not exist Warning: DocumentRoot [/home/clienvae/public_html/snvp/school/backend/web] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/ixpertize-store.com/main] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/www.snehwebtech.com/main] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/snehwebtech.biz/main] does not exist Warning: DocumentRoot [/home/tanvegfi/public_html/musicallyyours.co.in/public] does not exist Warning: DocumentRoot [/home/tanvegfi/public_html/admin.musicallyyours.co.in/public] does not exist Warning: DocumentRoot [/home/technvtf/public_html/qwid/public_html] does not exist Syntax OK + [[ 0 -eq 0 ]] + /sbin/service httpd stop [Tue Sep 19 14:23:16 2017] [warn] module h264_streaming_module is already loaded, skipping [Tue Sep 19 14:23:16 2017] [warn] module flvx_module is already loaded, skipping Warning: DocumentRoot [/home/activfkv/public_html/anavsari/clients/meet-shah-photography] does not exist Warning: DocumentRoot [/home/activfkv/public_html/anavsari/clients/ashapurasharee] does not exist Warning: DocumentRoot [/home/clienvae/public_html/snvp/school/backend/web] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/ixpertize-store.com/main] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/www.snehwebtech.com/main] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/snehwebtech.biz/main] does not exist Warning: DocumentRoot [/home/tanvegfi/public_html/musicallyyours.co.in/public] does not exist Warning: DocumentRoot [/home/tanvegfi/public_html/admin.musicallyyours.co.in/public] does not exist Warning: DocumentRoot [/home/technvtf/public_html/qwid/public_html] does not exist Warning: DocumentRoot [/home/clienvae/public_html/snvp/school/backend/web] does not exist + /bin/sleep 5 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 161 0 2076 --:--:-- --:--:-- --:--:-- 2076 0 80 0 80 0 161 966 1944 --:--:-- --:--:-- --:--:-- 0 {"event":"success","description":"event successfully queued to the event queue"}+ /sbin/service httpd stop [Tue Sep 19 14:23:22 2017] [warn] module h264_streaming_module is already loaded, skipping [Tue Sep 19 14:23:22 2017] [warn] module flvx_module is already loaded, skipping Warning: DocumentRoot [/home/activfkv/public_html/anavsari/clients/meet-shah-photography] does not exist Warning: DocumentRoot [/home/activfkv/public_html/anavsari/clients/ashapurasharee] does not exist Warning: DocumentRoot [/home/clienvae/public_html/snvp/school/backend/web] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/ixpertize-store.com/main] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/www.snehwebtech.com/main] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/snehwebtech.biz/main] does not exist Warning: DocumentRoot [/home/tanvegfi/public_html/musicallyyours.co.in/public] does not exist Warning: DocumentRoot [/home/tanvegfi/public_html/admin.musicallyyours.co.in/public] does not exist Warning: DocumentRoot [/home/technvtf/public_html/qwid/public_html] does not exist Warning: DocumentRoot [/home/clienvae/public_html/snvp/school/backend/web] does not exist + /usr/bin/pkill lsphp + /bin/sleep 5 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 161 0 1747 --:--:-- --:--:-- --:--:-- 1747 0 80 0 80 0 161 818 1647 --:--:-- --:--:-- --:--:-- 0 {"event":"success","description":"event successfully queued to the event queue"}+ /sbin/service httpd start [Tue Sep 19 14:23:28 2017] [warn] module h264_streaming_module is already loaded, skipping [Tue Sep 19 14:23:28 2017] [warn] module flvx_module is already loaded, skipping Warning: DocumentRoot [/home/activfkv/public_html/anavsari/clients/meet-shah-photography] does not exist Warning: DocumentRoot [/home/activfkv/public_html/anavsari/clients/ashapurasharee] does not exist Warning: DocumentRoot [/home/clienvae/public_html/snvp/school/backend/web] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/ixpertize-store.com/main] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/www.snehwebtech.com/main] does not exist Warning: DocumentRoot [/home/snehwbn4/public_html/snehwebtech.biz/main] does not exist Warning: DocumentRoot [/home/tanvegfi/public_html/musicallyyours.co.in/public] does not exist Warning: DocumentRoot [/home/tanvegfi/public_html/admin.musicallyyours.co.in/public] does not exist Warning: DocumentRoot [/home/technvtf/public_html/qwid/public_html] does not exist Warning: DocumentRoot [/home/clienvae/public_html/snvp/school/backend/web] does not exist + [[ 0 -ne 0 ]] + [[ ! -f /etc/slowroll/flags/switch_apache ]] + switch_haproxy_ports + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/haproxy_backups/haproxy.cfg ]] + /bin/cp /etc/haproxy/haproxy.cfg /etc/slowroll/apache_haproxy_port_switch_backups/haproxy_backups/ + [[ ! -f /etc/slowroll/flags/switch_haproxy ]] + /usr/bin/chattr -i /etc/haproxy/haproxy.cfg + [[ 0 -eq 0 ]] + /bin/sed -i s/:80/:8080/ /etc/haproxy/haproxy.cfg + [[ 0 -eq 0 ]] + /bin/sed -i 's/bind :808083/bind :80/' /etc/haproxy/haproxy.cfg + [[ 0 -eq 0 ]] + /bin/sed -i '/server varnish/ s/:8080/:80/' /etc/haproxy/haproxy.cfg %+ [[ 0 -eq 0 ]] + touch /etc/slowroll/flags/switch_haproxy Total % Received % Xferd Average Speed Time Time Time Current Dloa+ [[ 0 -eq 0 ]] d + /sbin/service haproxy check Upload Total Spent Left Speed 0 0 0 0 0 163 0 2175 --:--:-- --:--:-- --:--:-- 2175 0 80 0 80 0 163 1000 2037 --:--:-- --:--:-- --:--:-- 0 {"event":"success","description":"event successfully queued to the event queue"}Configuration file is valid + [[ 0 -eq 0 ]] + /sbin/service haproxy restart Shutting down haproxy: [60G[[0;32m OK [0;39m] Starting haproxy: [60G[[0;32m OK [0;39m] + [[ 0 -ne 0 ]] + [[ ! -f /etc/slowroll/flags/switch_haproxy ]] + update_firewall + [[ ! -f /etc/slowroll/apache_haproxy_port_switch_backups/firewall_backups/fw ]] + /bin/cp /etc/fw/fw /etc/slowroll/apache_haproxy_port_switch_backups/firewall_backups/ + [[ ! -f /etc/slowroll/flags/switch_firewall ]] ++ /usr/bin/facter -p colo + colo=aus-tx + /usr/bin/chattr -i /etc/fw/fw + [[ 0 -eq 0 ]] + /bin/cp /usr/local/scripts/apache_haproxy_port_switch_data/fw.aus-tx /etc/fw/fw + [[ 0 -eq 0 ]] + touch /etc/slowroll/flags/switch_firewall + [[ 0 -eq 0 ]] + /etc/fw/fw restart Starting/Restarting custom firewall...iptables: Setting chains to policy ACCEPT: mangle nat raw filter [60G[[0;32m OK [0;39m] iptables: Flushing firewall rules: [60G[[0;32m OK [0;39m] iptables: Unloading modules: [60G[[0;32m OK [0;39m] [60G[[0;32m OK [0;39m] + [[ 0 -eq 0 ]] + /sbin/service phreld restart Stopping phreld:[60G[[0;32m OK [0;39m] Starting phreld:[60G[[0;32m OK [0;39m] + /usr/bin/fail2ban-client stop Shutdown successful + /usr/bin/fail2ban-client start WARNING 'syslogsocket' not defined in 'Definition'. Using default one: 'auto' WARNING 'dbfile' not defined in 'Definition'. Using default one: '/var/lib/fail2ban/fail2ban.sqlite3' WARNING 'dbpurgeage' not defined in 'Definition'. Using default one: 86400 2017-09-19 14:23:58,733 fail2ban.server [962433]: INFO Starting Fail2ban v0.9.6 2017-09-19 14:23:58,733 fail2ban.server [962433]: INFO Starting in daemon mode ERROR NOK: ('Invalid log level',) + [[ ! -f /etc/slowroll/flags/switch_firewall ]] + inform_hipchat_end + /usr/bin/curl -d '{"color":"green","message":"Successfully switched Apache and HAProxy ports on md-97.webhostbox.net","notify":false,"message_format":"text"}' -H 'Content-Type: application/json' 'https://eigi.hipchat.com/v2/room/3653520/notification?auth_token=oVHkuZMtJCn5XbE0ejiFyXpPOtguv4XmbdoqMKv3' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 139 0 749 --:--:-- --:--:-- --:--:-- 749 0 0 0 0 0 139 0 406 --:--:-- --:--:-- --:--:-- 0