Something is wrong with the backup: ERROR 23


#1

Upgraded our box to latest version and now have this error sent to my email:

Something is wrong with the backup: ERROR 23 . Another instance is already running with this archive directory . If you are sure that this is the only instance running you may delete . the following lockfile and run the command again :
. /home/user-data/backup/cache/6a5c5177c8263a9fb337605b1b1fd49a/lockfile.lock

Is there any way to confirm multiple instances are not running?


#2

using htop or top to confirm, you can also check log files and such, but most reliable way is top.


#3

I am having same issue.

Something is wrong with the backup: ERROR 23
. Another instance is already running with this archive directory
. If you are sure that this is the only instance running you may delete
. the following lockfile and run the command again :
. /home/user-data/backup/cache/77bb3fb2afb5975d26aa819871b4bd44/lockfile.lock

What is process I should take to correct issue? I am not sure what @murgero means by the following: [quote=“murgero, post:2, topic:1284”]
htop or top to confirm
[/quote]

Plus, what am I looking for and what do I do after?


#4

PID should be stored in the Lock file quoted about.


#5

I appreciate the quick reply.

Can you dumb it down for me…? I have no idea what pid htop or anything else is. Assuming I should nano into the lock file and look for something? Should I delete something? Run some command? I’m lost…


#6

pid means Process ID
htop and top are tools that show you what processes are running (they also give information about what is using the most CPU and memory, for example)

Simply type “top” into a command prompt. The first column you see is a Process ID. This is the list of processes you’d need to inspect.

In the lock file, if you see a Process ID and you use top to confirm it is not running, then you can delete the lockfile.lock and then backups should proceed as normal.

When I have trouble with my backups, because I only have a few mailboxes, I simply delete the entire backups folder and run:

mailinabox/management/backup.py

This of course deletes any of the lockfiles mentioned. This script kicks off the backups and will regenerate them for you in full if you do indeed delete the entire folder.

Hopefully this helps you some?


#8

I also get this when first logging into server.
/usr/bin/xauth: error in locking authority file /root/.Xauthority

additionally, I have had periodic: “something went wrong” when running status check from web interface.

this is result of running “top”:

top - 07:43:38 up 10:04, 1 user, load average: 0.00, 0.01, 0.05
Tasks: 122 total, 1 running, 121 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.2 us, 0.2 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 3081988 total, 685444 used, 2396544 free, 59576 buffers
KiB Swap: 0 total, 0 used, 0 free. 226524 cached Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1286 root 20 0 996872 41776 5752 S 0.3 1.4 0:07.51 mailinabox-daem
1 root 20 0 33496 2836 1444 S 0.0 0.1 0:01.66 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
7 root 20 0 0 0 0 S 0.0 0.0 0:01.07 rcu_sched
8 root 20 0 0 0 0 S 0.0 0.0 0:00.71 rcuos/0
9 root 20 0 0 0 0 S 0.0 0.0 0:00.49 rcuos/1
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/1
13 root rt 0 0 0 0 S 0.0 0.0 0:00.06 migration/0
14 root rt 0 0 0 0 S 0.0 0.0 0:00.19 watchdog/0
15 root rt 0 0 0 0 S 0.0 0.0 0:00.16 watchdog/1
16 root rt 0 0 0 0 S 0.0 0.0 0:00.05 migration/1
17 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/1
18 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0
19 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H
20 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
21 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
22 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
23 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback
24 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd
25 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
26 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/u5:0
27 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
28 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ata_sff
29 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khubd
30 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 md
31 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 devfreq_wq
32 root 20 0 0 0 0 S 0.0 0.0 0:03.56 kworker/0:1
34 root 20 0 0 0 0 S 0.0 0.0 0:00.04 khungtaskd
35 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0
36 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 vmstat
37 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd
38 root 39 19 0 0 0 S 0.0 0.0 0:00.31 khugepaged
39 root 20 0 0 0 0 S 0.0 0.0 0:00.00 fsnotify_mark
40 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ecryptfs-kthrea
41 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 crypto
53 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kthrotld
55 root 20 0 0 0 0 S 0.0 0.0 0:00.00 vballoon
56 root 20 0 0 0 0 S 0.0 0.0 0:00.73 kworker/1:1
57 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
58 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
79 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 deferwq
80 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 charger_manager
125 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kpsmoused
128 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/0:2
141 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/u5:2
142 root 20 0 0 0 0 S 0.0 0.0 0:00.00 jbd2/vda1-8
143 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ext4-rsv-conver
319 root 20 0 19472 660 472 S 0.0 0.0 0:00.11 upstart-udev-br
333 root 20 0 51460 1780 1004 S 0.0 0.1 0:00.07 systemd-udevd

