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

standard_init_linux.go:178: exec user process caused "no such file or directory" #215

Closed
GingerMoon opened this Issue Mar 31, 2017 · 32 comments

Comments

Projects
None yet
@GingerMoon
Copy link

GingerMoon commented Mar 31, 2017

Which lab is it that you're having issues with?
In-container Java Development: IntelliJ Community Edition
https://github.com/docker/labs/blob/master/developer-tools/java-debugging/IntelliJ-README.md

Description

I got the error below after running the command: docker-compose up
webserver_1 | standard_init_linux.go:178: exec user process caused "no such file or directory"

Steps to reproduce the issue, if relevant:
Do the same as described in the link:
https://github.com/docker/labs/blob/master/developer-tools/java-debugging/IntelliJ-README.md
But is blocked at:
Running the application
Open a terminal and go to the application directory. Start the application with docker-compose

docker-compose up

Describe the results you received:
webserver_1 | standard_init_linux.go:178: exec user process caused "no such file or directory"

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Docker version 17.03.1-ce, build c6d412e
Windows10 Enterprise
default

@GingerMoon

This comment has been minimized.

Copy link
Author

GingerMoon commented Mar 31, 2017

Tried with
git clone https://github.com/spara/registration-docker.git --config core.autocrlf=input
Still doesn't work.

@ManoMarks

This comment has been minimized.

Copy link
Contributor

ManoMarks commented Mar 31, 2017

@GingerMoon were you in the root of the application directory when you ran docker-compose up? Here's what it looks like for me:
screen shot 2017-03-31 at 12 35 50 pm

@GingerMoon

This comment has been minimized.

Copy link
Author

GingerMoon commented Apr 1, 2017

@ManoMarks Thank you very much for the prompt response!
git clone https://github.com/spara/registration-docker.git --config core.autocrlf=input
default

@GingerMoon

This comment has been minimized.

Copy link
Author

GingerMoon commented Apr 20, 2017

Hi guys,
Any update?

Regards,

@spara

This comment has been minimized.

Copy link
Contributor

spara commented Apr 26, 2017

Hi GingerMoon,

I was able to replicate your problem which is the LF character in dos/cygwin/Powershell is converted to CRLF when the repo is pushed to github. This occurs on a Windows 10 machine in either the Windows git client or Powershell. Use dos2unix to fix the affected files

dos2unix  ../labs/developer-tools/java-debugging/registration-webserver/tomcat/tomcat-users.xml
dos2unix  ../labs/developer-tools/java-debugging/registration-webserver/tomcat/run.sh

@spara spara closed this Apr 26, 2017

@GingerMoon

This comment has been minimized.

Copy link
Author

GingerMoon commented May 4, 2017

Hi spara,
Thank you for your reply. It doesn't work.
default

@GingerMoon

This comment has been minimized.

Copy link
Author

GingerMoon commented May 4, 2017

@spara

This comment has been minimized.

Copy link
Contributor

spara commented May 4, 2017

Did you rebuild the containers to use the files that were changed?

docker-compose up --build
@GingerMoon

This comment has been minimized.

Copy link
Author

GingerMoon commented May 7, 2017

many thanks!

@meteoric93

This comment has been minimized.

Copy link

meteoric93 commented May 16, 2017

Hi GingerMoon, did you solve the problem?

@spara

This comment has been minimized.

Copy link
Contributor

spara commented May 16, 2017

How to run tutorial in Windows:

dos2unix  ../labs/developer-tools/java-debugging/registration-webserver/tomcat/tomcat-users.xml
dos2unix  ../labs/developer-tools/java-debugging/registration-webserver/tomcat/run.sh
docker-compose up --build
@lwsgh

This comment has been minimized.

Copy link

lwsgh commented May 29, 2017

it's caused by git for windows, line breaks are forced to dos format
step 1: git config --global core.autocrlf false
step 2: delete code and git clone again

@jchavannes

This comment has been minimized.

Copy link

jchavannes commented Jan 3, 2018

I am having similar issue:

standard_init_linux.go:195: exec user process caused "no such file or directory"

