jacobalberty / unifi-docker

Unifi Docker files
MIT License
2.15k stars 456 forks source link

arm32v7-beta Docker container failing to start with error: `error: exec: "-nodetach": executable file not found in $PATH` #107

Closed ssoriche closed 6 years ago

ssoriche commented 6 years ago

Host operating system

Raspbian 9, 4.9.59, Raspberry Pi 3

What tag are you using

arm32v7-beta

What complete docker command or docker-compose.yml do you use to launch the container (omitting sensitive values)?

docker run -d \
    --restart=unless-stopped \
    --net=host \
    --name=unifi \
    -e TZ='America/New_York' \
    -e RUNAS_UID0=false \
    -e UNIFI_UID=1002 \
    -e UNIFI_GID=1002 \
    -v /var/docks/unifi:/unifi \
    jacobalberty/unifi:arm32v7-beta

What do you expect to happen?

docker to enter a running state.

What actually happens?

docker container continually restarts:

CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS                          PORTS               NAMES
8100639002f3        jacobalberty/unifi:arm32v7-beta   "/usr/local/bin/dock…"   19 minutes ago      Restarting (1) 12 minutes ago                       unifi

docker logs unifi results:

[2018-02-22 15:19:03,010] <docker-entrypoint> Starting unifi controller service.
error: exec: "-nodetach": executable file not found in $PATH
[2018-02-22 15:19:04,096] <docker-entrypoint> WARN: unifi service process ended without being singaled? Check for errors in /unifi/log.
[2018-02-22 15:20:04,920] <docker-entrypoint> Starting unifi controller service.
error: exec: "-nodetach": executable file not found in $PATH
[2018-02-22 15:20:05,994] <docker-entrypoint> WARN: unifi service process ended without being singaled? Check for errors in /unifi/log.

I was successfully running, and noticed that the branch was updated with a new version of UniFi, I followed the upgrade procedure (the one that creates a brand new container) and now when I start the container, I get the results above.

ssoriche commented 6 years ago

It looks like jsvc is no longer bundled and exists as its own package. On a fresh install:

root@3706e1cb35a7:/unifi# command -v jsvc
root@3706e1cb35a7:/unifi# apt-cache search jsvc
root@3706e1cb35a7:/unifi#
root@3706e1cb35a7:/unifi# apt-get update
...
Reading package lists...
root@3706e1cb35a7:/unifi# apt-cache search jsvc
jsvc - Wrapper to launch Java applications as daemons
root@3706e1cb35a7:/unifi# apt-get install jsvc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libcommons-daemon-java
Suggested packages:
  java-virtual-machine
The following NEW packages will be installed:
  jsvc libcommons-daemon-java
...
root@3706e1cb35a7:/unifi# command -v jsvc
/usr/bin/jsvc
jacobalberty commented 6 years ago

Building a new image on the hub that doesn't require jsvc at all. Give it about 30 minutes then try the latest arm beta

ssoriche commented 6 years ago

I've updated with the latest image, now I'm receiving:

[2018-02-27 20:15:27,359] <docker-entrypoint> Starting unifi controller service.
Error: Unable to access jarfile /usr/lib/unifi/lib/ace.jar

The /usr/lib/unifi directory doesn't exist. I didn't see anything in the Dockerfile that pulls the UniFi code and installs it like it does in the master branch.

There is an entry:

/usr/local/bin/docker-build.sh "${PKGURL}"

but /usr/local/bin/docker-build.sh doesn't exist:

root@2949d5b0fc7d:/usr/lib# ls /usr/local/bin/docker-
docker-entrypoint.sh   docker-healthcheck.sh
jacobalberty commented 6 years ago

The Dockerfile should be calling docker-build.sh which pulls unifi and installs it

On Feb 27, 2018 2:22 PM, "Shawn Sorichetti" notifications@github.com wrote:

I've updated with the latest image, now I'm receiving:

[2018-02-27 20:15:27,359] Starting unifi controller service. Error: Unable to access jarfile /usr/lib/unifi/lib/ace.jar

The /usr/lib/unifi directory doesn't exist. I didn't see anything in the Dockerfile that pulls the UniFi code and installs it like it does in the master branch.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jacobalberty/unifi-docker/issues/107#issuecomment-369013355, or mute the thread https://github.com/notifications/unsubscribe-auth/AB42gq-AeBM0AUAV3wiDou5CLuKXXUGUks5tZGP9gaJpZM4SPgsw .

ssoriche commented 6 years ago

Correct it should, the docker-build.sh file however does not exist in the image.

root@2949d5b0fc7d:/usr/lib# ls /usr/local/bin/docker-
docker-entrypoint.sh   docker-healthcheck.sh
jacobalberty commented 6 years ago

Yeah docker-build.sh is supposed to be removed if it successfully installs. I'm going to have to try building the image on my raspberry pi to debug this.

jacobalberty commented 6 years ago

aha I see whats wrong, it's the mongodb packages

jacobalberty commented 6 years ago

Alright, rebuilt with the ubuntu mongodb, not keen on doing that but it should be functional now

ssoriche commented 6 years ago

And that has me back up and running. Thank you.