I know this is probably the most common issue graylog is having, thanks to many, many googles. I’m attempting to set up a local version of graylog with docker. I’m hoping to access the graylog from the same machine the VM is running on. The VM has an IP of 192.168.99.100
So I start graylog using docker-compose up, then wait until it starts, then go to 192.168.99.100:9000. It shows a white screen with no errors. So I open my inspector and see this:
so what’s going on is graylog is successfully serving an html file on the correct address, but inside the HTML file, all the IPs of the assets (like scripts, images, etc) are pointed at 127.0.0.1, not the correct address of 192…100.
I ran an internal webserver which would simply grab files from 192…100, edit them to remove each instance of 127.0.0.1 and replace it with 192…100. This worked, and the web interface displayed this:
Do you know where Graylog gets those IP addresses in the html files? Maybe if I could either find the config item that changes those or just manually edit them myself that would do the trick.
In my 3.3.2 non-containerized deployment the configurations are in /etc/graylog/server/server.conf.
http_bind_address = 10.10.45.158:9000
#### HTTP publish URI
#
# The HTTP URI of this Graylog node which is used to communicate with the other Graylog nodes in the cluster and by all
# clients using the Graylog web interface.
#
# The URI will be published in the cluster discovery APIs, so that other Graylog nodes will be able to find and connect to this Graylog node.
#
# This configuration setting has to be used if this Graylog node is available on another network interface than $http_bind_address,
# for example if the machine has multiple network interfaces or is behind a NAT gateway.
#
# If $http_bind_address contains a wildcard IPv4 address (0.0.0.0), the first non-loopback IPv4 address of this machine will be used.
# This configuration setting *must not* contain a wildcard address!
#
# Default: http://$http_bind_address/
http_publish_uri = https://graylog.contoso.com:9000/
# MongoDB connection string
# See https://docs.mongodb.com/manual/reference/connection-string/ for details
mongodb_uri = mongodb://localhost/graylog
Those are the only place I have configured them. The localhost configuration for mongodb is default, I didn’t change it.
Ours isn’t a containerized deployment. We’ve deployed the virtual appliance (OVA). The bind address is the address of that appliance. You can use docker exec to access a container’s filesystem, although we may be on the wrong path here – this seems like something that can probably be solved more easily.
you need to bind Graylog to all interfaces in the container (to be able to access it) AND you need to configure WHERE your Browser is able to reach Graylog.
# need to be where your BROWSER can reach Graylog
GRAYLOG_HTTP_EXTERNAL_URI=http://192.168.99.100:9000
# defaults to 127.0.0.1
GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0