Repository: aptly-dev/aptly

Issue #791: Error decoding mirror: msgpack decode error
Created: 2018-10-26T07:49:40Z
Since the last update on a Debian testing, 1.3.0+ds1-1 from 1.3.0-6, nothing works anymore.
For example:
aptly mirror list
Error decoding mirror: msgpack decode error [pos 200]: invalid length of bytes for decoding time - expecting 4 or 8 or 12, got 15
Error decoding mirror: msgpack decode error [pos 190]: invalid length of bytes for decoding time - expecting 4 or 8 or 12, got 15
No mirrors found, create one with `aptly mirror create ...`.

There are mirrors, two of them.
I tried an aptly db recover, to no avail.

Duplicate issue #841: leveldb key not found when trying to use snapshots
Created: 2019-06-17T17:24:43Z
When trying to work with snapshots, aptly experiences a leveldb error.
Detailed Description
$ docker build -t aptly/deb .

# [snip]
Successfully built 20b932bcb1ef
Successfully tagged aptly/deb:latest

$ docker run -it -v `pwd`/../repos:/repos aptly/deb 

Downloading https://oss-binaries.phusionpassenger.com/apt/passenger/dists/stretch/InRelease...
Downloading https://oss-binaries.phusionpassenger.com/apt/passenger/dists/stretch/Release...
Downloading https://oss-binaries.phusionpassenger.com/apt/passenger/dists/stretch/Release.gpg...
gpgv: Signature made Mon Jun 17 13:35:51 2019 UTC using RSA key ID AC40B2F7
gpgv: Good signature from "Phusion Automated Software Signing (Used by automated tools to sign software packages) <auto-software-signing@phusion.nl>"

Mirror [mirror_passenger_stretch]: https://oss-binaries.phusionpassenger.com/apt/passenger/ stretch [src] successfully added.
You can run 'aptly mirror update mirror_passenger_stretch' to download repository contents.
Downloading https://oss-binaries.phusionpassenger.com/apt/passenger/dists/stretch/InRelease...
Downloading https://oss-binaries.phusionpassenger.com/apt/passenger/dists/stretch/Release...
Downloading https://oss-binaries.phusionpassenger.com/apt/passenger/dists/stretch/Release.gpg...
gpgv: Signature made Mon Jun 17 13:35:51 2019 UTC using RSA key ID AC40B2F7
gpgv: Good signature from "Phusion Automated Software Signing (Used by automated tools to sign software packages) <auto-software-signing@phusion.nl>"
Downloading & parsing package files...
Downloading https://oss-binaries.phusionpassenger.com/apt/passenger/dists/stretch/main/binary-alpha/Packages.bz2...
# [snip]
Building download queue...
Download queue: 308 items (0.97 GiB)
Downloading https://oss-binaries.phusionpassenger.com/apt/passenger/pool/stretch/main/p/passenger/passenger_5.2.3.orig.tar.gz...
# [snip]
Mirror `mirror_passenger_stretch` has been successfully updated.

Snapshot snapshot_passenger_stretch successfully created.
You can run 'aptly publish snapshot snapshot_passenger_stretch' to publish snapshot as Debian repository.
ERROR: unable to load source snapshot: key not found

$ docker run -it -v `pwd`/../repos:/repos aptly/deb aptly snapshot list

List of snapshots:
 * [snapshot_passenger_stretch]: Snapshot from mirror [mirror_passenger_stretch]: https://oss-binaries.phusionpassenger.com/apt/passenger/ stretch [src]

To get more information about snapshot, run `aptly snapshot show <name>`.

$ docker run -it -v `pwd`/../repos:/repos aptly/deb aptly snapshot show snapshot_passenger_stretch

ERROR: unable to show: key not found

Context
Snapshots don't seem usable...
Your Environment
Dockerfile:
FROM ubuntu:disco

RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y dirmngr gnupg aptly apt-transport-https ca-certificates
RUN mkdir ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && chmod 700 ~/.gnupg
RUN gpg1 --no-default-keyring --keyring trustedkeys.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7

ADD aptly.conf /etc/aptly.conf

CMD for distro in stretch ; do \
         aptly mirror create mirror_passenger_${distro} https://oss-binaries.phusionpassenger.com/apt/passenger ${distro} &&\
         aptly mirror update mirror_passenger_${distro} &&\
         aptly snapshot create snapshot_passenger_${distro} from mirror mirror_passenger_${distro} &&\
         aptly repo create repo_passenger_${distro} from snapshot snapshot_passenger_${distro} &&\
         aptly publish repo repo_passenger_${distro} filesystem:test:${distro} ;\
         done

aptly.conf:
{
   "rootDir": "/repos/aptly",
   "downloadSourcePackages": true,
   "FileSystemPublishEndpoints": {
     "test": {
       "rootDir": "/opt/aptly-publish",
       "linkMethod": "copy",
       "verifyMethod": "md5"
     }
   }
}

Closing comment (2019-07-15T17:41:35Z): Might be related to #791