Graylog 3.0.2 inside docker with different port

hi team,

I am trying to setup graylog 3.0.2 in docker containers, for now i am using the default port 9000 inside the container and while running the container i am binding it -p 8081:9000 with a different port. and when i try to access it on the browser, it is still trying to connect with 9000 for vendor.js/app.js/config.js.

can someone help me on this?

i am creating a cluster, graylog master configuration is also posted here .

is_master = true

root_username = admin
password_secret = 23cf370dc3e66e9da9ddf5b8b982cd631115ccf176341843d5b11cad03e95cecd91360e594a04ebbdaa18cbcc75deeb79810aefe69f20d
root_password_sha2 = 9b8769a4a742959a2d0298c36ff2dfacda84362378d8dfd5b37374c

http_bind_address = 0.0.0.0:9000
http_publish_uri = http://${DH}:9000/

node_id_file = /opt/graylog/node-id
plugin_dir = plugin
http_enable_cors = true
rotation_strategy = count
retention_strategy = delete
elasticsearch_index_prefix = graylog
allow_leading_wildcard_searches = false
allow_highlighting = false
processor_wait_strategy = blocking
ring_size = 65536
message_journal_enabled = true
message_journal_dir = data/journal
lb_recognition_period_seconds = 3
content_packs_auto_load = grok-patterns.json

mongodb_uri = mongodb://{GRAYLOG_SERVER_1_NAME}:9301,{GRAYLOG_SERVER_2_NAME}:9301,${GRAYLOG_SERVER_3_NAME}:9301/graylog
mongodb_max_connections = 1000
mongodb_threads_allowed_to_block_multiplier = 5

elasticsearch_max_docs_per_index = 20000000
elasticsearch_max_number_of_indices = 20
elasticsearch_cluster_name = graylog2
elasticsearch_shards = 2
elasticsearch_replicas = 1
elasticsearch_discovery_zen_ping_unicast_hosts = {GRAYLOG_SERVER_1_NAME}:9300, {GRAYLOG_SERVER_2_NAME}:9300, {GRAYLOG_SERVER_3_NAME}:9300 elasticsearch_hosts = http://{GRAYLOG_SERVER_1_NAME}:8995, http://{GRAYLOG_SERVER_2_NAME}:8995, http://{GRAYLOG_SERVER_3_NAME}:8995

output_batch_size = 500
output_flush_interval = 1
output_fault_count_threshold = 5
output_fault_penalty_seconds = 30
processbuffer_processors = 5
outputbuffer_processors = 3

inputbuffer_ring_size = 65536
inputbuffer_processors = 2
inputbuffer_wait_strategy = blocking

you need to set your http_external_uri to where your Browser can reach the Graylog API:

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

so it i will be http_external_uri = 0.0.0.0:9000 or 0.0.0.0:8081 ?

UPDATE: i tried both and then i understand 8081 will work for me, now can see graylog default login page and but node page is not showing any information about my cluster and input is also fail to start, this is what i am getting in error

2019-07-17 11:27:28,881 WARN : org.graylog2.shared.rest.resources.ProxiedResource - Unable to call http://myurl.com:9000/api/system/metrics/multiple on node <02> java.net.ConnectException: Failed to connect to myurl/10.X.X.X:9000

please read the http_publish_uri default behaviour …

and understand what 0.0.0.0 means and read the docs why that is not possible for http_external_uri

1 Like

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