solarkennedy / wine-x11-novnc-docker

Base Docker image to run wine programs in a web browser via noVNC (html5 vnc viewer) + Xvfb + x11vnc
Apache License 2.0
273 stars 103 forks source link

Hitting issues using container #3

Closed altano closed 5 years ago

altano commented 5 years ago

Hey @solarkennedy thanks for this cool image.

I think I'm hitting the same issue as in /issues/2. I can use your image directly and it works:

PS C:\src\tradewars2002> docker run --rm -p 8080:8080 solarkennedy/wine-x11-novnc-docker
/usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2019-04-28 05:03:09,500 CRIT Supervisor running as root (no user in config file)
2019-04-28 05:03:09,500 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2019-04-28 05:03:09,505 INFO RPC interface 'supervisor' initialized
2019-04-28 05:03:09,505 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2019-04-28 05:03:09,505 INFO supervisord started with pid 1
2019-04-28 05:03:10,507 INFO spawned: 'X11' with pid 8
2019-04-28 05:03:10,508 INFO spawned: 'novnc' with pid 9
2019-04-28 05:03:10,508 INFO spawned: 'x11vnc' with pid 10
2019-04-28 05:03:10,509 INFO spawned: 'explorer' with pid 11
2019-04-28 05:03:10,510 INFO spawned: 'fluxbox' with pid 12
Warning: could not find self.pem
Starting webserver and WebSockets proxy on port 8080
2019-04-28 05:03:11,385 INFO reaped unknown pid 55
2019-04-28 05:03:11,514 INFO success: X11 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-28 05:03:11,514 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-28 05:03:11,514 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-28 05:03:11,514 INFO success: explorer entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-28 05:03:11,514 INFO success: fluxbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Navigate to this URL:

    http://c4921a89f7c1:8080/vnc.html?host=c4921a89f7c1&port=8080

Press Ctrl-C to exit

PORT=5900
2019-04-28 05:03:15,128 INFO reaped unknown pid 61
2019-04-28 05:03:15,428 INFO reaped unknown pid 63
2019-04-28 05:03:16,091 INFO reaped unknown pid 65
2019-04-28 05:03:17,272 INFO reaped unknown pid 43
2019-04-28 05:03:17,290 INFO reaped unknown pid 38

But if I build your image from the Dockerfile and run it I get errors:

PS C:\src\tradewars2002> docker run --rm -p 8080:8080 altano/tradewars2002
/usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2019-04-28 04:59:47,750 CRIT Supervisor running as root (no user in config file)
2019-04-28 04:59:47,750 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2019-04-28 04:59:47,755 INFO RPC interface 'supervisor' initialized
2019-04-28 04:59:47,755 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2019-04-28 04:59:47,755 INFO supervisord started with pid 1
2019-04-28 04:59:48,757 INFO spawned: 'X11' with pid 8
2019-04-28 04:59:48,758 INFO spawned: 'novnc' with pid 9
2019-04-28 04:59:48,760 INFO spawned: 'x11vnc' with pid 10
2019-04-28 04:59:48,761 INFO spawned: 'explorer' with pid 11
2019-04-28 04:59:48,762 INFO spawned: 'fluxbox' with pid 12
2019-04-28 04:59:48,762 INFO exited: novnc (exit status 127; not expected)
2019-04-28 04:59:49,636 INFO reaped unknown pid 44
2019-04-28 04:59:49,766 INFO success: X11 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-28 04:59:49,767 INFO spawned: 'novnc' with pid 46
2019-04-28 04:59:49,767 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-28 04:59:49,767 INFO success: explorer entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-28 04:59:49,767 INFO success: fluxbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-04-28 04:59:49,770 INFO exited: novnc (exit status 127; not expected)
PORT=5900
2019-04-28 04:59:51,797 INFO spawned: 'novnc' with pid 47
2019-04-28 04:59:51,799 INFO exited: novnc (exit status 127; not expected)
2019-04-28 04:59:53,327 INFO reaped unknown pid 49
2019-04-28 04:59:53,629 INFO reaped unknown pid 51
2019-04-28 04:59:54,302 INFO reaped unknown pid 53
2019-04-28 04:59:55,305 INFO spawned: 'novnc' with pid 57
2019-04-28 04:59:55,308 INFO exited: novnc (exit status 127; not expected)
2019-04-28 04:59:55,308 INFO gave up: novnc entered FATAL state, too many start retries too quickly
2019-04-28 04:59:55,501 INFO reaped unknown pid 32
2019-04-28 04:59:55,518 INFO reaped unknown pid 27

Not sure what the issue is. Any ideas?

solarkennedy commented 5 years ago

Exit code 127 usually means that the command is not found.

I don't "add" the code in a very good place (just /root/ so if you are putting something on top of that, it will blow away the novnc stuff.

altano commented 5 years ago

Here's what I did:

  1. Clone this repo
  2. Build: docker build --rm -t altano/wine-test:latest .
  3. Run: docker run --rm -p 8080:8080 altano/wine-test:latest

And I get the same error above. Meanwhile your image works fine.

Does the repo in exactly its current form actually work for you?

solarkennedy commented 5 years ago

Can you show me the Dockerfile for altano/wine-test ?

altano commented 5 years ago

It’s the Dockerfile in this repo. I’m just building this repo. I was trying to do something custom before but now I’m just stuck getting this repo to work as is.

solarkennedy commented 5 years ago

I've confirmed that master as-is does work. I've just pushed a change that sends stderr to the console too, but I expect it to say "command not found" (127)

If you can, run the container with -ti and just run bash and see if you can run vnc directly and skip supervisord? I think that will give you the "smoking gun" https://github.com/solarkennedy/wine-x11-novnc-docker/blob/master/supervisord.conf#L19

altano commented 5 years ago

Yeah, that immediately revealed the problem.

It broke because I was using Windows to build the Docker image and the git repo was checked out with everything converted to CRLF. https://github.com/solarkennedy/wine-x11-novnc-docker/pull/4

Thanks so much!