Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: exec: "tini": executable file not found in $PATH #409

Closed
axi92 opened this issue Nov 19, 2022 · 8 comments
Closed

error: exec: "tini": executable file not found in $PATH #409

axi92 opened this issue Nov 19, 2022 · 8 comments
Labels
awaiting feedback bug stale As soon as a PR is marked stale, it can be removed 6 months later.

Comments

@axi92
Copy link

axi92 commented Nov 19, 2022

Summary

I tried to start it and it says it cant find tini.
All other containers are running smooth. Zigbee2MQTT, my mqtt server, unify controller, ...

Expected Behavior

Start openhab

Current Behavior

I start it on my linux/arm/v7 nas with this:
docker run --name openhab1 -ti --rm -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -e CRYPTO_POLICY=unlimited --entrypoint=/bin/bash openhab/openhab:3.3.0-debian
the output that I get is:

+ IFS='
        '
++ ls -d /usr/lib/jvm/temurin-11-jdk-armhf
+ export JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-armhf
+ JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-armhf
+ '[' limited = unlimited ']'
+ /etc/ca-certificates/update.d/adoptium-cacerts
/etc/ssl/certs/adoptium/cacerts successfully populated.
+ capsh --print
+ grep -E Current:.+,cap_net_admin,cap_net_raw,.+
+ rm -f /openhab/runtime/instances/instance.properties
+ rm -f /openhab/userdata/tmp/instances/instance.properties
+ NEW_USER_ID=9001
+ NEW_GROUP_ID=9001
+ echo 'Starting with openhab user id: 9001 and group id: 9001'
Starting with openhab user id: 9001 and group id: 9001
+ id -u openhab
+ initialize_volume /openhab/conf /openhab/dist/conf
+ volume=/openhab/conf
+ source=/openhab/dist/conf
++ ls -A /openhab/conf
+ '[' -z 'automation
html
icons
items
persistence
rules
scripts
services
sitemaps
sounds
things
transform' ']'
+ initialize_volume /openhab/userdata /openhab/dist/userdata
+ volume=/openhab/userdata
+ source=/openhab/dist/userdata
++ ls -A /openhab/userdata
+ '[' -z 'backup
cache
config
etc
jsondb
kar
logs
marketplace
persistence
secrets
tmp' ']'
++ cmp /openhab/userdata/etc/version.properties /openhab/dist/userdata/etc/version.properties
+ '[' '!' -z ']'
+ chown -R openhab:openhab /openhab
+ sync
+ '[' -d /etc/cont-init.d ']'
+ sync
+ '[' true == false ']'
+ exec gosu openhab tini -s ./start.sh
error: exec: "tini": executable file not found in $PATH
+ IFS='
        '
++ ls -d /usr/lib/jvm/temurin-11-jdk-armhf
+ export JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-armhf
+ JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-armhf
+ '[' limited = unlimited ']'
+ /etc/ca-certificates/update.d/adoptium-cacerts
/etc/ssl/certs/adoptium/cacerts successfully populated.
+ grep -E Current:.+,cap_net_admin,cap_net_raw,.+
+ capsh --print
+ rm -f /openhab/runtime/instances/instance.properties
+ rm -f /openhab/userdata/tmp/instances/instance.properties
+ NEW_USER_ID=9001
+ NEW_GROUP_ID=9001
+ echo 'Starting with openhab user id: 9001 and group id: 9001'
Starting with openhab user id: 9001 and group id: 9001
+ id -u openhab
+ initialize_volume /openhab/conf /openhab/dist/conf
+ volume=/openhab/conf
+ source=/openhab/dist/conf
++ ls -A /openhab/conf
+ '[' -z 'automation
html
icons
items
persistence
rules
scripts
services
sitemaps
sounds
things
transform' ']'
+ initialize_volume /openhab/userdata /openhab/dist/userdata
+ volume=/openhab/userdata
+ source=/openhab/dist/userdata
++ ls -A /openhab/userdata
+ '[' -z 'backup
cache
config
etc
jsondb
kar
logs
marketplace
persistence
secrets
tmp' ']'
++ cmp /openhab/userdata/etc/version.properties /openhab/dist/userdata/etc/version.properties
+ '[' '!' -z ']'
+ chown -R openhab:openhab /openhab
+ sync
+ '[' -d /etc/cont-init.d ']'
+ sync
+ '[' true == false ']'
+ exec gosu openhab tini -s ./start.sh
error: exec: "tini": executable file not found in $PATH

