Mr. Hishprung
Mr. Hishprung

Reputation: 25

Graylog with docker, how to configure the container

Im completely new to both Graylog and Docker, and i cant solve the problem that i found stopping my progress. I followed the guides from official documentation [https://docs.graylog.org/en/4.0/pages/installation/docker.html] yet the problem appeared with:

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.

From what i searched i need to change http_enable_cors to true value. I used this command:

sudo docker run --name graylog --link mongo --link elasticsearch \
-p 9000:9000 -p 12201:12201 -p 1514:1514 \
-e GRAYLOG_HTTP_EXTERNAL_URI="http://127.0.0.1:9000/" \
-d graylog/graylog:4.0 \
-e GRAYLOG_HTTP_ENABLE_CORS=true // already tried "true"

But it didnt really worked, hence i reach out to more experienced docker users. Im (trying) using Graylog 4.0, and docker v20.10.5

Upvotes: 0

Views: 1250

Answers (1)

just
just

Reputation: 2000

Change your last two lines like this:

sudo docker run --name graylog --link mongo --link elasticsearch \
-p 9000:9000 -p 12201:12201 -p 1514:1514 \
-e GRAYLOG_HTTP_EXTERNAL_URI="http://127.0.0.1:9000/" \
-e GRAYLOG_HTTP_ENABLE_CORS=true \
-d graylog/graylog:4.0 

The image should be the last parameter.

Upvotes: 1

Related Questions