2017-10-04 301 views
0

每當我嘗試在宇宙上運行該程序時,我會在套接字關閉時發生此錯誤。我不知道如何解決這個問題,而且我一直在搞這個問題。我使用的是openAI給出的示例代碼,但由於某種原因,Flash遊戲並未像原本應該那樣加載。有什麼建議麼?OpenAI無法啓動程序

順便提一下,我遵循https://github.com/openai/universe給出的python代碼。這是這樣的:

import gym 
import universe # register the universe environments 

env = gym.make('flashgames.DuskDrive-v0') 
env.configure(remotes=1) # automatically creates a local docker container 
observation_n = env.reset() 

while True: 
    action_n = [[('KeyEvent', 'ArrowUp', True)] for ob in observation_n] # your agent here 
    observation_n, reward_n, done_n, info = env.step(action_n) 
    env.render() 

而這是當我試圖運行它時得到的錯誤日誌。我不確定有什麼問題以及如何解決問題。

[2017-10-05 00:29:24,424] Making new env: flashgames.DuskDrive-v0 
[2017-10-05 00:29:24,453] Writing logs to file: /tmp/universe-29460.log 
[2017-10-05 00:29:24,565] Ports used: [5900, 15900] 
[2017-10-05 00:29:24,566] [0] Creating container: image=quay.io/openai/universe.flashgames:0.20.28. Run the same thing by hand as: docker run -p 5901:5900 -p 15901:15900 --cap-add SYS_ADMIN --ipc host --privileged quay.io/openai/universe.flashgames:0.20.28 
[2017-10-05 00:29:27,287] Remote closed: address=localhost:15901 
[2017-10-05 00:29:27,287] Remote closed: address=localhost:5901 
[2017-10-05 00:29:27,288] At least one sockets was closed by the remote. Sleeping 1s... 
universe-YJfaJs-0 | Setting VNC and rewarder password: openai 
[2017-10-05 00:29:28,289] Remote closed: address=localhost:15901 
[2017-10-05 00:29:28,290] Remote closed: address=localhost:5901 
[2017-10-05 00:29:28,290] At least one sockets was closed by the remote. Sleeping 1s... 
universe-YJfaJs-0 | [Wed Oct 4 13:29:28 UTC 2017] Waiting for /tmp/.X11-unix/X0 to be created (try 1/10) 
[2017-10-05 00:29:29,292] Remote closed: address=localhost:5901 
[2017-10-05 00:29:29,292] Remote closed: address=localhost:15901 
[2017-10-05 00:29:29,299] At least one sockets was closed by the remote. Sleeping 1s... 
universe-YJfaJs-0 | [Wed Oct 4 13:29:29 UTC 2017] [/usr/local/bin/sudoable-env-setup] Disabling outbound network traffic for none 
universe-YJfaJs-0 | [tigervnc] 
universe-YJfaJs-0 | [tigervnc] Xvnc TigerVNC 1.7.0 - built Sep 8 2016 10:39:22 
universe-YJfaJs-0 | [tigervnc] Copyright (C) 1999-2016 TigerVNC Team and many others (see README.txt) 
universe-YJfaJs-0 | [tigervnc] See http://www.tigervnc.org for information on TigerVNC. 
universe-YJfaJs-0 | [tigervnc] Underlying X server release 11400000, The X.Org Foundation 
universe-YJfaJs-0 | [tigervnc] 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension VNC-EXTENSION 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension Generic Event Extension 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension SHAPE 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension MIT-SHM 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension XInputExtension 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension XTEST 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension BIG-REQUESTS 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension SYNC 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension XKEYBOARD 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension XC-MISC 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension XINERAMA 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension XFIXES 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension RENDER 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension RANDR 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension COMPOSITE 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension DAMAGE 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension MIT-SCREEN-SAVER 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension DOUBLE-BUFFER 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension RECORD 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension DPMS 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension X-Resource 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension XVideo 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension XVideo-MotionCompensation 
universe-YJfaJs-0 | [tigervnc] Initializing built-in extension GLX 
universe-YJfaJs-0 | [tigervnc] 
universe-YJfaJs-0 | [tigervnc] Wed Oct 4 13:29:29 2017 
universe-YJfaJs-0 | [tigervnc] vncext:  VNC extension running! 
universe-YJfaJs-0 | [tigervnc] vncext:  Listening for VNC connections on all interface(s), port 5900 
universe-YJfaJs-0 | [tigervnc] vncext:  created VNC server for screen 0 
universe-YJfaJs-0 | [init] [2017-10-04 13:29:29,678] Launching system_diagnostics_logger.py, recorder_logdir=/tmp/demo 
universe-YJfaJs-0 | [init] [2017-10-04 13:29:29,741] Launching reward_recorder.py, recorder_logdir=/tmp/demo 
universe-YJfaJs-0 | [init] [2017-10-04 13:29:29,778] Launching vnc_recorder.py, recorder_logdir=/tmp/demo 
universe-YJfaJs-0 | [init] [2017-10-04 13:29:29,810] PID 52 launched with command ['sudo', '-H', '-u', 'nobody', 'DISPLAY=:0', 'DBUS_SESSION_BUS_ADDRESS=/dev/null', '/app/universe-envs/controlplane/bin/controlplane.py', '--rewarder-port=15901'] 
universe-YJfaJs-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/Type1/, removing from list! 
universe-YJfaJs-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list! 
universe-YJfaJs-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list! 
universe-YJfaJs-0 | [init] [2017-10-04 13:29:30,032] init detected end of child process 15 with exit code 0, not killed by signal 
[2017-10-05 00:29:30,299] Remote closed: address=localhost:15901 
[2017-10-05 00:29:30,300] Remote closed: address=localhost:5901 
[2017-10-05 00:29:30,300] At least one sockets was closed by the remote. Sleeping 1s... 
[2017-10-05 00:29:31,301] Remote closed: address=localhost:15901 
[2017-10-05 00:29:31,301] At least one sockets was closed by the remote. Sleeping 1s... 
[2017-10-05 00:29:32,306] Remote closed: address=localhost:15901 
[2017-10-05 00:29:32,325] At least one sockets was closed by the remote. Sleeping 1s... 
[2017-10-05 00:29:33,327] Remote closed: address=localhost:15901 
[2017-10-05 00:29:33,342] At least one sockets was closed by the remote. Sleeping 1s... 
universe-YJfaJs-0 | [tigervnc] 
universe-YJfaJs-0 | [tigervnc] Wed Oct 4 13:29:33 2017 
universe-YJfaJs-0 | [tigervnc] Connections: accepted: 172.17.0.1::51814 
[2017-10-05 00:29:34,344] Remote closed: address=localhost:15901 
[2017-10-05 00:29:34,345] At least one sockets was closed by the remote. Sleeping 1s... 
universe-YJfaJs-0 | [tigervnc] 
universe-YJfaJs-0 | [tigervnc] Wed Oct 4 13:29:34 2017 
universe-YJfaJs-0 | [tigervnc] Connections: closed: 172.17.0.1::51814 (Clean disconnection) 
universe-YJfaJs-0 | [tigervnc] EncodeManager: Framebuffer updates: 0 
universe-YJfaJs-0 | [tigervnc] EncodeManager: Total: 0 rects, 0 pixels 
universe-YJfaJs-0 | [tigervnc] EncodeManager:   0 B (1:-nan ratio) 
universe-YJfaJs-0 | [init] [2017-10-04 13:29:34,889] init detected end of child process 55 with exit code 0, not killed by signal 
[2017-10-05 00:29:35,346] Remote closed: address=localhost:15901 
[2017-10-05 00:29:35,347] At least one sockets was closed by the remote. Sleeping 1s... 
universe-YJfaJs-0 | [nginx] 2017/10/04 13:29:35 [error] 65#65: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET/HTTP/1.1", upstream: "http://127.0.0.1:15901/", host: "127.0.0.1:10003" 
universe-YJfaJs-0 | [nginx] 172.17.0.1 - openai [04/Oct/2017:13:29:35 +0000] "GET/HTTP/1.1" 502 182 "-" "-" 
universe-YJfaJs-0 | WebSocket server settings: 
universe-YJfaJs-0 | - Listen on :5898 
universe-YJfaJs-0 | - Flash security policy server 
universe-YJfaJs-0 | - No SSL/TLS support (no cert file) 
universe-YJfaJs-0 | - proxying from :5898 to localhost:5900 
[2017-10-05 00:29:36,348] Using the golang VNC implementation 
[2017-10-05 00:29:36,348] Using VNCSession arguments: {'subsample_level': 2, 'start_timeout': 7, 'fine_quality_level': 50, 'encoding': 'tight'}. (Customize by running "env.configure(vnc_kwargs={...})" 
universe-YJfaJs-0 | [nginx] 2017/10/04 13:29:36 [info] 65#65: *1 client 172.17.0.1 closed keepalive connection 
[2017-10-05 00:29:36,370] [0] Connecting to environment: vnc://localhost:5901 password=openai. If desired, you can manually connect a VNC viewer, such as TurboVNC. Most environments provide a convenient in-browser VNC client: http://localhost:15901/viewer/?password=openai 
2017/10/05 00:29:36 I1005 00:29:36.377669 29460 gymvnc.go:417] [0:localhost:5901] opening connection to VNC server 
2017/10/05 00:29:36 I1005 00:29:36.529764 29460 gymvnc.go:550] [0:localhost:5901] connection established 
Traceback (most recent call last): 
    File "test.py", line 11, in <module> 
    env.render() 
