Need Help with new Docker installation OH3.2

I’m attempting to create a new instance of OpenHab on a new server but when I attempt to start the container with empty addons, config, and userdata folders it fails with a “/entrypoint: line 100: exec: not found” error message.

I’ve had OH3 running on a different Synology box for at least a month using the same configuration. I’m using a Docker Create script file to create the containers and have verified that they are the same. The log files seem similar (accounting for the folders under conf & userdata do not exist in the new installation) except for near the end of the log.

Tail of log from working installation:

++ IFS=' '
++ echo gosu openhab tini -s ./
+ '[' 'gosu openhab tini -s ./' == 'gosu openhab tini -s ./' ']'
+ command=($@ server)
+ exec gosu openhab tini -s ./ server
Launching the openHAB runtime...

Tail of log from new (failing) installation:

++ IFS=' '
++ echo $'\r'
+ '[' $'\r' == 'gosu openhab tini -s ./' ']'
+ exec $'\r'
/entrypoint: line 100: exec: not found

I have verified the folders are in place, the user & group have the same privileges, etc.

Any ideas how to fix this or what else to look at? I’m stumped.

Thanks, Jim

  • Platform information:
    • Hardware: Synology RS1221+
    • OS: DSM 7.0.1-42218 Update 3
      Docker 20.10.3-1239
    • Java Runtime Environment: Java 11
    • openHAB version: 3.2.0

It seems to replace the default container command with something that looks like a Windows new line char?

Thanks for helping me with this.

I know very little about Linux and Docker, but my guess is that the “\r” is a variable name that is not being populated. It seems to appear several times in the log where things go haywire (beginning with the echo in the above snips).

After some searching I found the “docker container ls” command the entry point on the working container is

"/entrypoint gosu openhab tini -s ./"

bur for the non-working container the entry point is

"/entrypoint \r"

I tried adding an --entrypoint parameter to the Docker Create but the “\r” seems to be persistant.

"/entrypoint gosu openhab tini -s ./ \r"

I’ve tried every different permutation of the --entrypoint parameter that I could think of but I haven’t found anything that worked.

Thanks again for your help.


Did you also check that your script uses Unix (\n) line endings and not Windows (\r\n) line endings? :slightly_smiling_face: :mag_right:

That it!!!

I’m using a script file with continuation characters but I left a CRLF at the end of the Docker Create command. Changing that to just a LF fixed it.

Can’t believe I’ve been fighting this for five hours over a simple CR character.

Thanks again for you help

1 Like

Great! These line ending issues can be hard to spot if you cannot even see them. :slight_smile: