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

SERVER default not working in container #139

Closed
uli42 opened this issue Nov 23, 2023 · 1 comment
Closed

SERVER default not working in container #139

uli42 opened this issue Nov 23, 2023 · 1 comment
Assignees
Labels
cloud_native documentation Improvements or additions to documentation enhancement New feature or request

Comments

@uli42
Copy link

uli42 commented Nov 23, 2023

The documentation states that the bridge should run on a collector node. So I tried to run the container there and all I got was WARNING - Perfmon RESTcall error __ Server responded: 503 Connection refused from server

After searching for quite some time I finally found the reason: The container needs to know the server's IP from inside the container. It does not work with the default of 0.0.0.0, and it does (of course) not work with any of the server's IP, because inside the container the host is reachable by another IP. So finally I got it working with this internal address automatically provided by podman:

podman run -dt -p 4242:4242 -e SERVER=host.containers.internal -e APIKEYVALUE=... --name grafana_bridge localhost/bridge_image:latest

host.containers.internal is the magic here. So I propose to change the default in the Dockerfile to that address and also add a comment to the config file about this.

@uli42 uli42 added the enhancement New feature or request label Nov 23, 2023
@Helene
Copy link
Member

Helene commented Nov 25, 2023

I think, you misunderstood the documentation. The statement "the bridge should run on a collector node" is valid for a traditional bare metal setup.

An application running in a container is encapsulated, i.e. running on separate (virtual) host. Therefore you need as first change pmcollector setting and allow communication with external hosts. Read here

The step 4. in the example shows that the SERVER parameter need to be passed through by starting bridge container.

The Dockefile SERVER default value "0.0.0.0" allows you to build image accepting any SERVER IP. In that way you can use the same image for running multiple bridge containers communicating with different servers (pmcollector's). For example, if you have multiple IBM Storage Scale devices.

@Helene Helene added documentation Improvements or additions to documentation cloud_native labels Nov 28, 2023
@Helene Helene closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloud_native documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants