TS3Tools / TS3UpdateScript

Automate all update processes for your TeamSpeak 3 server instances
GNU General Public License v3.0
189 stars 22 forks source link

Script just sits on collecting information #54

Closed Arcanum417 closed 8 years ago

Arcanum417 commented 8 years ago
RUNNING SCRIPT WITH DEBUG OPTION! PARAMETER LIST: --check --debug lolzlo.txt [v5.2.2]
++ date +%s
+ TIME_MEASUREMENT_SELFTESTS_START=1473625647
+ '[' 0 -eq 1 ']'
+ echo -en '\e[sPerforming self-tests as preventive measures against possible failures'
Performing self-tests as preventive measures against possible failures+ echo -e '\e[u\e[87C[ \e[0;37m.. \e[0m]\n'
[ .. ]

+ SELF_TEST_STATUS=0
+ isBashCompletionInstalled
+ '[' -f /etc/bash_completion.d/ts3updatescript ']'
++ stat --format=%U /etc/bash_completion.d/ts3updatescript
+ [[ root == \r\o\o\t ]]
++ stat --format=%G /etc/bash_completion.d/ts3updatescript
+ [[ root == \r\o\o\t ]]
+ return 0
+ [[ ! -f configs/config.all ]]
+ checkConsistency
++ grep -v ORIGIN= ./TS3UpdateScript
++ head -202
++ cut -d ' ' -f 1
++ sha256sum
+ CHKSUM=33c8feaff76d8bc2930ac1ded78901683feadd145aba5e8467f7209c0f457567
+ ORIGIN=33c8feaff76d8bc2930ac1ded78901683feadd145aba5e8467f7209c0f457567
+ [[ 33c8feaff76d8bc2930ac1ded78901683feadd145aba5e8467f7209c0f457567 == \3\3\c\8\f\e\a\f\f\7\6\d\8\b\c\2\9\3\0\a\c\1\d\e\d\7\8\9\0\1\6\8\3\f\e\a\d\d\1\4\5\a\b\a\5\e\8\4\6\7\f\7\2\0\9\c\0\f\4\5\7\5\6\7 ]]
+ return 0
+ [[ 0 -eq 0 ]]
+ testInternetConnectivity www.ts3-tools.info
++ ping -w 1 www.ts3-tools.info
+ [[ -n PING www.ts3-tools.info (84.200.62.14) 56(84) bytes of data.
64 bytes from ipdc-vs00017.4g-server.eu (84.200.62.14): icmp_seq=1 ttl=58 time=5.52 ms

--- www.ts3-tools.info ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 5.523/5.523/5.523/0.000 ms ]]
+ return 0
+ testInternetConnectivity dl.4players.de
++ ping -w 1 dl.4players.de
+ [[ -n PING dl.dl1.4players.de (85.25.26.25) 56(84) bytes of data.

--- dl.dl1.4players.de ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms ]]
+ return 0
+ testInternetConnectivity github.com
++ ping -w 1 github.com
+ [[ -n PING github.com (192.30.253.112) 56(84) bytes of data.
64 bytes from 192.30.253.112: icmp_seq=1 ttl=55 time=90.9 ms

--- github.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 90.964/90.964/90.964/0.000 ms ]]
+ return 0
+ testInternetConnectivity raw.githubusercontent.com
++ ping -w 1 raw.githubusercontent.com
+ [[ -n PING prod.github.map.fastlylb.net (151.101.12.133) 56(84) bytes of data.
64 bytes from 151.101.12.133: icmp_seq=1 ttl=59 time=5.08 ms

--- prod.github.map.fastlylb.net ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 5.082/5.082/5.082/0.000 ms ]]
+ return 0
++ getLatestScriptVersion
+++ wget https://raw.githubusercontent.com/TS3Tools/TS3UpdateScript/master/docs/CHANGELOG.md --no-check-certificate -q -O -
+++ grep Version
+++ head -1
+++ grep -Eo '[0-9\.?]+'
++ LATEST_SCRIPT_VERSION=5.2.2
++ [[ -n 5.2.2 ]]
++ echo -n 5.2.2
+ LATEST_SCRIPT_VERSION=5.2.2
+ [[ 5.2.2 != 1 ]]
+ [[ 0 -eq 0 ]]
+ [[ -n 5.2.2 ]]
+ [[ 5.2.2 != \5\.\2\.\2 ]]
+ checkdeps bash which rsync wget grep sed unzip bzip2 gdb
+ CHECKDEPS_FAILED=0
+ for cmd in '"$@"'
++ echo bash
++ cut -d : -f 1
+ package_cmd=bash
++ echo bash
++ cut -d : -f 2
+ package=bash
+ [[ -z bash ]]
+ command -v bash
+ for cmd in '"$@"'
++ echo which
++ cut -d : -f 1
+ package_cmd=which
++ echo which
++ cut -d : -f 2
+ package=which
+ [[ -z which ]]
+ command -v which
+ for cmd in '"$@"'
++ echo rsync
++ cut -d : -f 1
+ package_cmd=rsync
++ echo rsync
++ cut -d : -f 2
+ package=rsync
+ [[ -z rsync ]]
+ command -v rsync
+ for cmd in '"$@"'
++ echo wget
++ cut -d : -f 1
+ package_cmd=wget
++ echo wget
++ cut -d : -f 2
+ package=wget
+ [[ -z wget ]]
+ command -v wget
+ for cmd in '"$@"'
++ echo grep
++ cut -d : -f 1
+ package_cmd=grep
++ echo grep
++ cut -d : -f 2
+ package=grep
+ [[ -z grep ]]
+ command -v grep
+ for cmd in '"$@"'
++ echo sed
++ cut -d : -f 1
+ package_cmd=sed
++ echo sed
++ cut -d : -f 2
+ package=sed
+ [[ -z sed ]]
+ command -v sed
+ for cmd in '"$@"'
++ echo unzip
++ cut -d : -f 1
+ package_cmd=unzip
++ echo unzip
++ cut -d : -f 2
+ package=unzip
+ [[ -z unzip ]]
+ command -v unzip
+ for cmd in '"$@"'
++ echo bzip2
++ cut -d : -f 1
+ package_cmd=bzip2
++ echo bzip2
++ cut -d : -f 2
+ package=bzip2
+ [[ -z bzip2 ]]
+ command -v bzip2
+ for cmd in '"$@"'
++ echo gdb
++ cut -d : -f 1
+ package_cmd=gdb
++ echo gdb
++ cut -d : -f 2
+ package=gdb
+ [[ -z gdb ]]
+ command -v gdb
+ [[ 0 -eq 1 ]]
+ return 0
+ '[' -f /etc/debian_version ']'
+ checkdeps lsb_release
+ CHECKDEPS_FAILED=0
+ for cmd in '"$@"'
++ echo lsb_release
++ cut -d : -f 1
+ package_cmd=lsb_release
++ echo lsb_release
++ cut -d : -f 2
+ package=lsb_release
+ [[ -z lsb_release ]]
+ command -v lsb_release
+ [[ 0 -eq 1 ]]
+ return 0
+ '[' 0 -eq 1 ']'
+ '[' 0 -eq 1 ']'
+ [[ 0 -eq 1 ]]
+ [[ 0 -eq 1 ]]
+ scriptSettingsChanged
++ grep ADMINISTRATOR_EMAILS /root/TS3UpdateScript-master/configs/config.all
++ cut -d = -f 2
++ cut -d ' ' -f 1
++ md5sum
+ ADMIN_EMAIL_MD5SUM=8246f9d5dadbd6e513f460005f9460bf
+ [[ 8246f9d5dadbd6e513f460005f9460bf != \1\6\0\d\f\a\4\2\c\0\c\b\8\e\2\5\3\1\1\b\6\a\f\f\3\a\4\d\5\3\6\1 ]]
+ return 0
++ date +%s
+ TIME_MEASUREMENT_SELFTESTS_END=1473625651
+ [[ 0 -eq 1 ]]
+ '[' 0 -eq 1 ']'
+ echo -e '\e[u\e[87C[ \e[0;32mOK \e[0m]\n'
[ OK ]

