What does "ERRO[0000] mkdir /var/lib/mender: file exists module=main" means?

Hi,
I’m trying to perform standalone mender update from a USB Pendrive.

I have put the * .mender artifact inside the Pendrive and run the below command:
mender -debug -install /run/media/sda1/*.mender

But, I’m getting the below error:
ERRO[0000] mkdir /var/lib/mender: file exists module=main

Could you please let me know what this error means?

Which version of the Mender client? What does ls -alh /var/lib give you?

The client version:
$ mender -version
2.0.0-dirty
runtime: go1.9.7

ls -alh /var/lib 
drwxr-xr-x   10 root     root         220 Oct 11 12:41 .
drwxr-xr-x    8 root     root        1.0K Jan  1  1970 ..
drwxr-xr-x    2 messageb messageb      60 Oct 11 12:41 dbus
drwxr-xr-x    2 root     root          40 Oct 11 12:36 dnf
drwx------    2 root     root          40 Oct 11 12:41 machines
lrwxrwxrwx    1 root     root          12 Oct 11 12:41 mender -> /data/mender
drwxr-xr-x    2 root     root          40 Sep 18 10:14 misc
drwx------    3 root     root          60 Oct 11 12:41 private
drwxr-xr-x    2 root     root         440 Jan  1  1970 rpm
drwx--x--x    3 root     root          60 Jan  1  1970 sudo
drwxr-xr-x    3 root     root         100 Oct 11 12:41 systemd

Why is the client version dirty? For this reason it is hard to comment.

Looking at the code,

I can not determinate why it would fail here. Do you have the correct permissions? Multiple clients running?

Thank you @mirzak for your reply.
I’m using sources/meta-mender/meta-mender-core/recipes-mender/mender/mender_2.0.0.bb with SRC_URI = "git://github.com/mendersoftware/mender;protocol=https;branch=2.0.x". Even I don’t know why the dirty is coming at the end of the 2.0.0 version! Is there any reason for it?

Regarding the permission, I’m using a read-only file system and only one client is running on the target platform. Whether it will work on a read-only file system? :thinking:

Does the /data/mender directory exist?

1 Like

I do not think that this should matter, because /data should be a mount point to a separate partition that should not be read-only. Or this not the case?

1 Like

My bad, somehow, the /data/mender directory didn’t populated on the build which I used. This is the reason for the mentioned error :zipper_mouth_face: