Cannot start container due to /var/lock missing in container

I get the error below when running openhab container latest-alpine.

2024-12-21 15:41:49.297892+01:00+ chown root:uucp /var/lock 
2024-12-21 15:41:49.298636+01:00chown: /var/lock: No such file or directory

Any ideas?

This is the on that still runs:

runtimeInfo:
  version: 4.1.0
  buildString: "Build #3799"
locale: nl-NL
systemInfo:
  configFolder: /openhab/conf
  userdataFolder: /openhab/userdata
  logFolder: /openhab/userdata/logs
  javaVersion: 17.0.9
  javaVendor: Alpine
  osName: Linux
  osVersion: 6.6.32-production+truenas
  osArchitecture: amd64
  availableProcessors: 32
  freeMemory: 545659000
  totalMemory: 1526726656
  uptime: 188
  startLevel: 70
addons:
  ...

Do you get the same error with the Debian container? I’ve no ideas. /var/lock is a system OS folder. I’m not seeing this write but I’m running Debian.

In a pinch you can mount a volume or, if the error occurs late enough mount a script to run before OH does (see the docs). to create that folder. But those are work arounds at best and I suspect the later won’t work anyway.

Ultimately an issue will need to be filled but I’m not sure there’s enough info here to file it.

same here. It only occurs with the alpine container. The Debian container works without problems

I will submit a bug report.

Seems to be an Alpine issue:

https://github.com/alpinelinux/docker-alpine/issues/433

1 Like

Switching to the Debian container worked.

@rlkoshak

2 Likes

The openHAB 4.3.0 and 5.0.0-SNAPSHOT Alpine images with a workaround can now be pulled from Docker Hub.

2 Likes

Works now. Great job :+1:

1 Like