+ [[ -f SELF_TEST_STATUS.txt ]]
+ [[ 0 -eq 0 ]]
+ [[ 0 -eq 0 ]]
++ date +%s
+ TIME_MEASUREMENT_COLLECTING_INFORMATION_START=1473625651
+ COLLECTING_INFORMATION_STATUS=0
+ '[' 0 -eq 1 ']'
+ echo -en '\e[sCollecting necessary information for further tasks'
Collecting necessary information for further tasks+ echo -e '\e[u\e[87C[ \e[0;37m.. \e[0m]\n'
[ .. ]

+ findTS3ServerInstances
+ [[ 0 == \2 ]]
+ find / -name ts3server_startscript.sh
+ grep -Eiv '/tmp/TS3Tools/TS3UpdateScript|/var/backups/TS3Tools/TS3UpdateScript'
+ sort
+ head -1
+ [[ -s TS3InstancePaths.txt ]]
+ return 0
++ getLatestTSServerVersion
++ TS3_SERVER_VERSION=0
++ [[ 0 -eq 1 ]]
++ [[ 0 -eq 1 ]]
+++ getLatestStableTS3ServerVersion
+++ wget -t 3 -T 10 'http://dl.4players.de/ts/releases/?C=M;O=D' -q -O -
+++ sort -V -r
+++ grep -Eo '<a href=\".*\/\">.*\/<\/a>'
+++ grep -i dir
+++ uniq
+++ grep -Eo '[0-9\.?]+'
+++ [[ 0 -ne 0 ]]
+++ read release
+++ [[ 3.0.19.4 =~ ^[3-9]+\.[0-9]+\.1[2-9]+\.?[0-9]*$ ]]
+++ wget --spider -q http://dl.4players.de/ts/releases/3.0.19.4/teamspeak3-server_linux_amd64-3.0.19.4.tar.bz2
+++ [[ 8 == 0 ]]
+++ read release
+++ [[ 3.0.19.3 =~ ^[3-9]+\.[0-9]+\.1[2-9]+\.?[0-9]*$ ]]
+++ wget --spider -q http://dl.4players.de/ts/releases/3.0.19.3/teamspeak3-server_linux_amd64-3.0.19.3.tar.bz2
+++ [[ 8 == 0 ]]
+++ read release
+++ [[ 3.0.19.2 =~ ^[3-9]+\.[0-9]+\.1[2-9]+\.?[0-9]*$ ]]
+++ wget --spider -q http://dl.4players.de/ts/releases/3.0.19.2/teamspeak3-server_linux_amd64-3.0.19.2.tar.bz2
+++ [[ 8 == 0 ]]
+++ read release
+++ [[ 3.0.19.1 =~ ^[3-9]+\.[0-9]+\.1[2-9]+\.?[0-9]*$ ]]
+++ wget --spider -q http://dl.4players.de/ts/releases/3.0.19.1/teamspeak3-server_linux_amd64-3.0.19.1.tar.bz2
+++ [[ 8 == 0 ]]
+++ read release
+++ [[ 3.0.19 =~ ^[3-9]+\.[0-9]+\.1[2-9]+\.?[0-9]*$ ]]
+++ wget --spider -q http://dl.4players.de/ts/releases/3.0.19/teamspeak3-server_linux_amd64-3.0.19.tar.bz2
Sebbo94BY commented 8 years ago