This error message doesn't give me much of a clue what might be the error. Been struggling for a few hours to try to fix but don't really even know where to start :(

Btw, I am not using windows and using dos2unix didn't fix it. No matter what I try I get this error...

@spara

This comment has been minimized.

Copy link
Contributor

spara commented Jan 3, 2018

Which operating system are you using and what version of Docker?

@spara spara reopened this Jan 3, 2018

@jchavannes

This comment has been minimized.

Copy link

jchavannes commented Jan 3, 2018

@spara Mac and Docker for Mac, version 17.12.0-ce-rc2-mac41 (21193).

I have a go binary and am using FROM scratch. It works for a hello world binary, but when I put a more complicated one in there I get this error.

@spara

This comment has been minimized.

Copy link
Contributor

spara commented Jan 3, 2018

Can you post your Dockerfile?

@jchavannes

This comment has been minimized.

Copy link

jchavannes commented Jan 3, 2018

FROM scratch
ADD main /
CMD ["/main"]
@spara

This comment has been minimized.

Copy link
Contributor

spara commented Jan 3, 2018

OK, I see the problem. You're probably building your go binary on the Mac and trying to run it in Linux container. Try this when building your go binary:

env GOOS=linux GOARCH=386 go build hello-world.go

@jchavannes

This comment has been minimized.

Copy link

jchavannes commented Jan 3, 2018

I'm building using the golang:1.8 docker container. Like I said, hello world works, I'm only having this issue with a larger project. Also, the binary I'm building works in an Ubuntu container, so I know it's building for linux just fine.

I'm also using CGO_ENABLED=0 and have tried adding -ldflags '-w -extldflags "-static"' to ensure it doesn't have any dependencies.

And even so, if the binary was built incorrectly, why would it give an error that it cannot find the file?

@ManoMarks

This comment has been minimized.

Copy link
Contributor

ManoMarks commented Jan 3, 2018

I don't think this is related to a specific lab we have on this repo @jchavannes, is it? The lab originally referred to was a Java debugging in IntelliJ lab. I realize this comes up second in the Google search for standard_init_linux.go:178: exec user process caused "no such file or directory" docker but if it's not related to one of these labs, I suggest you try the Docker Forums (https://forums.docker.com/) or the Docker Community Slack (https://community.docker.com).

@ManoMarks ManoMarks closed this Jan 3, 2018

@jchavannes

This comment has been minimized.

Copy link

jchavannes commented Jan 4, 2018

Ok, thanks..

@Jacksonary

This comment has been minimized.

Copy link

Jacksonary commented Jan 5, 2018

Hi GingerMoon,I have same trouble with you,have you deal with it?

@Jacksonary

This comment has been minimized.

Copy link

Jacksonary commented Jan 5, 2018

@hafah

This comment has been minimized.

Copy link

hafah commented Jan 12, 2018

@Jacksonary

maybe its the crlf on all your files.

git config --global core.eol lf
git config --global core.autocrlf input
find . -type f -print0 | xargs -0 dos2unix
@anshupitlia

This comment has been minimized.

Copy link

anshupitlia commented Jan 19, 2018

@jchavannes Hey I am facing the same issue, were you able to solve it?

@jchavannes

This comment has been minimized.

Copy link

jchavannes commented Jan 20, 2018

@anshupitlia nope, I was not able to solve it and gave up on FROM scratch containers :/

Btw, I ended up posting this question on docker forums as well - https://forums.docker.com/t/standard-init-linux-go-195-exec-user-process-caused-no-such-file-or-directory/43777

@Jacksonary

This comment has been minimized.

Copy link

Jacksonary commented Jan 20, 2018

@winex01

This comment has been minimized.

Copy link

winex01 commented Feb 3, 2018

@jchavannes i have the same problem. did you solve it?

@oranheim

This comment has been minimized.

Copy link

oranheim commented Feb 9, 2018

Experiencing the same issue with Docker engine 17.12.0-ce on Windows 10. The image that fails is built using FROM openjdk:8-alpine.

@aguilita1

This comment has been minimized.

Copy link

aguilita1 commented Feb 10, 2018

@oranheim I was able to resolve issue by adjusting LF setting with GIT (See below), remove git repo, and then rebuilding from fresh repo.

git config --global core.eol lf
git config --global core.autocrlf input
@oranheim

This comment has been minimized.

Copy link

oranheim commented Feb 12, 2018

@aguilita1 is this related to docker git sources config, or my image's git config?

Will this be fixed in a coming docker release?

@ManoMarks

This comment has been minimized.

Copy link
Contributor

ManoMarks commented Feb 20, 2018

I'm locking this issue going forward. Please migrate discussions/bugs to https://github.com/docker/for-linux, https://github.com/docker/for-mac, https://github.com/docker/for-win or https://github.com/moby/moby
this repo is for Docker labs and the comments here are not directly related to the labs.

@docker docker locked as off topic and limited conversation to collaborators Feb 20, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.