root@box:/home/user-data/backup/cache/77bb3fb2afb5975d26aa819871b4bd44# ls -al
total 1195840
drwxr-xr-x 2 root root 24576 Aug 11 03:04 .
drwxr-xr-x 3 root root 4096 Jan 22 2016 …
-rw-r–r-- 2 root root 0 Aug 11 03:00 box.fwla.com.MainThread-5426
-rw------- 1 root root 78866 Jul 11 05:48 duplicity-full.20160711T100007Z.manifest
-rw------- 1 root root 57342 Aug 11 14:15 duplicity-full.20160811T100022Z.manifest.part
-rw------- 1 root root 576148140 Jul 11 05:49 duplicity-full-signatures.20160711T100007Z.sigtar.gz
-rw------- 1 root root 568795136 Aug 11 14:15 duplicity-full-signatures.20160811T100022Z.sigtar.part
-rw------- 1 root root 233 Jul 12 03:01 duplicity-inc.20160711T100007Z.to.20160712T100014Z.manifest
-rw------- 1 root root 233 Jul 13 03:00 duplicity-inc.20160712T100014Z.to.20160713T100021Z.manifest
-rw------- 1 root root 233 Jul 14 03:01 duplicity-inc.20160713T100021Z.to.20160714T100007Z.manifest
-rw------- 1 root root 203 Jul 15 03:00 duplicity-inc.20160714T100007Z.to.20160715T100001Z.manifest
-rw------- 1 root root 203 Jul 16 03:00 duplicity-inc.20160715T100001Z.to.20160716T100009Z.manifest
-rw------- 1 root root 229 Jul 17 03:00 duplicity-inc.20160716T100009Z.to.20160717T100002Z.manifest
-rw------- 1 root root 203 Jul 18 03:00 duplicity-inc.20160717T100002Z.to.20160718T100006Z.manifest
-rw------- 1 root root 538 Jul 19 03:00 duplicity-inc.20160718T100006Z.to.20160719T100002Z.manifest
-rw------- 1 root root 181 Jul 20 03:00 duplicity-inc.20160719T100002Z.to.20160720T100007Z.manifest
-rw------- 1 root root 485 Jul 21 03:02 duplicity-inc.20160720T100007Z.to.20160721T100008Z.manifest
-rw------- 1 root root 203 Jul 22 03:01 duplicity-inc.20160721T100008Z.to.20160722T100004Z.manifest
-rw------- 1 root root 229 Jul 23 03:01 duplicity-inc.20160722T100004Z.to.20160723T100008Z.manifest
-rw------- 1 root root 229 Jul 24 03:00 duplicity-inc.20160723T100008Z.to.20160724T100002Z.manifest
-rw------- 1 root root 177 Jul 25 03:00 duplicity-inc.20160724T100002Z.to.20160725T100006Z.manifest
-rw------- 1 root root 443 Jul 26 03:01 duplicity-inc.20160725T100006Z.to.20160726T100012Z.manifest
-rw------- 1 root root 202 Jul 27 03:00 duplicity-inc.20160726T100012Z.to.20160727T100007Z.manifest
-rw------- 1 root root 206 Jul 28 03:00 duplicity-inc.20160727T100007Z.to.20160728T100009Z.manifest
-rw------- 1 root root 203 Jul 29 03:01 duplicity-inc.20160728T100009Z.to.20160729T100003Z.manifest
-rw------- 1 root root 2304 Jul 30 03:08 duplicity-inc.20160729T100003Z.to.20160730T100008Z.manifest
-rw------- 1 root root 206 Jul 31 03:03 duplicity-inc.20160730T100008Z.to.20160731T100003Z.manifest
-rw------- 1 root root 210 Aug 1 03:00 duplicity-inc.20160731T100003Z.to.20160801T100002Z.manifest
-rw------- 1 root root 209 Aug 2 03:00 duplicity-inc.20160801T100002Z.to.20160802T100002Z.manifest
-rw------- 1 root root 207 Aug 3 03:00 duplicity-inc.20160802T100002Z.to.20160803T100010Z.manifest
-rw------- 1 root root 209 Aug 4 03:02 duplicity-inc.20160803T100010Z.to.20160804T100021Z.manifest
-rw------- 1 root root 203 Aug 5 03:03 duplicity-inc.20160804T100021Z.to.20160805T100005Z.manifest
-rw------- 1 root root 202 Aug 6 03:01 duplicity-inc.20160805T100005Z.to.20160806T100005Z.manifest
-rw------- 1 root root 229 Aug 7 03:00 duplicity-inc.20160806T100005Z.to.20160807T100002Z.manifest
-rw------- 1 root root 229 Aug 8 03:00 duplicity-inc.20160807T100002Z.to.20160808T100003Z.manifest
-rw------- 1 root root 202 Aug 9 03:01 duplicity-inc.20160808T100003Z.to.20160809T100003Z.manifest
-rw------- 1 root root 203 Aug 10 03:01 duplicity-inc.20160809T100003Z.to.20160810T100008Z.manifest
-rw------- 1 root root 2469870 Jul 12 03:01 duplicity-new-signatures.20160711T100007Z.to.20160712T100014Z.sigtar.gz
-rw------- 1 root root 1388971 Jul 13 03:00 duplicity-new-signatures.20160712T100014Z.to.20160713T100021Z.sigtar.gz
-rw------- 1 root root 2542983 Jul 14 03:01 duplicity-new-signatures.20160713T100021Z.to.20160714T100007Z.sigtar.gz
-rw------- 1 root root 1350048 Jul 15 03:00 duplicity-new-signatures.20160714T100007Z.to.20160715T100001Z.sigtar.gz
-rw------- 1 root root 922540 Jul 16 03:00 duplicity-new-signatures.20160715T100001Z.to.20160716T100009Z.sigtar.gz
-rw------- 1 root root 968370 Jul 17 03:00 duplicity-new-signatures.20160716T100009Z.to.20160717T100002Z.sigtar.gz
-rw------- 1 root root 909569 Jul 18 03:00 duplicity-new-signatures.20160717T100002Z.to.20160718T100006Z.sigtar.gz
-rw------- 1 root root 3281179 Jul 19 03:00 duplicity-new-signatures.20160718T100006Z.to.20160719T100002Z.sigtar.gz
-rw------- 1 root root 2547417 Jul 20 03:00 duplicity-new-signatures.20160719T100002Z.to.20160720T100007Z.sigtar.gz
-rw------- 1 root root 4342028 Jul 21 03:02 duplicity-new-signatures.20160720T100007Z.to.20160721T100008Z.sigtar.gz
-rw------- 1 root root 2445527 Jul 22 03:01 duplicity-new-signatures.20160721T100008Z.to.20160722T100004Z.sigtar.gz
-rw------- 1 root root 1477613 Jul 23 03:01 duplicity-new-signatures.20160722T100004Z.to.20160723T100008Z.sigtar.gz
-rw------- 1 root root 637662 Jul 24 03:00 duplicity-new-signatures.20160723T100008Z.to.20160724T100002Z.sigtar.gz
-rw------- 1 root root 1560200 Jul 25 03:00 duplicity-new-signatures.20160724T100002Z.to.20160725T100006Z.sigtar.gz
-rw------- 1 root root 4187877 Jul 26 03:01 duplicity-new-signatures.20160725T100006Z.to.20160726T100012Z.sigtar.gz
-rw------- 1 root root 2807757 Jul 27 03:00 duplicity-new-signatures.20160726T100012Z.to.20160727T100007Z.sigtar.gz
-rw------- 1 root root 1572580 Jul 28 03:00 duplicity-new-signatures.20160727T100007Z.to.20160728T100009Z.sigtar.gz
-rw------- 1 root root 1283203 Jul 29 03:01 duplicity-new-signatures.20160728T100009Z.to.20160729T100003Z.sigtar.gz
-rw------- 1 root root 22335405 Jul 30 03:08 duplicity-new-signatures.20160729T100003Z.to.20160730T100008Z.sigtar.gz
-rw------- 1 root root 1416534 Jul 31 03:03 duplicity-new-signatures.20160730T100008Z.to.20160731T100003Z.sigtar.gz
-rw------- 1 root root 962065 Aug 1 03:00 duplicity-new-signatures.20160731T100003Z.to.20160801T100002Z.sigtar.gz
-rw------- 1 root root 2838050 Aug 2 03:00 duplicity-new-signatures.20160801T100002Z.to.20160802T100002Z.sigtar.gz
-rw------- 1 root root 3177783 Aug 3 03:00 duplicity-new-signatures.20160802T100002Z.to.20160803T100010Z.sigtar.gz
-rw------- 1 root root 3166266 Aug 4 03:02 duplicity-new-signatures.20160803T100010Z.to.20160804T100021Z.sigtar.gz
-rw------- 1 root root 2080753 Aug 5 03:03 duplicity-new-signatures.20160804T100021Z.to.20160805T100005Z.sigtar.gz
-rw------- 1 root root 1613118 Aug 6 03:01 duplicity-new-signatures.20160805T100005Z.to.20160806T100005Z.sigtar.gz
-rw------- 1 root root 745701 Aug 7 03:00 duplicity-new-signatures.20160806T100005Z.to.20160807T100002Z.sigtar.gz
-rw------- 1 root root 663356 Aug 8 03:00 duplicity-new-signatures.20160807T100002Z.to.20160808T100003Z.sigtar.gz
-rw------- 1 root root 1970060 Aug 9 03:01 duplicity-new-signatures.20160808T100003Z.to.20160809T100003Z.sigtar.gz
-rw------- 1 root root 1567085 Aug 10 03:01 duplicity-new-signatures.20160809T100003Z.to.20160810T100008Z.sigtar.gz
-rw-r–r-- 2 root root 0 Aug 11 03:00 lockfile.lock
root@box:/home/user-data/backup/cache/77bb3fb2afb5975d26aa819871b4bd44# rm lockfile.lock
rm: cannot remove ‘lockfile.lock’: Read-only file system