Thanks for reporting this. Sometimes, wget retries a download command multiple times (by default 20 times) and this is the reason, why it hangs. If you wait a bit, you'll see, that it's working fine and will finish:

Script Version: 5.2.2 (2016-09-08)
Script License: Free (limited)

Donate and support this script: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ZRXLSC2UBVWE

------------------------------------------------------------------

Please wait... Script is working...

Performing self-tests as preventive measures against possible failures [ OK ]

Collecting necessary information for further tasks [ OK ]

All collected information were validated successfully as preventive measures against possible failures [ INFO ]

1 TeamSpeak 3 server instance found...

Collecting as much as possible information for following TeamSpeak 3 server instance: /home/teamspeak
1 instance for update process...
/home/teamspeak: This instance is already up2date. Nothing to do.

Cleaning up...

Summary of measured execution time for each step
Total script: 556s
Self-Test: 4s
Collecting Information: 549s
Validation: 2s
Execution Mechanism: 0s
Cleanup: 0s

I've improved the TS3UpdateScript, that wget does only 1 or 3 retries with a timeout of 1 second depending on which task is running.

Script Version: 5.3.0 (2016-09-11)
Script License: Professional

Donate and support this script: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ZRXLSC2UBVWE

------------------------------------------------------------------

Please wait... Script is working...

Performing self-tests as preventive measures against possible failures [ OK ]

Collecting necessary information for further tasks [ OK ]

All collected information were validated successfully as preventive measures against possible failures [ INFO ]

1 TeamSpeak 3 server instance found...

Collecting as much as possible information for following TeamSpeak 3 server instance: /home/teamspeak
1 instance for update process...
/home/teamspeak: This instance is already up2date. Nothing to do.

Cleaning up...

Summary of measured execution time for each step
Total script: 7s
Self-Test: 4s
Collecting Information: 3s
Validation: 0s
Execution Mechanism: 0s
Cleanup: 0s

Please update your TS3UpdateScript to v5.3.0: ./TS3UpdateScript --update-script