{"Status":"unhealthy","FailingStreak":8333,"Log":[{"Start":"2020-09-21T04:55:17.372930056-04:00","End":"2020-09-21T04:55:17.474724042-04:00","ExitCode":1,"Output":"/bin/sh: 1: nc: not found\n"},{"Start":"2020-09-21T04:55:47.478806438-04:00","End":"2020-09-21T04:55:47.581083314-04:00","ExitCode":1,"Output":"/bin/sh: 1: nc: not found\n"},{"Start":"2020-09-21T04:56:17.584939398-04:00","End":"2020-09-21T04:56:17.688484183-04:00","ExitCode":1,"Output":"/bin/sh: 1: nc: not found\n"},{"Start":"2020-09-21T04:56:47.692954492-04:00","End":"2020-09-21T04:56:47.794798131-04:00","ExitCode":1,"Output":"/bin/sh: 1: nc: not found\n"},{"Start":"2020-09-21T04:57:17.7982906-04:00","End":"2020-09-21T04:57:17.901514048-04:00","ExitCode":1,"Output":"/bin/sh: 1: nc: not found\n"}]}
Then connect to the nginx container and install netcat
apt-get install netcat
This is not normal because netcat should be installed already (nginx.dockerfile) and it worked when you executed it manually (may be I am mistaken and you should install netcat on the host instead of the container)
RUN apt-get update; apt-get install -y openssl netcat nginx-extras lua-zlib
May be there is no link between nc and netcat, so you might want to update the health check in the docker-composer (line 40) but I doubt it
Did you try to rebuild everything after you change the EOL? (this will remove all container and image, be careful if you have a bad internet connectivity, that means downloading them all over again)
: apt-get install netcat
: Setting up netcat (1.10-41.1) ...
: RUN apt-get update; apt-get install -y openssl netcat nginx-extras lua-zlib
: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
After changing those lines and also replacing EOL as suggested by @aankrah (sed 's/\r$//' nginx.dockerfile) I am still getting an error for nginx build step:
Hello @tertek,
I'm sorry to hear you're facing an error. However, your post in its current state does not do much to adequately equip those who might be able to help you. Kindly furnish us with the version of Central you are installing. The OS you are installing on and what you might have already tried to solve your issue.
I am certain the community would have lots of suggestions when we know exactly what your situation is.
Hey @aankrah ,
Thank you for your quick response. Actually, I could resolve the issue in the meanwhile. I had to replace EOL for the following files as well:
Edit: Turns out that later when starting ODK more *.sh files have to be fixed. I have written a short Windows command that fixes all relevant files. It is part of a small guide Installing ODK Central on Windows 10
I have added /bin/sh in nginx.dockerfile but how do I do this "Then replace the Windows EOL by linux EOLin all the files (Git wrongly configured to use CRLF instead of LF when writing the files)"
i need help please! I have been trying to resolve this error for past 2 weeks.
Step 3/19 : RUN files/prebuild/write-version.sh
---> Running in 37743973b02e
/bin/sh: 1: files/prebuild/write-version.sh: not found
ERROR: Service 'nginx' failed to build : The command '/bin/sh -c files/prebuild/write-version.sh' returned a non-zero code: 127