universe-YJfaJs-0 | [tigervnc] 
universe-YJfaJs-0 | [tigervnc] Wed Oct 4 13:29:36 2017 
universe-YJfaJs-0 | [tigervnc] Connections: accepted: 172.17.0.1::51852 
universe-YJfaJs-0 | [tigervnc] SConnection: Client needs protocol version 3.8 
universe-YJfaJs-0 | [tigervnc] SConnection: Client requests security type VncAuth(2) 
universe-YJfaJs-0 | [tigervnc] VNCSConnST: Server default pixel format depth 24 (32bpp) little-endian rgb888 
universe-YJfaJs-0 | [tigervnc] VNCSConnST: Client pixel format depth 24 (32bpp) little-endian bgr888 
    File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 150, in render 
    return self._render(mode=mode, close=close) 
    File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 286, in _render 
    return self.env.render(mode, close) 
    File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 150, in render 
    return self._render(mode=mode, close=close) 
    File "/home/jeremy/universe/universe/wrappers/render.py", line 52, in _render 
    return self.env.render(mode=mode, *args, **kwargs) 
    File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 150, in render 
    return self._render(mode=mode, close=close) 
    File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 286, in _render 
    return self.env.render(mode, close) 
    File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 150, in render 
    return self._render(mode=mode, close=close) 
    File "/home/jeremy/universe/universe/envs/vnc_env.py", line 552, in _render 
    self.vnc_session.render(self.connection_names[0]) 
