arangodb / arangodb

🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.
https://www.arangodb.com
Other
13.6k stars 837 forks source link

Ubuntu upgrade fails #3632

Closed michlschmid closed 6 years ago

michlschmid commented 7 years ago

my environment running ArangoDB

I'm using the latest ArangoDB of the respective release series:

Mode:

On this operating system:

this is an installation-related issue:

I got the following error while trying to upgrade Arangodb 3.2.4 to 3.2.6 with apt on my ubuntu server:

Paketaktualisierung (Upgrade) wird berechnet... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  linux-headers-4.4.0-96 linux-headers-4.4.0-96-generic linux-image-4.4.0-96-generic linux-image-extra-4.4.0-96-generic
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
Die folgenden Pakete werden aktualisiert (Upgrade):
  arangodb3 distro-info-data grub-common grub-pc grub-pc-bin grub2-common initramfs-tools initramfs-tools-bin initramfs-tools-core iproute2 libgnutls-openssl27 libgnutls30 libpam-systemd libsystemd0 libudev1 lshw mdadm
  python3-distupgrade python3-update-manager resolvconf snap-confine snapd systemd systemd-sysv ubuntu-core-launcher ubuntu-release-upgrader-core udev update-manager-core
28 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 56,5 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 8.393 kB Plattenplatz zusätzlich benutzt.
Holen:1 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 grub-pc amd64 2.02~beta2-36ubuntu3.14 [197 kB]
Holen:2 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 grub2-common amd64 2.02~beta2-36ubuntu3.14 [511 kB]
Holen:3 https://www.arangodb.com/repositories/arangodb32/xUbuntu_16.04  arangodb3 3.2.6 [33,6 MB]
Holen:4 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 grub-pc-bin amd64 2.02~beta2-36ubuntu3.14 [888 kB]
Holen:5 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 grub-common amd64 2.02~beta2-36ubuntu3.14 [1.705 kB]
Holen:6 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsystemd0 amd64 229-4ubuntu21 [205 kB]
Holen:7 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpam-systemd amd64 229-4ubuntu21 [115 kB]
Holen:8 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 systemd amd64 229-4ubuntu21 [3.628 kB]
Holen:9 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 udev amd64 229-4ubuntu21 [992 kB]
Holen:10 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mdadm amd64 3.3-2ubuntu7.5 [393 kB]
Holen:11 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev1 amd64 229-4ubuntu21 [54,6 kB]
Holen:12 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 initramfs-tools all 0.122ubuntu8.9 [8.616 B]
Holen:13 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 initramfs-tools-core all 0.122ubuntu8.9 [42,7 kB]
Holen:14 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 initramfs-tools-bin amd64 0.122ubuntu8.9 [9.632 B]
Holen:15 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 systemd-sysv amd64 229-4ubuntu21 [12,1 kB]
Holen:16 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ubuntu-core-launcher amd64 2.28.5 [1.568 B]
Holen:17 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 snapd amd64 2.28.5 [12,6 MB]
Holen:18 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 snap-confine amd64 2.28.5 [1.726 B]
Holen:19 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 distro-info-data all 0.28ubuntu0.5 [4.224 B]
Holen:20 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 iproute2 amd64 4.3.0-1ubuntu3.16.04.2 [522 kB]
Holen:21 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgnutls-openssl27 amd64 3.4.10-4ubuntu1.4 [22,0 kB]
Holen:22 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgnutls30 amd64 3.4.10-4ubuntu1.4 [548 kB]
Holen:23 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 resolvconf all 1.78ubuntu5 [52,0 kB]
Holen:24 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 lshw amd64 02.17-1.1ubuntu3.3 [215 kB]
Holen:25 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ubuntu-release-upgrader-core all 1:16.04.23 [29,4 kB]
Holen:26 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-distupgrade all 1:16.04.23 [104 kB]
Holen:27 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-update-manager all 1:16.04.10 [31,9 kB]
Holen:28 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 update-manager-core all 1:16.04.10 [5.320 B]
Es wurden 56,5 MB in 4 min 33 s geholt (207 kB/s).
Vorkonfiguration der Pakete ...
(Lese Datenbank ... 132347 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../grub-pc_2.02~beta2-36ubuntu3.14_amd64.deb ...
Entpacken von grub-pc (2.02~beta2-36ubuntu3.14) über (2.02~beta2-36ubuntu3.12) ...
Vorbereitung zum Entpacken von .../grub2-common_2.02~beta2-36ubuntu3.14_amd64.deb ...
Entpacken von grub2-common (2.02~beta2-36ubuntu3.14) über (2.02~beta2-36ubuntu3.12) ...
Vorbereitung zum Entpacken von .../grub-pc-bin_2.02~beta2-36ubuntu3.14_amd64.deb ...
Entpacken von grub-pc-bin (2.02~beta2-36ubuntu3.14) über (2.02~beta2-36ubuntu3.12) ...
Vorbereitung zum Entpacken von .../grub-common_2.02~beta2-36ubuntu3.14_amd64.deb ...
Entpacken von grub-common (2.02~beta2-36ubuntu3.14) über (2.02~beta2-36ubuntu3.12) ...
Vorbereitung zum Entpacken von .../libsystemd0_229-4ubuntu21_amd64.deb ...
Entpacken von libsystemd0:amd64 (229-4ubuntu21) über (229-4ubuntu19) ...
Trigger für man-db (2.7.5-1) werden verarbeitet ...
Trigger für install-info (6.1.0.dfsg.1-5) werden verarbeitet ...
Trigger für ureadahead (0.100.0-19) werden verarbeitet ...
Trigger für libc-bin (2.23-0ubuntu9) werden verarbeitet ...
libsystemd0:amd64 (229-4ubuntu21) wird eingerichtet ...
Trigger für libc-bin (2.23-0ubuntu9) werden verarbeitet ...
(Lese Datenbank ... 132347 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../libpam-systemd_229-4ubuntu21_amd64.deb ...
Entpacken von libpam-systemd:amd64 (229-4ubuntu21) über (229-4ubuntu19) ...
Vorbereitung zum Entpacken von .../systemd_229-4ubuntu21_amd64.deb ...
Entpacken von systemd (229-4ubuntu21) über (229-4ubuntu19) ...
Trigger für man-db (2.7.5-1) werden verarbeitet ...
Trigger für dbus (1.10.6-1ubuntu3.3) werden verarbeitet ...
Trigger für ureadahead (0.100.0-19) werden verarbeitet ...
systemd (229-4ubuntu21) wird eingerichtet ...
addgroup: Die Gruppe »systemd-journal« existiert bereits als Systemgruppe. Programmende.
(Lese Datenbank ... 132347 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../udev_229-4ubuntu21_amd64.deb ...
Entpacken von udev (229-4ubuntu21) über (229-4ubuntu19) ...
Vorbereitung zum Entpacken von .../mdadm_3.3-2ubuntu7.5_amd64.deb ...
Entpacken von mdadm (3.3-2ubuntu7.5) über (3.3-2ubuntu7.4) ...
Vorbereitung zum Entpacken von .../libudev1_229-4ubuntu21_amd64.deb ...
Entpacken von libudev1:amd64 (229-4ubuntu21) über (229-4ubuntu19) ...
Trigger für man-db (2.7.5-1) werden verarbeitet ...
Trigger für ureadahead (0.100.0-19) werden verarbeitet ...
Trigger für systemd (229-4ubuntu21) werden verarbeitet ...
Trigger für libc-bin (2.23-0ubuntu9) werden verarbeitet ...
libudev1:amd64 (229-4ubuntu21) wird eingerichtet ...
Trigger für libc-bin (2.23-0ubuntu9) werden verarbeitet ...
(Lese Datenbank ... 132349 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../initramfs-tools_0.122ubuntu8.9_all.deb ...
Entpacken von initramfs-tools (0.122ubuntu8.9) über (0.122ubuntu8.8) ...
Vorbereitung zum Entpacken von .../initramfs-tools-core_0.122ubuntu8.9_all.deb ...
Entpacken von initramfs-tools-core (0.122ubuntu8.9) über (0.122ubuntu8.8) ...
Vorbereitung zum Entpacken von .../initramfs-tools-bin_0.122ubuntu8.9_amd64.deb ...
Entpacken von initramfs-tools-bin (0.122ubuntu8.9) über (0.122ubuntu8.8) ...
Vorbereitung zum Entpacken von .../systemd-sysv_229-4ubuntu21_amd64.deb ...
Entpacken von systemd-sysv (229-4ubuntu21) über (229-4ubuntu19) ...
Trigger für man-db (2.7.5-1) werden verarbeitet ...
systemd-sysv (229-4ubuntu21) wird eingerichtet ...
(Lese Datenbank ... 132349 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../ubuntu-core-launcher_2.28.5_amd64.deb ...
Entpacken von ubuntu-core-launcher (2.28.5) über (2.27.5) ...
Vorbereitung zum Entpacken von .../snapd_2.28.5_amd64.deb ...
Warning: Stopping snapd.service, but it can still be activated by:
  snapd.socket
Entpacken von snapd (2.28.5) über (2.27.5) ...
Vorbereitung zum Entpacken von .../snap-confine_2.28.5_amd64.deb ...
Entpacken von snap-confine (2.28.5) über (2.27.5) ...
Vorbereitung zum Entpacken von .../distro-info-data_0.28ubuntu0.5_all.deb ...
Entpacken von distro-info-data (0.28ubuntu0.5) über (0.28ubuntu0.3) ...
Vorbereitung zum Entpacken von .../iproute2_4.3.0-1ubuntu3.16.04.2_amd64.deb ...
Entpacken von iproute2 (4.3.0-1ubuntu3.16.04.2) über (4.3.0-1ubuntu3.16.04.1) ...
Vorbereitung zum Entpacken von .../libgnutls-openssl27_3.4.10-4ubuntu1.4_amd64.deb ...
Entpacken von libgnutls-openssl27:amd64 (3.4.10-4ubuntu1.4) über (3.4.10-4ubuntu1.3) ...
Vorbereitung zum Entpacken von .../libgnutls30_3.4.10-4ubuntu1.4_amd64.deb ...
Entpacken von libgnutls30:amd64 (3.4.10-4ubuntu1.4) über (3.4.10-4ubuntu1.3) ...
Vorbereitung zum Entpacken von .../resolvconf_1.78ubuntu5_all.deb ...
Entpacken von resolvconf (1.78ubuntu5) über (1.78ubuntu4) ...
Vorbereitung zum Entpacken von .../lshw_02.17-1.1ubuntu3.3_amd64.deb ...
Entpacken von lshw (02.17-1.1ubuntu3.3) über (02.17-1.1ubuntu3.2) ...
Vorbereitung zum Entpacken von .../ubuntu-release-upgrader-core_1%3a16.04.23_all.deb ...
Entpacken von ubuntu-release-upgrader-core (1:16.04.23) über (1:16.04.22) ...
Vorbereitung zum Entpacken von .../python3-distupgrade_1%3a16.04.23_all.deb ...
Entpacken von python3-distupgrade (1:16.04.23) über (1:16.04.22) ...
Vorbereitung zum Entpacken von .../python3-update-manager_1%3a16.04.10_all.deb ...
Entpacken von python3-update-manager (1:16.04.10) über (1:16.04.9) ...
Vorbereitung zum Entpacken von .../update-manager-core_1%3a16.04.10_all.deb ...
Entpacken von update-manager-core (1:16.04.10) über (1:16.04.9) ...
Vorbereitung zum Entpacken von .../arangodb3_3.2.6_amd64.deb ...
Entpacken von arangodb3 (3.2.6) über (3.2.4) ...
Trigger für man-db (2.7.5-1) werden verarbeitet ...
Trigger für libc-bin (2.23-0ubuntu9) werden verarbeitet ...
Trigger für ureadahead (0.100.0-19) werden verarbeitet ...
Trigger für systemd (229-4ubuntu21) werden verarbeitet ...
grub-common (2.02~beta2-36ubuntu3.14) wird eingerichtet ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
grub2-common (2.02~beta2-36ubuntu3.14) wird eingerichtet ...
grub-pc-bin (2.02~beta2-36ubuntu3.14) wird eingerichtet ...
grub-pc (2.02~beta2-36ubuntu3.14) wird eingerichtet ...
Installing for i386-pc platform.
installation beendet. Keine Fehler aufgetreten.
Grub-Konfigurationsdatei wird generiert …
Linux-Abbild gefunden: /boot/vmlinuz-4.4.0-98-generic
initrd-Abbild gefunden: /boot/initrd.img-4.4.0-98-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.4.0-97-generic
initrd-Abbild gefunden: /boot/initrd.img-4.4.0-97-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.4.0-96-generic
initrd-Abbild gefunden: /boot/initrd.img-4.4.0-96-generic
erledigt
libpam-systemd:amd64 (229-4ubuntu21) wird eingerichtet ...
udev (229-4ubuntu21) wird eingerichtet ...
addgroup: Die Gruppe »input« existiert bereits als Systemgruppe. Programmende.
update-initramfs: deferring update (trigger activated)
mdadm (3.3-2ubuntu7.5) wird eingerichtet ...
Neue Version der Konfigurationsdatei /etc/init.d/mdadm wird installiert ...
update-initramfs: deferring update (trigger activated)
Grub-Konfigurationsdatei wird generiert …
Linux-Abbild gefunden: /boot/vmlinuz-4.4.0-98-generic
initrd-Abbild gefunden: /boot/initrd.img-4.4.0-98-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.4.0-97-generic
initrd-Abbild gefunden: /boot/initrd.img-4.4.0-97-generic
Linux-Abbild gefunden: /boot/vmlinuz-4.4.0-96-generic
initrd-Abbild gefunden: /boot/initrd.img-4.4.0-96-generic
File descriptor 3 (pipe:[14045643]) leaked on lvs invocation. Parent PID 2676: /bin/sh
erledigt
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
initramfs-tools-bin (0.122ubuntu8.9) wird eingerichtet ...
initramfs-tools-core (0.122ubuntu8.9) wird eingerichtet ...
initramfs-tools (0.122ubuntu8.9) wird eingerichtet ...
update-initramfs: deferring update (trigger activated)
snapd (2.28.5) wird eingerichtet ...
Neue Version der Konfigurationsdatei /etc/apparmor.d/usr.lib.snapd.snap-confine.real wird installiert ...
Neue Version der Konfigurationsdatei /etc/profile.d/apps-bin-path.sh wird installiert ...
ubuntu-core-launcher (2.28.5) wird eingerichtet ...
snap-confine (2.28.5) wird eingerichtet ...
distro-info-data (0.28ubuntu0.5) wird eingerichtet ...
iproute2 (4.3.0-1ubuntu3.16.04.2) wird eingerichtet ...
libgnutls30:amd64 (3.4.10-4ubuntu1.4) wird eingerichtet ...
libgnutls-openssl27:amd64 (3.4.10-4ubuntu1.4) wird eingerichtet ...
resolvconf (1.78ubuntu5) wird eingerichtet ...
lshw (02.17-1.1ubuntu3.3) wird eingerichtet ...
arangodb3 (3.2.6) wird eingerichtet ...
FATAL ERROR: EXIT_FAILED - "exit with error"
dpkg: Fehler beim Bearbeiten des Paketes arangodb3 (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
python3-distupgrade (1:16.04.23) wird eingerichtet ...
python3-update-manager (1:16.04.10) wird eingerichtet ...
ubuntu-release-upgrader-core (1:16.04.23) wird eingerichtet ...
update-manager-core (1:16.04.10) wird eingerichtet ...
Trigger für systemd (229-4ubuntu21) werden verarbeitet ...
Trigger für ureadahead (0.100.0-19) werden verarbeitet ...
Trigger für initramfs-tools (0.122ubuntu8.9) werden verarbeitet ...
update-initramfs: Generating /boot/initrd.img-4.4.0-98-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Trigger für libc-bin (2.23-0ubuntu9) werden verarbeitet ...
Trigger für resolvconf (1.78ubuntu5) werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
 arangodb3
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried uninstalling -> reinstalling arangodb completly with no success:

root@bser-ardb01:~# apt-get install arangodb3=3.2.6
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Die folgenden NEUEN Pakete werden installiert:
  arangodb3
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen noch 0 B von 33,6 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 277 MB Plattenplatz zusätzlich benutzt.
Vorkonfiguration der Pakete ...
Vormals nicht ausgewähltes Paket arangodb3 wird gewählt.
(Lese Datenbank ... 94794 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../arangodb3_3.2.6_amd64.deb ...
Entpacken von arangodb3 (3.2.6) ...
Trigger für systemd (229-4ubuntu21) werden verarbeitet ...
Trigger für ureadahead (0.100.0-19) werden verarbeitet ...
Trigger für man-db (2.7.5-1) werden verarbeitet ...
arangodb3 (3.2.6) wird eingerichtet ...
FATAL ERROR: EXIT_FAILED - "exit with error"
dpkg: Fehler beim Bearbeiten des Paketes arangodb3 (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 arangodb3
E: Sub-process /usr/bin/dpkg returned an error code (1)

Also trying to re-install 3.2.4 failed with the same error. Before each install command I forced apt to clean its package cache and update sources:

apt-get clean
apt-get autoclean
apt-get update

Thanks for any help.

dothebart commented 7 years ago

Hi, can you re-attempt the installation and have a look at /var/log/arangodb3/arangod.log and /var/log/arangodb3/arangod.log.supervisor and see whether there are any additional messages?

fingolfin commented 7 years ago

I also just encountered this error.

In my case, it seems that somehow the upgrade lead to a corrupted DB. My log now ends like this (no corruption before the upgrade attempt was shown in the log files)


2017-11-09T15:00:06Z [12138] WARNING {memory} /sys/kernel/mm/transparent_hugepage/enabled is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-09T15:00:06Z [12138] WARNING {memory} /sys/kernel/mm/transparent_hugepage/defrag is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-09T15:00:06Z [12138] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/enabled"'
2017-11-09T15:00:06Z [12138] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/defrag"'
2017-11-09T15:00:06Z [12138] INFO using storage engine mmfiles
2017-11-09T15:00:06Z [12138] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
2017-11-09T15:00:06Z [12138] INFO Authentication is turned on (system only), authentication for unix sockets is turned on
2017-11-09T15:00:06Z [12138] ERROR corrupted datafile header read from '/var/lib/arangodb3/journals/logfile-5867495.db'
2017-11-09T15:00:06Z [12138] ERROR unable to open logfile '/var/lib/arangodb3/journals/logfile-5867495.db': corrupted datafile
2017-11-09T15:00:06Z [12138] FATAL could not inspect WAL logfiles: corrupted datafile
2017-11-09T15:02:41Z [16639] WARNING {memory} /sys/kernel/mm/transparent_hugepage/enabled is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-09T15:02:41Z [16639] WARNING {memory} /sys/kernel/mm/transparent_hugepage/defrag is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
[ ... a few more similar entries ... ]
2017-11-09T15:19:20Z [1673] INFO Authentication is turned on (system only), authentication for unix sockets is turned on
2017-11-09T15:19:20Z [1673] ERROR corrupted datafile header read from '/var/lib/arangodb3/journals/logfile-5867495.db'
2017-11-09T15:19:20Z [1673] ERROR unable to open logfile '/var/lib/arangodb3/journals/logfile-5867495.db': corrupted datafile
2017-11-09T15:19:20Z [1673] FATAL could not inspect WAL logfiles: corrupted datafile
2017-11-09T15:22:00Z [1875] WARNING {memory} /sys/kernel/mm/transparent_hugepage/enabled is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-09T15:22:00Z [1875] WARNING {memory} /sys/kernel/mm/transparent_hugepage/defrag is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-09T15:22:00Z [1875] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/enabled"'
2017-11-09T15:22:00Z [1875] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/defrag"'
2017-11-09T15:22:00Z [1875] INFO using storage engine mmfiles
2017-11-09T15:22:00Z [1875] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
2017-11-09T15:22:00Z [1875] INFO Authentication is turned on (system only), authentication for unix sockets is turned on
2017-11-09T15:22:01Z [1875] ERROR corrupted datafile header read from '/var/lib/arangodb3/journals/logfile-5867495.db'
2017-11-09T15:22:01Z [1875] ERROR unable to open logfile '/var/lib/arangodb3/journals/logfile-5867495.db': corrupted datafile
2017-11-09T15:22:01Z [1875] FATAL could not inspect WAL logfiles: corrupted datafile
``

The previous log contains no indication about any corruption.

Luckily, this is a test system with no important data, so I can probably just wipe it.
michlschmid commented 7 years ago

@dothebart:

dothebart commented 7 years ago

Hi, If you inspect /var/lib/arangodb - do you see whether the owner of these datafiles is set properly? If you started ArangoDB as root, it may not be readable for the system user wanting to start the daemon.

fingolfin commented 7 years ago

I assume you mean /var/lib/arangodb3. Well, there are indeed a few files whose group is "root", but for all, the owner is "arangodb. I "chown"'d them, but no visible difference. So I changed thearangodb3.postinstscript by addingset -xat the top. This showed me that the error comes from this command:/usr/sbin/arangod --uid arangodb --gid arangodb --server.rest-server false --log.foreground-tty false --database.check-version`

So I tried this:

# /usr/sbin/arangod --uid arangodb --gid arangodb --server.rest-server false --database.check-version
2017-11-09T16:43:22Z [3622] WARNING {memory} environment variable GLIBCXX_FORCE_NEW' is not set. it is recommended to set it to some value to avoid unnecessary memory pooling in glibc++
2017-11-09T16:43:22Z [3622] WARNING {memory} execute 'export GLIBCXX_FORCE_NEW=1'
2017-11-09T16:43:22Z [3622] WARNING {memory} /sys/kernel/mm/transparent_hugepage/enabled is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-09T16:43:22Z [3622] WARNING {memory} /sys/kernel/mm/transparent_hugepage/defrag is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-09T16:43:22Z [3622] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/enabled"'
2017-11-09T16:43:22Z [3622] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/defrag"'
2017-11-09T16:43:22Z [3622] INFO using storage engine mmfiles
2017-11-09T16:43:22Z [3622] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
2017-11-09T16:43:22Z [3622] INFO Authentication is turned on (system only), authentication for unix sockets is turned on
2017-11-09T16:43:22Z [3622] ERROR corrupted datafile header read from '/var/lib/arangodb3/journals/logfile-5867495.db'
2017-11-09T16:43:22Z [3622] ERROR unable to open logfile '/var/lib/arangodb3/journals/logfile-5867495.db': corrupted datafile
2017-11-09T16:43:22Z [3622] FATAL could not inspect WAL logfiles: corrupted datafile
#
# ls -al /var/lib/arangodb3/journals/logfile-5867495.db
-rw-rw---- 1 arangodb arangodb 33554432 Nov  9 16:00 /var/lib/arangodb3/journals/logfile-5867495.db
dothebart commented 7 years ago

Hi, please keep a copy of /var/lib/arangodb3 (yes 3 actually ;-)) and try whether running

/usr/sbin/arangod --wal.ignore-logfile-errors true

or even more forcefull /usr/sbin/arangod --wal.ignore-logfile-errors true --wal.ignore-recovery-errors true

can solve your situation.

Which filesystems do you use?

michlschmid commented 7 years ago

@dothebart following rights in my folders:

root@bser-ardb01:/var/lib# ls -la
insgesamt 172
drwxr-xr-x 44 root     root     4096 Aug 21 15:20 .
drwxr-xr-x 14 root     root     4096 Aug 21 15:20 ..
drwxr-xr-x  4 root     root     4096 Mär  6  2017 AccountsService
drwxr-xr-x  3 root     root     4096 Mär  6  2017 apparmor
drwxr-xr-x  6 root     root     4096 Nov  9 17:25 apt
drwxr-xr-x  5 arangodb arangodb 4096 Nov  9 17:25 arangodb3
drwxr-xr-x  3 arangodb arangodb 4096 Mär  6  2017 arangodb3-apps

root@bser-ardb01:/var/lib/arangodb3# ll
insgesamt 36
drwxr-xr-x  5 arangodb arangodb 4096 Nov  9 17:25 ./
drwxr-xr-x 44 root     root     4096 Aug 21 15:20 ../
drwxr-xr-x  4 arangodb arangodb 4096 Mär  6  2017 databases/
-rw-r-----  1 arangodb arangodb    7 Jul 25 09:18 ENGINE
drwxr-xr-x  2 arangodb arangodb 4096 Nov  9 08:33 journals/
-rw-------  1 arangodb arangodb    4 Nov  9 17:25 LOCK
drwxr-xr-x  2 arangodb arangodb 4096 Nov  9 17:25 rocksdb/
-rw-r-----  1 arangodb arangodb   67 Mär  6  2017 SERVER
-rw-rw----  1 arangodb arangodb  137 Nov  9 08:33 SHUTDOWN

All database and journal folders an its contents seem to be assigned to arangodb:arangodb.

michlschmid commented 7 years ago

My filesystem is ext4 .

fingolfin commented 7 years ago

@vlabmichl sorry for "hijacking" your issue. Perhaps you could also tell the content (or end of content) of your /var/log/arangodb3/arangod.log to see if our two problems are related after all or not?

fingolfin commented 7 years ago

@dothebart I tried both of your suggested commands, in slightly altered form:

[ root ] /var/lib# /usr/sbin/arangod --uid arangodb --gid arangodb --server.rest-server false --database.check-version --wal.ignore-logfile-errors true
2017-11-10T09:11:30Z [4290] WARNING {memory} environment variable GLIBCXX_FORCE_NEW' is not set. it is recommended to set it to some value to avoid unnecessary memory pooling in glibc++
2017-11-10T09:11:30Z [4290] WARNING {memory} execute 'export GLIBCXX_FORCE_NEW=1'
2017-11-10T09:11:30Z [4290] WARNING {memory} /sys/kernel/mm/transparent_hugepage/enabled is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-10T09:11:30Z [4290] WARNING {memory} /sys/kernel/mm/transparent_hugepage/defrag is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-10T09:11:30Z [4290] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/enabled"'
2017-11-10T09:11:30Z [4290] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/defrag"'
2017-11-10T09:11:30Z [4290] INFO using storage engine mmfiles
2017-11-10T09:11:30Z [4290] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
2017-11-10T09:11:30Z [4290] INFO Authentication is turned on (system only), authentication for unix sockets is turned on
2017-11-10T09:11:30Z [4290] ERROR corrupted datafile header read from '/var/lib/arangodb3/journals/logfile-5867495.db'
2017-11-10T09:11:30Z [4290] ERROR unable to open logfile '/var/lib/arangodb3/journals/logfile-5867495.db': corrupted datafile
[ root ] /var/lib#

and then

[ root ] /var/lib# /usr/sbin/arangod --uid arangodb --gid arangodb --server.rest-server false --database.check-version --wal.ignore-logfile-errors true --wal.ignore-recovery-errors true
2017-11-10T09:11:49Z [4397] WARNING {memory} environment variable GLIBCXX_FORCE_NEW' is not set. it is recommended to set it to some value to avoid unnecessary memory pooling in glibc++
2017-11-10T09:11:49Z [4397] WARNING {memory} execute 'export GLIBCXX_FORCE_NEW=1'
2017-11-10T09:11:49Z [4397] WARNING {memory} /sys/kernel/mm/transparent_hugepage/enabled is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-10T09:11:49Z [4397] WARNING {memory} /sys/kernel/mm/transparent_hugepage/defrag is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-10T09:11:49Z [4397] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/enabled"'
2017-11-10T09:11:49Z [4397] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/defrag"'
2017-11-10T09:11:49Z [4397] INFO using storage engine mmfiles
2017-11-10T09:11:49Z [4397] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
2017-11-10T09:11:49Z [4397] INFO Authentication is turned on (system only), authentication for unix sockets is turned on
2017-11-10T09:11:49Z [4397] ERROR corrupted datafile header read from '/var/lib/arangodb3/journals/logfile-5867495.db'
2017-11-10T09:11:49Z [4397] ERROR unable to open logfile '/var/lib/arangodb3/journals/logfile-5867495.db': corrupted datafile

I verified after each command that no arangodbd process (or any process involving the string arango) was running. For reference, the relevant file is read/write for user:group arangodb:arangodb:

[ root ] /var/lib# ls -al /var/lib/arangodb3/journals/logfile-5867495.db
-rw-rw---- 1 arangodb arangodb 33554432 Nov  9 16:00 /var/lib/arangodb3/journals/logfile-5867495.db
fingolfin commented 7 years ago

Oh, and I am also using ext4 (and ubuntu/single server/etc., i.e. more or less the same setup @vlabmichl seems to be using, with essentially the same things happening, which is why I commented here instead of opening a new issue. But if that's causing too much confusion, I can move over to a new issue)

dothebart commented 7 years ago

Ok, in the community slack we also had somebody who couldn't install arangodb in first place due to the libstdc++ referenced could not be installed:

before the security update:

dpkg -l libstdc++6
ii  libstdc++6:amd64                      5.4.0-6ubuntu1~16.04.4  amd64                   GNU Standard C++ Library v3

(which our build containers also use)

After the upgrade:

ii  libstdc++6:amd64                      5.4.0-6ubuntu1~16.04.5  amd64                   GNU Standard C++ Library v3

and here the package won't install in first place. Since the both of you did upgrades, can you confirm you've installed the later libstdc++ on your system?

fingolfin commented 7 years ago

Over here, its this:

ii  libstdc++6:amd64                          5.4.0-6ubuntu1~16.04.5    amd64                     GNU Standard C++ Library v3
ii  libstdc++6:i386                           5.4.0-6ubuntu1~16.04.5    i386                      GNU Standard C++ Library v3
dothebart commented 7 years ago

Ok, so while it refuses to install on such systems in first place, it will upgrade arangodb / libstdc++. Can you give us a copy of your /var/lib/arangodb3/ ? I will also try to create a package with the newer libstdc++ bindings.

ObiWahn commented 7 years ago

I think we should require a fixed libstdc++ version in the future to prevent this from happening. We will get mails by annoyed users who can not upgrade their systems but it is probably better than a failing database.

dothebart commented 7 years ago

@fingolfin @vlabmichl can you retry with http://master.jenkins.arangodb.info/arangodb3-3.2.6-1_amd64.deb ? That was built with the newer gcc from the ubuntu security updates.

fingolfin commented 7 years ago

Don't see a difference:

[ root ] /tmp# curl -O http://master.jenkins.arangodb.info/arangodb3-3.2.6-1_amd64.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 33.4M  100 33.4M    0     0  9944k      0  0:00:03  0:00:03 --:--:-- 9945k
[ root ] /tmp# dpkg -i arangodb3-3.2.6-1_amd64.deb
(Reading database ... 122780 files and directories currently installed.)
Preparing to unpack arangodb3-3.2.6-1_amd64.deb ...
Unpacking arangodb3 (3.2.6) over (3.2.6) ...
Setting up arangodb3 (3.2.6) ...
FATAL ERROR: EXIT_FAILED - "exit with error"
dpkg: error processing package arangodb3 (--install):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 arangodb3
[ root ] /tmp# /usr/sbin/arangod --uid arangodb --gid arangodb --server.rest-server false --database.check-version
2017-11-10T14:24:44Z [5304] WARNING {memory} environment variable GLIBCXX_FORCE_NEW' is not set. it is recommended to set it to some value to avoid unnecessary memory pooling in glibc++
2017-11-10T14:24:44Z [5304] WARNING {memory} execute 'export GLIBCXX_FORCE_NEW=1'
2017-11-10T14:24:44Z [5304] WARNING {memory} /sys/kernel/mm/transparent_hugepage/enabled is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-10T14:24:44Z [5304] WARNING {memory} /sys/kernel/mm/transparent_hugepage/defrag is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-10T14:24:44Z [5304] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/enabled"'
2017-11-10T14:24:44Z [5304] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/defrag"'
2017-11-10T14:24:44Z [5304] INFO using storage engine mmfiles
2017-11-10T14:24:44Z [5304] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
2017-11-10T14:24:44Z [5304] INFO Authentication is turned on (system only), authentication for unix sockets is turned on
2017-11-10T14:24:44Z [5304] ERROR corrupted datafile header read from '/var/lib/arangodb3/journals/logfile-5867495.db'
2017-11-10T14:24:44Z [5304] ERROR unable to open logfile '/var/lib/arangodb3/journals/logfile-5867495.db': corrupted datafile
2017-11-10T14:24:44Z [5304] FATAL could not inspect WAL logfiles: corrupted datafile
dothebart commented 7 years ago

Will /usr/sbin/arangod --wal.ignore-logfile-errors true --wal.ignore-recovery-errors true be doing any good for you? Maybe from the first backup of the database directory?

dothebart commented 7 years ago

@vlabmichl @fingolfin can you send us a copy of your /var/lib/arangodb3/ via i.e. dropbox so we can look into the actual problem? If you need an NDA signed for this please let us know. You may reach us via hackers [at) arangodb dot com , please reference this ticket.

clirix commented 7 years ago

I have this problem too. It occurs after an "apt-get upgrade". The system is an Ubuntu LTS 16.04

2017-11-16T10:42:25Z [6295] WARNING {memory} /sys/kernel/mm/transparent_hugepage/defrag is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-16T10:42:25Z [6295] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/enabled"'
2017-11-16T10:42:25Z [6295] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/defrag"'
2017-11-16T10:42:25Z [6295] INFO using storage engine mmfiles
2017-11-16T10:42:25Z [6295] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
2017-11-16T10:42:25Z [6295] INFO Authentication is turned on (system only), authentication for unix sockets is turned on
2017-11-16T10:42:25Z [6295] ERROR corrupted datafile header read from '/var/lib/arangodb3/journals/logfile-20059012.db'
2017-11-16T10:42:25Z [6295] ERROR unable to open logfile '/var/lib/arangodb3/journals/logfile-20059012.db': corrupted datafile
2017-11-16T10:42:25Z [6295] FATAL could not inspect WAL logfiles: corrupted datafile
dothebart commented 7 years ago

Can you please upgrade to arangodb 3.2.8 ? we the cause for the corruption should have been fixed.

fingolfin commented 7 years ago

I already moved to a new DB, so I don't really want to re-install the corrupt files to test that.

@dothebart I emailed you a link to the corrupt files right after you requested it, did you get that? Never got a confirmation reply.

dothebart commented 7 years ago

Thanks a lot for taking the time, meanwhile another user already sent files of a similar incident via another channel, so this got lost during my vacation.

However you should really upgrade to 3.2.8 to stop this from happening again.

suciokhan commented 6 years ago

Having same issue with 3.2.9 when I try to run sudo-apt-get upgrade:

After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up arangodb3 (3.2.9) ... FATAL ERROR: EXIT_FAILED - "exit with error" dpkg: error processing package arangodb3 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: arangodb3 E: Sub-process /usr/bin/dpkg returned an error code (1)

dothebart commented 6 years ago

Hi, did you try to clean up your database as stated in https://github.com/arangodb/arangodb/issues/3632#issuecomment-343220495 ?

suciokhan commented 6 years ago

I copied /var/lib/arangodb3 to /var/lib/arangodb3.backup.

Then tried both commands: /usr/sbin/arangod --wal.ignore-logfile-errors true /usr/sbin/arangod --wal.ignore-logfile-errors true --wal.ignore-recovery-errors true

Same results both times: 2017-12-07T13:54:04Z [3376] INFO ArangoDB 3.2.9 [linux] 64bit, using jemalloc, VPack 0.1.30, RocksDB 5.6.0, ICU 58.1, V8 5.7.492.77, OpenSSL 1.0.2g 1 Mar 2016 2017-12-07T13:54:04Z [3376] WARNING {memory} environment variable GLIBCXX_FORCE_NEW' is not set. it is recommended to set it to some value to avoid unnecessary memory pooling in glibc++ 2017-12-07T13:54:04Z [3376] WARNING {memory} execute 'export GLIBCXX_FORCE_NEW=1' 2017-12-07T13:54:04Z [3376] WARNING {memory} /sys/kernel/mm/transparent_hugepage/enabled is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise' 2017-12-07T13:54:04Z [3376] WARNING {memory} /sys/kernel/mm/transparent_hugepage/defrag is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise' 2017-12-07T13:54:04Z [3376] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/enabled"' 2017-12-07T13:54:04Z [3376] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/defrag"' 2017-12-07T13:54:04Z [3376] INFO using storage engine mmfiles 2017-12-07T13:54:04Z [3376] INFO {cluster} Starting up with role SINGLE 2017-12-07T13:54:04Z [3376] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576 2017-12-07T13:54:04Z [3376] INFO Authentication is turned on (system only), authentication for unix sockets is turned on 2017-12-07T13:54:04Z [3376] ERROR corrupted datafile header read from '/var/lib/arangodb3/journals/logfile-4914328.db' 2017-12-07T13:54:04Z [3376] ERROR unable to open logfile '/var/lib/arangodb3/journals/logfile-4914328.db': corrupted datafile 2017-12-07T13:54:04Z [3376] INFO using endpoint 'http+tcp://127.0.0.1:8529' for non-encrypted requests 2017-12-07T13:54:07Z [3376] INFO ArangoDB (version 3.2.9 [linux]) is ready for business. Have fun!

However, when I run sudo apt-get upgrade I get:

Setting up arangodb3 (3.2.9) ... FATAL ERROR: EXIT_COULD_NOT_LOCK - "could not lock - another process could be running" dpkg: error processing package arangodb3 (--configure): subprocess installed post-installation script returned error exit status 22 Errors were encountered while processing: arangodb3 E: Sub-process /usr/bin/dpkg returned an error code (1)

dothebart commented 6 years ago

Once you got the arangod up and runnig (temporarily) you should dump the database. Then you stop it, install with a fresh database directory, an restore.

The last error you've posted indicates that there is an arangodb process running in a phase its expected to be gone.

suciokhan commented 6 years ago

For reinstall, I'm utilizing your guidance here: https://stackoverflow.com/questions/38425954/error-upgrading-arangodb-3-0-3-from-apt/38428843

rm -f /var/cache/apt/archives/arango* apt-get --reinstall install arangodb3

However, I receive this message:

Reading package lists... Done Building dependency tree
Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. E: Internal Error, No file name for arangodb3:amd64

dothebart commented 6 years ago

hm, did you dpkg --purge arangodb3 in advance? (keep a backup of your /var/lib/arangodb and if you've modified any more /var/lib/arangodb3-apps and /etc/arangodb3)

suciokhan commented 6 years ago

Thanks very much.

I can now run sudo apt-get upgrade with no errors.

Tamal commented 6 years ago

Upgrading from 3.2.8 to 3.2.9 also facing this issue.

dimanjy commented 6 years ago

Same error on 3.2.9 - "corrupted datafile" on autostart this morning. Yesterday everything was fine. I removed corrupted files, made upgrade to ArangoDB 3.2.9 enterprise and restarted. And it's OK now.

ObiWahn commented 6 years ago

Hi all,

in pre 3.2.8 releases we had trouble with data corruption. This should be fixed by now. Do you use datafiles that originate in versions prior to 3.2.8?

dimanjy commented 6 years ago

I start lerning ArangoDB from version 3.2.8 at 2017-11-20

ObiWahn commented 6 years ago

@dimanjy could you provide the datafile to us? If not then it would be good if you could look into the file and find out if there are any log messages in the data.

dimanjy commented 6 years ago

Something's wrong with GinHub file attachment... Where should I send the corrupted file? E-mail or upload somewhere?

ObiWahn commented 6 years ago

Please send it to - hackers at arangodb.com - and put the issue number in the topic. Thank you very much!

dimanjy commented 6 years ago

logfile-3675835.db.gz I did it! (access rights issue :) This file was mentioned as corrupted in my ArangoDb logs.

ObiWahn commented 6 years ago

The first line of the log contains: 2017-12-17T21:54:39Z [2581] INFO control-c received, beginning shut down sequence We are investigating! What OS do you use and how is your arangodb started? Do you use systemd? Is the systemd unit auto-generated or not?

dimanjy commented 6 years ago

I'm on Ubuntu 14.04 and I installed ArangoDb from https://www.arangodb.com/download-major/ubuntu/ (Ubuntu 14.04 section - Installation via Package Manager) I'm not sure what startup system I'm using... I guess that it's Ubuntu default startup system. I guess it's Upstart.

ObiWahn commented 6 years ago

https://github.com/arangodb/arangodb/pull/4116 - this should be the fix - It will be included in th upcoming 3.3.1

sleto-it commented 6 years ago

3.3.1 has been released and it includes the fix corresponding to the one cited in previous comment by @ObiWahn (PR https://github.com/arangodb/arangodb/pull/4115)

Please let us know if you still see this problem. Many thanks,