So, I tried to delete lockfile.lock (nano shows it is blank). I am not positive about earlier replies but it seems that I should/can delete ALL the above files (.gz) in this cache folder and they will rebuild.

or should I rm: /home/user-data/backup/
drwxr-xr-x 4 root root 4096 Jan 22 2016 .
drwxr-xr-x 8 user-data user-data 4096 Jan 21 2016 …
drwxr-xr-x 3 root root 4096 Jan 22 2016 cache
drwxr-xr-x 2 user-data root 86016 Aug 11 14:15 encrypted
-rw------- 1 root root 2775 Jan 21 2016 secret_key.txt

I am a bit lost, even with the previous comments.

here is me trying to run apt-get upgrade/update and a response I’ve never seen before.
root@box:/# sudo su -
root@box:~# apt-get upgrade
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.
root@box:~# cd /
root@box:/# apt-get update
Ign http://archive.ubuntu.com trusty InRelease
Ign http://ppa.launchpad.net trusty InRelease
Ign http://ppa.launchpad.net trusty Release.gpg
Hit http://ppa.launchpad.net trusty Release
W: Not using locking for read only lock file /var/lib/apt/lists/lock
E: Couldn’t create temporary file to work with /var/lib/apt/lists/ppa.launchpad.net_mail-in-a-box_ppa_ubuntu_dists_trusty_Release - mkstemp (30: Read-only file system)
W: Not using locking for read only lock file /var/lib/dpkg/lock

