Cannot access web interface

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:

so apparently my hack is insufficient to get every misconfigured item.

What’s the “Right” way to fix this?

thanks guys!

Hey @Stefanblandin

It looks to me like docker is binding to loopback in the container. I’ve never seen it before, but a bit of Googling revealed that it may be a Thing.

Unfortunately I don’t have anything else to offer, maybe that will help.

1 Like

Hey @ttsandrew, Thanks for the prompt reply!

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.

1 Like

I take it that in this example the http_bind_address is the address of the virtualbox that docker brings up?

Also, I’m a little new to this and I don’t actually know how to get into the etc folder of the running docker instance. Do you know how to do that?

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.

Unfortunately, even with that config it didn’t work =/

Try to set these docker env variables :

GRAYLOG_HTTP_EXTERNAL_URI=http://192.168.99.100:9000/api
GRAYLOG_WEB_ENDPOINT_URI=http://192.168.99.100:9000/
GRAYLOG_TRANSPORT_EMAIL_WEB_INTERFACE_URL=http://192.168.99.100:9000/

some of them may be deprecated, please check the doc.

1 Like

Thanks for the help!

This is my new config file:

And the error log still shows those errors as shown in the original post, unfortnately.

I suspect that if I can make docker show up on localhost instead of 192… this would go over better, but I have no idea how to do that.

he @Stefanblandin

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

See the docs: https://docs.graylog.org/en/3.3/pages/configuration/server.conf.html#web-rest-api

When you check the docs: https://docs.graylog.org/en/3.3/pages/installation/docker.html#settings you see that setting http_external_uri should be enough, but that depends on your local environment.

Ok! I tried adding the bind address as the address that docker is running on and still have the same issue. Hope we can resolve this!

the config now looks like this:

not add this and leave the others … remove the others.

web_endpoint is not used any more and is just confusing you,

read what the different settings are in the docs and use only the really needed one. in your case, remove everything and leave ONLY:

GRAYLOG_HTTP_EXTERNAL_URI=http://192.168.99.100:9000

if that is the IP and port of your docker host and the port you forward to Graylog.

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