Possible Solution

I tried to override the entrypoint with a bash and then "/entrypoint" manualy with the following "gosu openhab tini -s ./start.sh" but it still fails with an error:

root@83828ac7acf5:/openhab#  gosu openhab /usr/bin/tini -s ./start.sh
error: exec: "/usr/bin/tini": stat /usr/bin/tini: permission denied

Then I tried to start it with root with just ./start.sh and it works...
So the only workaround for this is to override the cmd with ./start.sh that makes the sad part that it runs with root.

Steps to Reproduce

  1. Start it with the command above

Context

This image was running for weeks, last night it went down and since then I was not able to start it again

Your Environment

Qnap NAS

Image

  • openHAB version: 3.3.0
  • Image tag used: 3.3.0-debian

Docker Host

  • Operating System: QTS 5.0.1 (20221022)
  • Docker Version: 20.10.17-qnap5
  • Kernel Version: 4.2.8
  • Architecture: armv7l

Configuration

Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 5
  Running: 4
  Paused: 0
  Stopped: 1
 Images: 11
 Server Version: 20.10.17-qnap5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay qnet
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux kata-runtime runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc version: v1.1.2-0-ga916309f
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.2.8
 Operating System: QTS 5.0.1 (20221022)
 OSType: linux
 Architecture: armv7l
 CPUs: 2
 Total Memory: 7.976GiB
 Name: NAS19149D
 ID: QC5Y:KMEK:3U2J:AXYG:CQJD:QS32:WTHA:52QG:EXZS:56BQ:KBJJ:MANX
 Docker Root Dir: /share/CACHEDEV1_DATA/Container/container-station-data/lib/docker
 Debug Mode: true
  File Descriptors: 224
  Goroutines: 123
  System Time: 2022-11-19T22:47:39.46303074+01:00
  EventsListeners: 1
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
 Default Address Pools:
   Base: 172.29.0.0/16, Size: 22
@axi92 axi92 added the bug label Nov 19, 2022
@wborn
Copy link
Member

wborn commented Nov 21, 2022

If it works like described in the docs using the default entrypoint... and all you want it is running everything as non-root, this issue duplicates #353.

@axi92
Copy link
Author

axi92 commented Nov 21, 2022

I did not change anything I just want to run the openhab docker file as it is without changing its entry point or cmd.
But that gives me the error above. As you see in the logs I run it as designed with exec gosu openhab tini -s ./start.sh what the default cmd is.

I read the #353 and I dont think it duplicates my ticket.
I have the problem that it ran a long time with no issues. And suddenly it stops working and I have no clue why.

The only workaround for me was to run it as root, that way it still works.

@wborn
Copy link
Member

wborn commented Nov 21, 2022

If it worked before then maybe the cached Docker image got corrupt somehow? I'd try to delete the cached image and make it redownload a fresh copy.

@axi92
Copy link
Author

axi92 commented Nov 22, 2022

I already tried pulling the image new and also with the M4 image. Same output.
I could imagine that it is a docker issue? But I never had this.
But why would a container stop working just out of nowhere?
I work a lot with docker but never had such an issue.

@wborn
Copy link
Member

wborn commented Nov 22, 2022

I could imagine that it is a docker issue? But I never had this.
But why would a container stop working just out of nowhere?

If you update the Docker engine on your host OS a perfectly working container can stop working from one day to another.
Does the container work on other Docker hosts?

@stale
Copy link

stale bot commented Feb 27, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale As soon as a PR is marked stale, it can be removed 6 months later. label Feb 27, 2023
@axi92
Copy link
Author

axi92 commented Mar 13, 2023

I moved my openhab container to a zimaboard. So I dont have to deal with the qnap arm weird docker anymore =)

@axi92 axi92 closed this as completed Mar 13, 2023
@wborn
Copy link
Member

wborn commented Mar 13, 2023

That board looks nice, at a good price and very compatible due to x86. 👍 To get it working on the QNAP, their community might have more answers on how to handle any QNAP Docker weirdness. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback bug stale As soon as a PR is marked stale, it can be removed 6 months later.
Projects
None yet
Development

No branches or pull requests

2 participants