Edit: /var/log/switch_apache_and_haproxy_ports.log (9579B)
++ hostname
+ hostname=md-in-64.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":"yellow","message":"@Rigved Switching Apache and HAProxy ports on md-in-64.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 158 --:--:-- --:--:-- --:--:-- 158
0 0 0 0 0 139 0 114 --:--:-- 0:00:01 --:--:-- 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
+ /usr/bin/pkill puppetd
+ /bin/sleep 5
+ /usr/bin/pkill puppetd
+ 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
[Fri Sep 22 05:32:11 2017] [warn] module h264_streaming_module is already loaded, skipping
[Fri Sep 22 05:32:11 2017] [warn] module flvx_module is already loaded, skipping
Warning: DocumentRoot [/home/sense1cf/public_html/twosomelife.com/videos/wp/wp] does not exist
Syntax OK
+ [[ 0 -eq 0 ]]
+ /sbin/service httpd stop
[Fri Sep 22 05:32:12 2017] [warn] module h264_streaming_module is already loaded, skipping
[Fri Sep 22 05:32:12 2017] [warn] module flvx_module is already loaded, skipping
Warning: DocumentRoot [/home/sense1cf/public_html/twosomelife.com/videos/wp/wp] 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 164 0 198 --:--:-- --:--:-- --:--:-- 198
0 80 0 80 0 164 74 152 --:--:-- 0:00:01 --:--:-- 0
0 80 0 80 0 164 74 152 --:--:-- 0:00:01 --:--:-- 0
{"event":"success","description":"event successfully queued to the event queue"}+ /usr/bin/pkill lsphp
+ /bin/sleep 5
+ /sbin/service httpd stop
[Fri Sep 22 05:32:23 2017] [warn] module h264_streaming_module is already loaded, skipping
[Fri Sep 22 05:32:23 2017] [warn] module flvx_module is already loaded, skipping
Warning: DocumentRoot [/home/sense1cf/public_html/twosomelife.com/videos/wp/wp] does not exist
httpd (no pid file) not running
+ /bin/sleep 5
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 164 0 198 --:--:-- --:--:-- --:--:-- 198
0 80 0 80 0 164 74 151 --:--:-- 0:00:01 --:--:-- 0
0 80 0 80 0 164 74 151 --:--:-- 0:00:01 --:--:-- 0
{"event":"success","description":"event successfully queued to the event queue"}+ /sbin/service httpd start
[Fri Sep 22 05:32:29 2017] [warn] module h264_streaming_module is already loaded, skipping
[Fri Sep 22 05:32:29 2017] [warn] module flvx_module is already loaded, skipping
Warning: DocumentRoot [/home/sense1cf/public_html/twosomelife.com/videos/wp/wp] 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
+ [[ 0 -eq 0 ]]
+ /sbin/service haproxy check
Configuration file is valid
+ [[ 0 -eq 0 ]]
+ /sbin/service haproxy restart
Shutting down haproxy: [ OK ]
Starting haproxy: [ OK ]
+ [[ 0 -ne 0 ]]
+ /bin/netstat -pantu
+ /bin/grep ':8083 '
+ /bin/grep -q haproxy
+ [[ 1 -eq 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
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 166 0 196 --:--:-- --:--:-- --:--:-- 196
0 80 0 80 0 166 72 150 --:--:-- 0:00:01 --:--:-- 0
0 80 0 80 0 166 72 150 --:--:-- 0:00:01 --:--:-- 0
{"event":"success","description":"event successfully queued to the event queue"}+ colo=gpx-mum
+ /usr/bin/chattr -i /etc/fw/fw
+ [[ 0 -eq 0 ]]
+ /bin/cp /usr/local/scripts/apache_haproxy_port_switch_data/fw.gpx-mum /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 [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[ OK ]
+ [[ 0 -eq 0 ]]
+ /sbin/service phreld restart
Stopping phreld:[ OK ]
Starting phreld:[ OK ]
+ /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-22 05:32:59,172 fail2ban.server [3179]: INFO Starting Fail2ban v0.9.6
2017-09-22 05:32:59,172 fail2ban.server [3179]: INFO Starting in daemon mode
ERROR NOK: ('Invalid log level',)
+ [[ ! -f /etc/slowroll/flags/switch_firewall ]]
+ double_check_services
+ /bin/sleep 5
+ /usr/bin/curl -I http://directi.con.md-in-64.webhostbox.net/uptimechecker.php
+ grep -q 'HTTP/1.1 200 OK'
+ [[ 0 -ne 0 ]]
+ inform_hipchat_end
+ /usr/bin/curl -d '{"color":"green","message":"@Rigved Successfully switched Apache and HAProxy ports on md-in-64.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 150 0 174 --:--:-- --:--:-- --:--:-- 174
0 0 0 0 0 150 0 126 --:--:-- 0:00:01 --:--:-- 0
0 0 0 0 0 150 0 126 --:--:-- 0:00:01 --:--:-- 0