LiveOverflow / PwnAdventure3

PwnAdventure3 Server
GNU General Public License v3.0
632 stars 136 forks source link

Docker on Windows: exec user process caused "no such file or directory" #11

Open DanTup opened 6 years ago

DanTup commented 6 years ago

I followed the instructions on Windows.. I had to use 7zip to extract the .tar.gz, and initially I put it in a folder named pwn3 but that failed to build. So I moved the contents (client/server folders) up to the main folder and now I get this:

PS M:\Games\PwnAdventure3\DockerServer> docker-compose.exe up
Starting dockerserver_init_1 ... done
Starting dockerserver_master_1 ... done
Starting dockerserver_game_1   ... done
Attaching to dockerserver_init_1, dockerserver_master_1, dockerserver_game_1
: No such file or directory
game_1    | standard_init_linux.go:190: exec user process caused "no such file or directory"
dockerserver_master_1 exited with code 127
dockerserver_init_1 exited with code 0
dockerserver_game_1 exited with code 1

I'll post back if I figure out what's up, but I thought it worth having here in case others hit the same issue. There are lots of suggestions online about what this might be (from missing Bash, to Linux newlines) but I don't think any of those are it.

DanTup commented 6 years ago

Hmmm, when I extract the .tar.gz, the server/GameServer folder is completely empty. I guess that's the issue?

Maybe not, looks like it gets run from /opt/pwn3/client/PwnAdventure3_Data/PwnAdventure3/PwnAdventure3/Binaries/Linux/ && ./PwnAdventure3Server :/

DanTup commented 6 years ago

Ok, I think I've gotten further... I did this:

git config core.autocrlf input
(((deleted the files from the repo; wasn't sure if git reset would reset the newlines)))
git reset --hard
docker-compose.exe build --no-cache
docker-compose.exe up

Now I'm getting loads of spam, including output from the database creation, so I think it's working..

DanTup commented 6 years ago

Actually, I'm not sure it fixed it... I've spent the time since trying to get static IPs assigned (to go in my hosts file) (saga here) but now I've noticed it's doing this (either still, or again):

game_1    | bash: line 0: cd: /opt/pwn3/client/PwnAdventure3_Data/PwnAdventure3/PwnAdventure3/Binaries/Linux/: No such file or directory
dockerserver_game_1 exited with code 1

I'm giving up for the day; but when I come back to this I think I'm going to just make a VM the old fashioned way =D

Stegnerd commented 5 years ago

I seem to be getting something similar to this. Anyone have any luck with it?

(venv) PS D:\Programming\Python\flask\testdriven-app> docker-compose -f docker-compose-dev.yml up --build Building users-db Step 1/2 : FROM postgres:10.4-alpine ---> 962ed899c609 Step 2/2 : ADD create.sql /docker-entrypoint-initdb.d ---> Using cache ---> 02317e5a7033

Successfully built 02317e5a7033 Successfully tagged testdriven-app_users-db:latest Building users Step 1/10 : FROM python:3.6.5-alpine ---> 5be6d36f77ee Step 2/10 : RUN apk update && apk add --virtual build-deps gcc python-dev musl-dev && apk add postgresql-dev && apk add netcat-openbsd ---> Using cache ---> 68ad0b2cc74c Step 3/10 : RUN mkdir -p /usr/src/app ---> Using cache ---> a5a53049c38d Step 4/10 : WORKDIR /usr/src/app ---> Using cache ---> c951846102d3 Step 5/10 : COPY ./requirements.txt /usr/src/app/requirements.txt ---> Using cache ---> 1ecc70088bab Step 6/10 : RUN pip install -r requirements.txt ---> Using cache ---> 3832a1f288f0 Step 7/10 : COPY ./entrypoint.sh /usr/src/app/entrypoint.sh ---> Using cache ---> 5dadaa2f394c Step 8/10 : RUN chmod +x /usr/src/app/entrypoint.sh ---> Using cache ---> 0ec6b6225228 Step 9/10 : COPY . /usr/src/app ---> 56176574f654 Step 10/10 : CMD ["/usr/src/app/entrypoint.sh"] ---> Running in e737875808bc Removing intermediate container e737875808bc ---> 0e6054a7dff3

Successfully built 0e6054a7dff3 Successfully tagged testdriven-app_users:latest Starting testdriven-app_users-db_1 ... done Recreating testdriven-app_users_1 ... done Attaching to testdriven-app_users-db_1, testdriven-app_users_1 users-db_1 | 2018-11-06 01:32:37.317 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 users-db_1 | 2018-11-06 01:32:37.317 UTC [1] LOG: listening on IPv6 address "::", port 5432 users-db_1 | 2018-11-06 01:32:37.332 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" users-db_1 | 2018-11-06 01:32:37.355 UTC [18] LOG: database system was shut down at 2018-11-06 01:32:31 UTC users-db_1 | 2018-11-06 01:32:37.359 UTC [1] LOG: database system is ready to accept connections users_1 | standard_init_linux.go:190: exec user process caused "no such file or directory" testdriven-app_users_1 exited with code 1

Stegnerd commented 5 years ago

what fixed it for me was just changing the EOL from crlf to lf and then it worked!

jslucas commented 5 years ago

what fixed it for me was just changing the EOL from crlf to lf and then it worked!

+1 on that. You'd think after getting burned by this I would remember for next time... but here I was.