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

"Failed to connect to the SC2 websocket. Is it up?" #318

Open
Haoo9988 opened this issue Sep 28, 2020 · 4 comments
Open

"Failed to connect to the SC2 websocket. Is it up?" #318

Haoo9988 opened this issue Sep 28, 2020 · 4 comments

Comments

@Haoo9988
Copy link

[user@localhost ~]$ python -m smac.examples.random_agents
/home/user/SMAC/StarCraftII/Versions/Base75689/SC2_x64: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /home/user/SMAC/StarCraftII/Libs/libstdc++.so.6)
WARNING:absl:SC2 isn't running, so bailing early on the websocket connection.
Traceback (most recent call last):
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/site-packages/smac/examples/random_agents.py", line 43, in <module>
    main()
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/site-packages/smac/examples/random_agents.py", line 19, in main
    env.reset()
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/site-packages/smac/env/starcraft2/starcraft2.py", line 347, in reset
    self._launch()
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/site-packages/smac/env/starcraft2/starcraft2.py", line 297, in _launch
    self._sc2_proc = self._run_config.start(window_size=self.window_size, want_rgb=False)
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/site-packages/pysc2/run_configs/platforms.py", line 205, in start
    want_rgb=want_rgb, extra_args=extra_args, **kwargs)
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/site-packages/pysc2/run_configs/platforms.py", line 88, in start
    self, exec_path=exec_path, version=self.version, **kwargs)
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/site-packages/pysc2/lib/sc_process.py", line 143, in __init__
    self._host, self._port, self, timeout_seconds=timeout_seconds)
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/site-packages/pysc2/lib/remote_controller.py", line 146, in __init__
    sock = self._connect(host, port, proc, timeout_seconds)
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/site-packages/pysc2/lib/stopwatch.py", line 212, in _stopwatch
    return func(*args, **kwargs)
  File "/home/user/.conda/envs/hjy_torch/lib/python3.6/site-packages/pysc2/lib/remote_controller.py", line 180, in _connect
    raise ConnectError("Failed to connect to the SC2 websocket. Is it up?")
pysc2.lib.remote_controller.ConnectError: Failed to connect to the SC2 websocket. Is it up?

Can someone tell me how to run SC2?

@carolinewang01
Copy link

I"m having the exact same problem, did you ever solve it?

@Sud0x67
Copy link

Sud0x67 commented May 14, 2021

me too

@L-Spike
Copy link

L-Spike commented Jun 8, 2022

I found this home/user/SMAC/StarCraftII/Versions/Base75689/SC2_x64: /lib64/libc.so.6: version GLIBC_2.18 not found
so serach this problem ,got one solution:

curl -O http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
tar zxf glibc-2.18.tar.gz
cd glibc-2.18/
mkdir build
cd build/
../configure --prefix=/usr
make -j2
make install

@EdanToledo
Copy link

For all future visitors to this issue, my solution might not solve your problem but it solves it for me every time:

export LD_PRELOAD=""

I do this before running my experiments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants