Exiting with errror code 2

Exiting with errror code 2

Postby fedcba » 11.01.2018, 08:53

Hello
I am a WSUS-Offline neophyte.
I have installed wsus offline 111 on an Ubuntu 16.04.3 Server.
I have configured a samba Server to allow guest read/write access from guest accounts, to allow Windows clients to install the updates

When I try to run
Code: Select all
sudo bash /wsus/sh/download-updates.bash w100-x64 deu


I just do get the following error:
Code: Select all
Info: Starting download-updates.bash 1.0-beta-5 (2017-08-25)
Info: Command line: /wsus/sh/download-updates.bash w100-x64 deu
Info: Running on WSUS Offline Update version 11.1

Info: Checking needed applications...
Info: Checking recommended applications...
Info: Found Linux trash handler: gvfs-trash

Info: Setting download options for GNU Wget...
Info: Wake up sleeping DSL modems and routers...
PING a767.dspw65.akamai.net (2.22.144.121) 56(84) bytes of data.

--- a767.dspw65.akamai.net ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3009ms


Info: Testing the Internet connection...
Info: Connection test succeeded

Info: Skipped searching for new versions of WSUS Offline Update, because it has already been done less
than one day ago

Info: Skipped update of configuration files for WSUS Offline Update, because it has already been done
less than one day ago

Info: Parse command-line...
Info: Found update: w100-x64, Windows 10 / Server 2016, 64-bit
Info: Found language: deu, de, German
Info: Found included downloads: wsus

Info: Skipped processing of "wsus all glb", because it has already been done less than one day ago

Info: Extracting Microsoft's update catalog file package.xml (ignore any warnings about extra bytes at
end of file)...
../client/wsus/wsusscn2.cab: WARNING; file possibly truncated by 293517767 bytes.
../client/wsus/wsusscn2.cab: no valid cabinets found
/tmp/wsusoffline_temp/package.cab: No such file or directory
failed to load external entity "../cache/package.xml"
Failure: unhandled error 2
Backtrace: error_handler unpack_wsus_catalog_file source run_scripts download_updates main
Caller 0: 64 unpack_wsus_catalog_file ./download-updates-tasks/50-superseded-updates.bash
Caller 1: 294 source ./download-updates-tasks/50-superseded-updates.bash
Caller 2: 409 run_scripts /wsus/sh/download-updates.bash
Caller 3: 430 download_updates /wsus/sh/download-updates.bash
Caller 4: 439 main /wsus/sh/download-updates.bash
Exiting with error code 2 ...


I have tried both wget and aria2 (in this example).
I have tested both with and without progression bar.
Does anyone have an idea what this does mean or what I could do ?
An update installation test on a Windows client showed that the files are not usable

Best regards
fedcba
fedcba
 
Posts: 1
Joined: 11.01.2018, 08:38

Re: Exiting with errror code 2

Postby Dalai » 11.01.2018, 16:26

How large is the catalog file wsusoffline/client/wsus/wsusscn2.cab? Can you unpack that file manually? If not, the download of the catalog file failed. In such a case, you can try the following: remove the catalog file and also all files in wsusoffline/client/md/ and run the download again.

Regards
Dalai
Dalai
 
Posts: 454
Joined: 12.07.2016, 21:00

Re: Exiting with errror code 2

Postby hbuhrmester » 12.01.2018, 09:37

Problems with the WSUS catalog file wsusscn2.cab often appear right after the official patch day, which is the second Tuesday each month. Then, for some time, there may be different versions of the same file around, and some versions may even be damaged. Such problems usually disappear by itself after some days.
So, the best approach for now would be to delete the file wsusscn2.cab and the timestamps in the directory wsusoffline/timestamps, and then try again.
viewtopic.php?f=3&t=6041



If you use aria2, then the file size will be misleading: aria2 by default preallocates the needed file size. It creates an empty file of the needed size and then starts to fill in the void. This is necessary, if aria2 uses several connections to download the same file. Then it creates several worker threads to write to different parts of the file. I don't know, if aria2 uses "sparse files" or just regular empty files, but they always look "complete", when they are certainly not.
https://en.wikipedia.org/wiki/Sparse_file



When I try to run
Code: Select all
sudo bash /wsus/sh/download-updates.bash w100-x64 deu


It seems, that you started the script download-updates.bash with "sudo". This should never be necessary. But, if you start a script with sudo and then again as a regular user, you can seriously mess up ownership and file permissions, e.g. some files will belong to "root".

Regards
hbuhrmester
hbuhrmester
 
Posts: 271
Joined: 11.10.2013, 20:59


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest