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

loadgenerator failed to start when ipv6 is disabled #1437

Closed
MoZhonghua opened this issue Mar 7, 2024 · 3 comments · Fixed by #1509
Closed

loadgenerator failed to start when ipv6 is disabled #1437

MoZhonghua opened this issue Mar 7, 2024 · 3 comments · Fixed by #1509
Labels
bug Something isn't working

Comments

@MoZhonghua
Copy link
Contributor

Bug Report

Which version of the demo you are using? (please provide either a specific
1.8.0

Symptom

loadgenerator failed to start when ipv6 is disabled, with this error:

[2024-03-07 07:16:25,064] 66b18b2f58e5/INFO/locust.main: Starting web interface at http://0.0.0.0:8089 (accepting connections from all network interfaces)
[2024-03-07 07:16:25,074] 66b18b2f58e5/INFO/locust.main: Starting Locust 2.18.2
[2024-03-07 07:16:25,074] 66b18b2f58e5/INFO/locust.main: No run time limit set, use CTRL+C to interrupt
Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 908, in gevent._gevent_cgreenlet.Greenlet.run
  File "/usr/local/lib/python3.12/site-packages/locust/web.py", line 512, in start_server
    self.server.serve_forever()
  File "/usr/local/lib/python3.12/site-packages/gevent/baseserver.py", line 398, in serve_forever
    self.start()
  File "/usr/local/lib/python3.12/site-packages/gevent/baseserver.py", line 336, in start
    self.init_socket()
  File "/usr/local/lib/python3.12/site-packages/gevent/pywsgi.py", line 1668, in init_socket
    StreamServer.init_socket(self)
  File "/usr/local/lib/python3.12/site-packages/gevent/server.py", line 173, in init_socket
    self.socket = self.get_listener(self.address, self.backlog, self.family)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gevent/server.py", line 185, in get_listener
    return _tcp_listener(address, backlog=backlog, reuse_addr=cls.reuse_addr, family=family)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gevent/server.py", line 260, in _tcp_listener
    sock = GeventSocket(family=family)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gevent/_socket3.py", line 125, in __init__
    self._sock = self._gevent_sock_class(family, type, proto, fileno)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 97] Address family not supported by protocol

What is the expected behavior?

Shoud startup successfully.

What is the actual behavior?

Failed to start.

Reproduce

sudo vim /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
reboot

docker run --rm -it --entrypoint bash ghcr.io/open-telemetry/demo:1.8.0-loadgenerator
locust   # failed to start
locust --web-host 0.0.0.0   # start ok

Additional Context

see this: locustio/locust#556

@MoZhonghua MoZhonghua added the bug Something isn't working label Mar 7, 2024
@puckpuck
Copy link
Contributor

@MoZhonghua can you add - LOCUST_WEB_HOST=0.0.0.0 to the environment variables list for the loadgenerator in docker-compose.yml?

@MoZhonghua
Copy link
Contributor Author

@MoZhonghua can you add - LOCUST_WEB_HOST=0.0.0.0 to the environment variables list for the loadgenerator in docker-compose.yml?

- LOCUST_WEB_HOST=0.0.0.0 works.

Should I create a PR to fix this? I'll add this env to docker-compose.minimal.yml and docker-compose.yml.

@puckpuck
Copy link
Contributor

@MoZhonghua can you add - LOCUST_WEB_HOST=0.0.0.0 to the environment variables list for the loadgenerator in docker-compose.yml?

- LOCUST_WEB_HOST=0.0.0.0 works.

Should I create a PR to fix this? I'll add this env to docker-compose.minimal.yml and docker-compose.yml.

Yes. I think adding the environment variable to the proper section in .env, then referencing it in both docker compose files is what we need.

MoZhonghua pushed a commit to MoZhonghua/opentelemetry-demo that referenced this issue Apr 8, 2024
MoZhonghua pushed a commit to MoZhonghua/opentelemetry-demo that referenced this issue Apr 8, 2024
MoZhonghua pushed a commit to MoZhonghua/opentelemetry-demo that referenced this issue Apr 8, 2024
MoZhonghua pushed a commit to MoZhonghua/opentelemetry-demo that referenced this issue Apr 8, 2024
MoZhonghua pushed a commit to MoZhonghua/opentelemetry-demo that referenced this issue Apr 8, 2024
MoZhonghua added a commit to MoZhonghua/opentelemetry-demo that referenced this issue Apr 8, 2024
puckpuck added a commit that referenced this issue Apr 12, 2024
AlexPSplunk pushed a commit to splunk/edu-opentelemetry-demo that referenced this issue Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants