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

unable to run when IPV6 is disabled #305

Open
kovaga opened this issue Dec 5, 2024 · 4 comments
Open

unable to run when IPV6 is disabled #305

kovaga opened this issue Dec 5, 2024 · 4 comments

Comments

@kovaga
Copy link

kovaga commented Dec 5, 2024

Running the docker container produces the following results, which indicates that thje gunicorn is unable to start when is set to [::]

[2024-12-05 15:28:35 +0000] [7] [INFO] Starting gunicorn 23.0.0
[2024-12-05 15:28:35 +0000] [7] [ERROR] connection to ('::', 9221) failed: [Errno 97] Address family not supported by protocol
[2024-12-05 15:28:36 +0000] [7] [ERROR] connection to ('::', 9221) failed: [Errno 97] Address family not supported by protocol
[2024-12-05 15:28:37 +0000] [7] [ERROR] connection to ('::', 9221) failed: [Errno 97] Address family not supported by protocol
[2024-12-05 15:28:38 +0000] [7] [ERROR] connection to ('::', 9221) failed: [Errno 97] Address family not supported by protocol
[2024-12-05 15:28:39 +0000] [7] [ERROR] connection to ('::', 9221) failed: [Errno 97] Address family not supported by protocol
[2024-12-05 15:28:40 +0000] [7] [ERROR] Can't connect to ('::', 9221)

The issue is mentioned here as well
paperless-ngx/paperless-ngx#1356

Running from the command line manually using 0.0.0.0:9221
fixes the issue.
/usr/local/bin/pve_exporter --web.listen-address 0.0.0.0:9221 --config.file pve.yml
[2024-12-05 16:31:33 +0100] [2810816] [INFO] Starting gunicorn 23.0.0
[2024-12-05 16:31:33 +0100] [2810816] [INFO] Listening at: http://0.0.0.0:9221 (2810816)
[2024-12-05 16:31:33 +0100] [2810816] [INFO] Using worker: gthread
[2024-12-05 16:31:33 +0100] [2810817] [INFO] Booting worker with pid: 2810817

Is it possible to pass web.listen-address variable to the dockerised version?

@kovaga kovaga changed the title unable to run whjen IPV6 is disabled unable to run when IPV6 is disabled Dec 5, 2024
@znerol
Copy link
Member

znerol commented Dec 5, 2024

Thanks for the report. I wonder how that is solved in other exporters. Many are based on exporter-toolkit and they seem to dislike configuration using environment variables: prometheus/exporter-toolkit#78

So, if you run any of the go based exporters on your infra. Do you need to use a workaround as well, or do they start without any modification?

@kovaga
Copy link
Author

kovaga commented Dec 6, 2024

the only other exporter that I run is mktxp for mikrotik.
However, environment variables are frequently used in other Docker containers. Out of 7 containers that I run, 4 uses them.
i.e.
unifi-controller:
zigbee2mqtt
pi-hole
etc.

@mdiazgoncalves
Copy link

@kovaga I had the same problem. You can use the command option in the docker-compose file to work around this error

  pve-exporter:
    image: prompve/prometheus-pve-exporter:latest
    command: --web.listen-address 0.0.0.0:9221 --config.file /etc/prometheus/pve.yml
    volumes:
      - /local/pve-exporter/pve.yml:/etc/prometheus/pve.yml
    ports:
      - 9221:9221

@kovaga
Copy link
Author

kovaga commented Dec 14, 2024

@kovaga I had the same problem. You can use the command option in the docker-compose file to work around this error

  pve-exporter:
    image: prompve/prometheus-pve-exporter:latest
    command: --web.listen-address 0.0.0.0:9221 --config.file /etc/prometheus/pve.yml
    volumes:
      - /local/pve-exporter/pve.yml:/etc/prometheus/pve.yml
    ports:
      - 9221:9221

Thanks, that worked!

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

3 participants