In this mess of an issue, I do-upgrade-blah-blah command and it upgraded me to ubuntu 16. OOPS. FML. - I have since, created a new server instance (this time on digitalocean instead of vultr) and am in the process of rsync -asv IN WHICH, I am noticing it is sending the user-data/backup/encrypted/duplicity… and lockfile that is in the cache folder. assuming it will send with it the same problems as i had on the old server.


#9

If it were me with this issue, I would delete the backup folder:
rm -rf /home/user-data/backup/

Then I would rerun the mailinabox command:
sudo mailinabox

To get your first full backup, assuming you have backups configured to store on the box, you can then run:
sudo mailinabox/management/backup.py

This command will rebuild the .gz files you reference and hopefully having deleted the entire backup folder, your locking issue will be resolved. Keep in mind you will also have a new secret_key.txt in /home/user-data/backup which you need to backup to a safe location in order to use the encrypted backups you’ve just regenerated.


#10

I haven’t been able to create backups because of an error, so I tried what you suggested, deleted backup folder, re-ran sudo mailinabox, but when I do “sudo mailinabox/management/backup.py”, I get:

root@box:/# sudo mailinabox/management/backup.py
sudo: mailinabox/management/backup.py: command not found

And if I save backup settings in the admin, then I get an alert stating " Backup configuration" OK, but then nothing happens, and I have no backup in the encrypted folder, nor the list below the admin config area.


#11

Sorry, I ran the command in the wrong directory :unamused:
The .gz files are now being generated in the encrypted folder!

And now, I finally have a line under available backups, thanks to your suggestion.
Thanks a lot!