Graylog haproxy config problem

Trying to setup graylog to use haproxy but the problem is that graylog default configuration is for 2 ports, 9000 and 9001. Here is the service.yaml file:

  • service_name: apache service_host: “0.0.0.0” crts: [DEFAULT] service_port: 443 service_options:
    • balance leastconn
    • reqadd X-Forwarded-Proto:\ https server_options:
    • maxconn 100 cookie S{i} check

After setting up the relation and when I try to check if I can access graylog via https I get:

We are experiencing problems connecting to the Graylog server running on http://xxxxxxxx:9001/api/. Please verify that the server is healthy and working correctly.

You will be automatically redirected to the previous page once we can connect to the server.

This is the last response we received from the server:

Error message

Request has been terminated Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.

Original Request

GET http://xxxxxxxx:9001/api/system/sessions

Status code

undefined

Full error message

Error: Request has been terminated Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.

1 Like

@mthaddon @pedroleaoc?

1 Like

Long shot here, but if the problem is only the port, you can configure that with

# Machine charm
juju config graylog a-port-config-option=<port> 

# K8s charm
juju config graylog-k8s port=<port> 

Reference:

Maybe @jldev has some thoughts?

Sorry for dropping this question and thanks Erik for flagging it!

Thanks, Pedro