offspot / imager-service

Create Kiwix Hotspot microSD cards online
https://imager.kiwix.org/
GNU General Public License v3.0
14 stars 6 forks source link

Multiple failure to build card #88

Closed Popolechien closed 5 years ago

Popolechien commented 5 years ago

Here is the log (tried 3 times already)


updating task #5cf6127798c8bf268070c871 status to: building
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
Starting image creation
Starting /usr/bin/kiwix-hotspot cli --root --filename 5cf6127598c8bf268070c84c --build-dir /data --config /data/5cf6127598c8bf268070c84c.json --size 32GB

installer started: <subprocess.Popen object at 0x7f061bb100f0>
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
periodic log upload..................
sending logs for task #5cf6127798c8bf268070c871.
installer failed: 0
collecting full terminated log
installer rc: 0
Traceback (most recent call last):
  File "worker/tasks/create.py", line 103, in run
    getattr(self, method)()
  File "worker/tasks/create.py", line 188, in build_image
    raise subprocess.SubprocessError("installer rc: {}".format(ps.returncode))
subprocess.SubprocessError: installer rc: 0
updating task #5cf6127798c8bf268070c871 status to: failed_to_build
job is not alive
job crashed: installer rc: 0```
rgaudin commented 5 years ago

Thanks. FYI, if you see at the end of this log failed_to_build, it means that the installer failed so the cause of the issue is likely to be in the installer log and it's unlikely that retrying would fix the problem.

Here the problem lies with the mediawiki data archive which can't be uncompressed:

Extracting /data/kiwix-hotspot.cache/mediawiki_data_fr_2018-10.tar.bz2 to /tmp/tmpgql_2bix/wikifundi_langpack_fr
Call: ['/bin/tar', '-C', '/tmp/tmpgql_2bix/tmpnv8dzxwr', '-x', '-m', '-o', '-f', '/data/kiwix-hotspot.cache/mediawiki_data_fr_2018-10.tar.bz2']
/bin/tar: This does not look like a tar archive
bzip2: (stdin) is not a bzip2 file.
/bin/tar: Child returned status 2
/bin/tar: Error is not recoverable: exiting now

Looking at the download of the archive, we can see that the download was weird:

[06:45:42] --> Retrieving mediawiki_data_fr_2018-10.tar.bz2 (2.12 GiB)
[                                                          ] 0%
[..........................................................] 100%
Saved `mediawiki_data_fr_2018-10.tar.bz2` successfuly: 251 bytes

The file should be 2.12GB large and we retrieved only 251b. It says successful so maybe we received a 200 response code for a 404 or a redirection, not sure. FYI, we use the checksum to verify if the file is in cache but we don't control the sum of the result after download. Switching to aria2 (already planned) will fix that.

But, at this moment, the file is not present at http://download.kiwix.org/other/wikifundi/2.0/mediawiki_data_fr_2018-10.tar.bz2

@kelson42 do you know why this file has been removed or moved? where?

@Popolechien, I will close this issue as it is an installer bug (it should have failed from the download stage) but won't open a new issue on the installer has we already plan on switching to aria2 for downloads and that would fix it. The real issue here, for you, is that the mediawiki data is not where expected on the server anymore.

rgaudin commented 5 years ago

OK @kelson42 re-uploaded the missing files. You can retry.