go_vncdriver.Error: /tmp/pip-build-ChEkRs/go-vncdriver/.build/src/github.com/openai/go-vncdriver/main.go:387: go_vncdriver was installed without OpenGL support. See https://github.com/openai/go-vncdriver for details on how debug. 
[2017-10-05 00:29:36,882] Killing and removing container: id=22d8e98f604330565368471dafe71f2fc119ddd18f27901ec3dbdbbdaa46e64b 
[2017-10-05 00:29:37,079] [0:localhost:5901] Waiting on rewarder: failed to complete WebSocket handshake. Retry in 1s (slept 0s/7s): connection was closed uncleanly (WebSocket connection upgrade failed (502 - BadGateway)) 
universe-YJfaJs-0 | [nginx] 2017/10/04 13:29:37 [error] 65#65: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET/HTTP/1.1", upstream: "http://127.0.0.1:15901/", host: "localhost:15901" 
universe-YJfaJs-0 | [nginx] 172.17.0.1 - openai [04/Oct/2017:13:29:37 +0000] "GET/HTTP/1.1" 502 182 "-" "AutobahnPython/17.9.3" 
universe-YJfaJs-0 | [nginx] 2017/10/04 13:29:37 [info] 65#65: *3 client 172.17.0.1 closed keepalive connection 
[2017-10-05 00:29:38,084] [0:localhost:5901] Waiting on rewarder: failed to complete WebSocket handshake. Retry in 3s (slept 1s/7s): connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake) 

回答

0

您的控制檯輸出基本上引導您到go-vncdriver頁面。

go_vncdriver.Error: /tmp/pip-build-ChEkRs/go-vncdriver/.build/src/github.com/openai/go-vncdriver/main.go:387: 
go_vncdriver was installed without OpenGL support. 
See https://github.com/openai/go-vncdriver for details on how debug. 

爲了解決這個之後,可能出現了錯誤回報,你應該總是看看solutions to common OpenAI problems