avastvpsupdate.sh - Result ERROR-4:Cannot download 400vps.md5

:slight_smile: When I run avastupdate.sh the result is below:

Killed
ERROR-4:Cannot download 400vps.md5 from http://files.avast.com/files/latest/.

Unpackaged Wget. The only md5sum file I could find was a tar. Untared files and placed them in respective directories. md5sum appears to be working when I run md5sum -h or md5sum -V.

The thought was I needed md5sum and Wget.

Is there a permission my Network Admin might be blocking? When type the url in my website address I’m redirected twice and end up at http://download625.avast.com/. Any clues

is wget able to run from cmdline? cut/paste here what does it do when trying to run it from cmdline.

pc

Same problem here. Wget runs from comandline without problems.

look at the avastvpsupdate.sh, line 242 - this is the place where wget does its work.
you can insert ‘set -x’ above the wget-spawning line, to check how does the command look like, and also, remove that 2>/dev/null.
It’s probably some problem at the server, because this script is the same for some months - and wget’s presence/usability is checked at the start (otherwise you’ would get a warning directly).

error-4 usually means some problem in the network. try to wget that http://files.avast.com/files/latest/400vps.md5 manually to get a clue what’s wrong. probably missing proxy environment variables and blocked port 80?

regards,
pc

Ich changed the script as posted above. This is the result:

server / # avastvpsupdate.sh
++ eval echo -O ‘$vus_var_target’
+++ echo -O /var/tmp/avast4/Mai-05-08-15-40-40-594982.400vps.md5

  • wget -q -r http://files.avast.com/files/latest//400vps.md5 -O /var/tmp/avast4/Mai-05-08-15-40-40-594982.400vps.md5
    ++ eval echo /dev/null
    +++ echo /dev/null

  • ‘[’ 1 -eq 0 -o -f /var/tmp/avast4/Mai-05-08-15-40-40-594982.400vps.md5 ‘]’
    ++ wc -c /var/tmp/avast4/Mai-05-08-15-40-40-594982.400vps.md5

  • vus_var_target_len=‘7 /var/tmp/avast4/Mai-05-08-15-40-40-594982.400vps.md5’
    ++ echo 7 /var/tmp/avast4/Mai-05-08-15-40-40-594982.400vps.md5
    ++ cut '-d ’ -f1

  • vus_var_target_len=7

  • ‘[’ 7 -lt 32 ‘]’

  • vus_var_target_len=0

  • ‘[’ 0 -eq 0 ‘]’

  • vus_error_and_exit 4 ‘Cannot download 400vps.md5 from http://files.avast.com/files/latest/

  • ‘[’ /var/log/avast4 ‘!=’ 0 ‘]’
    ++ date

  • echo Mi 14. Mai 15:40:40 CEST 2008 ERROR-4: Cannot download 400vps.md5 from http://files.avast.com/files/latest/.

  • echo

  • echo ERROR-4: Cannot download 400vps.md5 from http://files.avast.com/files/latest/.
    ERROR-4: Cannot download 400vps.md5 from http://files.avast.com/files/latest/.

  • exit 4

If i try to download with

server bin # wget “http://files.avast.com/files/latest/400vps.md5

the file is there.

There are a lot of files in /var/tmp/avast4

-rw-r–r-- 1 root root 7 14. Mai 09:00 May-05-08-09-00-01-576767.400vps.md5
-rw-r–r-- 1 root root 7 14. Mai 10:00 May-05-08-10-00-01-579045.400vps.md5
-rw-r–r-- 1 root root 7 14. Mai 11:00 May-05-08-11-00-01-581356.400vps.md5
-rw-r–r-- 1 root root 7 14. Mai 12:00 May-05-08-12-00-01-583768.400vps.md5
-rw-r–r-- 1 root root 7 14. Mai 13:00 May-05-08-13-00-01-586093.400vps.md5

if I open them it shows:

server avast4 # cat Mai-05-08-14-38-51-590358.400vps.md5
AaZz09

Any more ideas?

Hmhmhm, Kroell - something is wrong. As it seems, that downloaded file has length 7 bytes, but … the 400vps.md5 should be longer - 43bytes.
Are you able to get it from our severs, using wget, in the full length? The contents of those files is the original contents that is placed to the target as md5-sanity check, then, it is replaced with the downloaded stuff.

Thus, we can conclude that
wget -q -r http://files.avast.com/files/latest//400vps.md5 -O /var/tmp/avast4/Mai-05-08-15-40-40-594982.400vps.md5

went wrong, and nothing was downloaded.

With my wget, it works OK:
sinclair:~# wget -q -r http://files.avast.com/files/latest//400vps.md5 -O ui
sinclair:~# ls -l ui
-rw-r–r-- 1 root root 43 May 14 03:57 ui

Does it (exactly the same command) work ok with yours too?
and if not, what’s the wget’s errorcode ($?), or error message? maybe there was some change in wget cmdline interface that the script isn’t aware of.

Thanks for reporting this, kroell.

regards,
PC

Hi,

I recompiled wget, nothing changed. My Version is: wget-1.11.1
The downloaded file has lenght of 7 this is correct.

wget -q -r http://files.avast.com/files/latest//400vps.md5 -O /var/tmp/avast4/Mai-05-08-15-40-40-594982.400vps.md5 is not working, error (in German): Wenn -O angegeben ist, dann darf -r, -p oder -N nicht verwendet werden.

without the “-r”-Switch the file gets downloaded correctly. I now changed this in line 237 of avastvpsupdate.sh and all seams working fine :wink:
server ~ # avastvpsupdate.sh

ERROR-0: New VPS: 080514-0 (date: 14.05.2008) succesfully installed.

Thanks for help!
Bye Kroell

Ah, that’s it - newser version of wget dislikes -r to one-file output. But, because we’re downloading single files only, the -r can be, indeed, omitted. Fixed, thanks for pointing to this change in wget cmdline switches.

regards,
pc

wget 1.10.x was still OK :). so it’s quite recent change :).

OS here is Gentoo-Linux. All admins who updated during the last few weeks (error was since 7th of may - I haven’t relized this) their system, should get the same error :wink:

hmmm, but where comes the -r from? in our avastvpsupdate.sh script there’s no such option… and in avast-update neither.
also, i don’t remeber adding the -r there (because it was always one-file wgetting) - is it with -r in installation package?

regards,
pc

Yes it is…
This ist the package: http://files.avast.com/files/linux/libavastengine-4.7.1-i586.tar.gz
Line 237

answer - yes, it was present in previous version of the download-script, and already removed - OK.
So here’s are the beta-packages which have this fixed:

http://public.avast.com/~cimbal/avast4server-3.1.0-i586.deb
http://public.avast.com/~cimbal/avast4server-3.1.0-i586.tar.gz
http://public.avast.com/~cimbal/libavastengine-4.7.4b-i586.deb
http://public.avast.com/~cimbal/libavastengine-4.7.4b-i586.tar.gz

Regards,
PC

Nice :wink:

Testing now. Does it work with AMD64 Kernel?

it should, but internally, there are pieces of IA32 code. Thus, such kernel must have been compiled with IA32 compatibility support:

CONFIG_IA32_EMULATION=yes

and also, IA32 libraries (libc, libm, libpthread) must be there. Many newer distributions have this as default, and thus, avast runs directly like a charm (but many older distros were source of problems - ubuntu hoary hedgehog, rhel4as etc.).

regards,
pc

IA32 is in. All is working fine. Old 64-bit-patch is not needed. Very nice!
Let’s prepare a Gentoo ebuild :wink: