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

Docker - Error #1003

Closed
onedr0p opened this issue Jan 23, 2017 · 4 comments
Closed

Docker - Error #1003

onedr0p opened this issue Jan 23, 2017 · 4 comments
Labels
Milestone

Comments

@onedr0p
Copy link

onedr0p commented Jan 23, 2017

Hi,

I am trying to run glances with docker-compose. I am using your docker container.

Docker version: 1.12.6

docker-compose.yaml

version: "2"
services:
  glances:
    image: docker.io/nicolargo/glances
    container_name: glances
    ports:
      - "61208-61209:61208-61209"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - GLANCES_OPT=-w
    pid: "host"

I get this errors in the console:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/glances/glances/__main__.py", line 29, in <module>
    glances.main()
  File "glances/__init__.py", line 238, in main
    start_webserver(config=config, args=args)
  File "glances/__init__.py", line 193, in start_webserver
    webserver = GlancesWebServer(config=config, args=args)
  File "glances/webserver.py", line 41, in __init__
    self.stats.update()
  File "glances/stats.py", line 164, in update
    self._plugins[p].update()
  File "glances/plugins/glances_plugin.py", line 805, in wrapper
    ret = fct(self, *args, **kw)
  File "glances/plugins/glances_plugin.py", line 814, in wrapper
    ret = fct(*args, **kw)
  File "/glances/glances/plugins/glances_wifi.py", line 102, in update
    wifi_cells = Cell.all(net)
  File "/usr/local/lib/python2.7/dist-packages/wifi/scan.py", line 39, in all
    stderr=subprocess.STDOUT)
  File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I get the same error when running:
docker run -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host -it docker.io/nicolargo/glances

Thanks for all your help!

@onedr0p onedr0p changed the title Docker Compose - Error Docker - Error Jan 23, 2017
@EwyynTomato
Copy link

I also have this issue. This is caused by wifi library, see this issue.

My own fix is to create a Dockerfile and install wireless-tools package:

FROM nicolargo/glances

RUN apt-get update
RUN apt-get install -y wireless-tools

and edit docker-compose.yml to build using the Dockerfile:

version: "2"
services:
  glances:
    image: test-glances
    build:
      context: .
      dockerfile: Dockerfile
    container_name: glances
    ports:
      - "61208-61209:61208-61209"
    environment:
      - GLANCES_OPT=-w

@thebwt
Copy link
Contributor

thebwt commented Jan 23, 2017

For those using this from a headless server, add --disable-wifi to the GLANCES_OPT section

@onedr0p
Copy link
Author

onedr0p commented Jan 23, 2017

--disable-wifi did the trick thanks!

@onedr0p onedr0p closed this as completed Jan 23, 2017
nicolargo added a commit that referenced this issue Jan 23, 2017
@nicolargo
Copy link
Owner

I just add the wireless-tools package inside the top level Dockerfile.

It should work out-of-the-box now...

Just wait on or two hours before testing (the Docker build process is long...).

@nicolargo nicolargo added the bug label Jan 23, 2017
@nicolargo nicolargo added this to the Glances 2.8.1 milestone Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants