# Graylog cluster load balancing problem

**URL:** <https://community.graylog.org/t/graylog-cluster-load-balancing-problem/19388>\
**Category:** Graylog Central (peer support)\
**Created:** [April 7, 2021, 3:00pm UTC](https://community.graylog.org/t/graylog-cluster-load-balancing-problem/19388 "2021-04-07T15:00:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FMPS](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@FMPS](https://community.graylog.org/u/FMPS)\
**Post date:** [April 7, 2021, 3:00pm UTC](https://community.graylog.org/t/graylog-cluster-load-balancing-problem/19388/1 "2021-04-07T15:00:58Z")

</div>

Hello community,

I am installing a graylog cluster using the following architecture.

 ![](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/d/d20b31275b4cbdc37556647195e3a276b1528487.png)

My software versions:  
CentOS 8  
graylog 4.0.5  
mongo 4.4.4  
elastic 7.10.1  
nginx 1.14.1

My configurations:  
**GRAYLOG1**  
ip: 192.168.1.8  
hostname: graylog01

config:  
is\_master = true  
http\_bind\_address = 192.168.1.8:9000  
http\_publish\_uri = http://$http\_bind\_address/  
rest\_listen\_uri = [http://192.168.1.8:9000/api](http://192.168.1.8:9000/api)  
http\_external\_uri = [http://graylog.mydomain.net/](http://graylog.mydomain.net/)  
trusted\_proxies = 192.168.1.12/32

**GRAYLOG2**  
ip: 192.168.1.15  
hostname: graylog02

config:  
is\_master = false  
http\_bind\_address = 192.168.1.15:9000  
http\_publish\_uri = http://$http\_bind\_address/  
rest\_listen\_uri = [http://192.168.1.15:9000/api/](http://192.168.1.15:9000/api/)  
http\_external\_uri = [http://graylog.mydomain.net/](http://graylog.mydomain.net/)  
trusted\_proxies = 192.168.1.12/32

**GRAYLOG3**  
ip: 192.168.1.16  
hostname: graylog03

config:  
is\_master = false  
http\_bind\_address = 192.168.1.16:9000  
http\_publish\_uri = http://$http\_bind\_address/  
rest\_listen\_uri = [http://192.168.1.16:9000/api/](http://192.168.1.16:9000/api/)  
http\_external\_uri = [http://graylog.mydomain.net/](http://graylog.mydomain.net/)  
trusted\_proxies = 192.168.1.12/32

**nginx**  
ip: 192.168.1.12  
hostname: graylog

config:  
stream {

```
    upstream cluster_syslog {
             server 192.168.1.8:514;
             server 192.168.1.15:514;
             server 192.168.1.16:514;
    }
    server {
            listen 192.168.1.12:514 udp;
            proxy_timeout 10s;
            proxy_pass cluster_syslog;
    }

```

}

http {  
upstream cluster\_http {  
server 192.168.1.8:9000 max\_fails=3 fail\_timeout=30s;  
server 192.168.1.15:9000 max\_fails=3 fail\_timeout=30s;  
server 192.168.1.16:9000 max\_fails=3 fail\_timeout=30s;  
}

```
    server {
            listen 192.168.1.12:80;
            server_name graylog.mydomain.net;

            location /
            {
                    proxy_set_header Host $http_host;
                    proxy_set_header X-Forwarded-Host $host;
                    proxy_set_header X-Forwarded-Server $host;
                    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                    proxy_set_header X-Graylog-Server-URL http://$server_name/;
                    proxy_pass http://cluster_http;
            }
    }

```

}

Http requests to the graylog cluster or syslog messages are reaching the servers correctly.  
The problem is in accessing the api.  
When I access [http://graylog.mydomain.net/system/nodes](http://graylog.mydomain.net/system/nodes) it identifies the 3 nodes but with the information  
“System information is currently unavailable.”  
Acessing [http://graylog.mydomain.net/system/overview](http://graylog.mydomain.net/system/overview) identifies the cluster ID as well as the indication that it has 3 active members.

On the servers I have the following errors (on each member)  
WARN [ProxiedResource] Unable to call [http://api/system/metrics/multiple](http://api/system/metrics/multiple) on node : api: Name or service not known  
WARN [ProxiedResource] Unable to call [http://api/system/metrics/multiple](http://api/system/metrics/multiple) on node : api

Yes, without a FQDN or IP.

I have been searching but until now all attempts have always resulted in this problem.  
Does anyone have a tip to point in the right direction?

Thank you all so much for your time.

---

<div class="post-metadata">

**Author:** ![gsmith](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/gsmith/32/1222_2.png) [@gsmith](https://community.graylog.org/u/gsmith)\
**Post date:** [April 13, 2021, 2:30am UTC](https://community.graylog.org/t/graylog-cluster-load-balancing-problem/19388/2 "2021-04-13T02:30:17Z")

</div>

@FMPS  
Hello,

Maybe I can help with your problem.  
First thing I noticed was this.

> [@FMPS](#):
>
> config:  
> is\_master = false  
> http\_bind\_address = 192.168.1.15:9000  
> http\_publish\_uri = http://$http\_bind\_address/  
> rest\_listen\_uri = [http://192.168.1.15:9000/api/](http://192.168.1.15:9000/api/)  
> http\_external\_uri = [http://graylog.mydomain.net/](http://graylog.mydomain.net/)  
> trusted\_proxies = 192.168.1.12/32

The "rest\_listen\_uri = " I remember seeing that in Graylog2 configuration file, but since then configuration files has change. Looks like you have configuration from two different versions of Graylog.

This is mine, I have Graylog 4.0.6, but I’m running TCP/TLS.

```
http_bind_address = ipaddress:9000
http_publish_uri = https://graylog.localhost.com:9000/
http_enable_cors = true
http_enable_tls = true
http_tls_cert_file = /etc/ssl/certs/graylog/graylog-certificate.pem
http_tls_key_file = /etc/ssl/certs/graylog/graylog-key.pem
http_tls_key_password = secret
elasticsearch_hosts = http://ipaddress:9200

```

Here is Graylog 4 server.conf

[https://docs.graylog.org/en/4.0/pages/configuration/server.conf.html](https://docs.graylog.org/en/4.0/pages/configuration/server.conf.html)

Here is Graylog 2 server.conf

[https://docs.graylog.org/en/2.4/pages/configuration/server.conf.html](https://docs.graylog.org/en/2.4/pages/configuration/server.conf.html)

So that might be an issue.

---

<div class="post-metadata">

**Author:** ![FMPS](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@FMPS](https://community.graylog.org/u/FMPS)\
**Post date:** [April 13, 2021, 3:20pm UTC](https://community.graylog.org/t/graylog-cluster-load-balancing-problem/19388/3 "2021-04-13T15:20:47Z")

</div>

Hello @gsmith ,

You are right.

I removed “rest\_listen\_uri” and made following changes:  
http\_bind\_address = 0.0.0.0:9000  
http\_publish\_uri = [http://192.168.1.8:9000/](http://192.168.1.8:9000/)  
http\_external\_uri = [http://graylog.mydomain.net/](http://graylog.mydomain.net/)

Everything is working just fine 🙂

Thank you very much for your time.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [April 27, 2021, 3:20pm UTC](https://community.graylog.org/t/graylog-cluster-load-balancing-problem/19388/4 "2021-04-27T15:20:47Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
