Problem on showing ApiBrowser on Http Api node

I installed graylog with docker and added HttpApi node but on Node page when I click on Api Browser
it shows 2 box for username and password without any button or link to go . I tried with the latest FireFox and Chrome version and result was the same . I check the console and there are lots of error
http://172.24.0.4:9000/api/api-browser/css/fonts.css net::ERR_CONNECTION_TIMED_OUT
but my gray log address is 10.0.2.106:9000
and I dont know what this IP is and how to change that
is there any suggestion ?

Hey @alireza

That is container IP Address, you either need to make routable or Bridge your container.

Example:

 graylog:
    image: graylog/graylog:4.2-jre11
    network_mode: bridge
    dns:
      - 192.168.2.15
      - 192.168.2.16
environment:
      - GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
      - GRAYLOG_HTTP_EXTERNAL_URI=http://192.168.1.28:9000/

Not sure how you set you docker up, I use docker-compose. with that example above I can access my node with http://192.168.1.28:9000/

thank you for your response.
I use docker-compose as it said on graylog websit with mongodb and elasticsearch and graylog inside it . I added the network as you said mode for graylog part but it could not connect to mongodb and elasticsearch so it didnt work , I uploaded my docker-compose .

Blockquote
version: ‘2’
services:

MongoDB: Docker

mongodb:
image: mongo:5.0.13
volumes:
- mongo_data:/data/db

Elasticsearch: Install Elasticsearch with Docker | Elasticsearch Guide [7.10] | Elastic

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
volumes:
- es_data:/usr/share/elasticsearch/data
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- “ES_JAVA_OPTS=-Xms512m -Xmx512m”
mem_limit: 1g

Graylog: Docker

graylog:
image: graylog/graylog:5.0
#network_mode: bridge
#dns:
# - 10.0.2.2
volumes:
- graylog_data:/usr/share/graylog/data
- ./graylog/config:/usr/share/graylog/data/config

environment:
  # CHANGE ME (must be at least 16 characters)!
  - GRAYLOG_PASSWORD_SECRET=somepasswordpepper
  # Password: admin
  - GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
  - GRAYLOG_HTTP_EXTERNAL_URI=http://10.0.2.106:9000/
  - GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
#entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 --  /docker-entrypoint.sh
links:
  - mongodb:mongo
  - elasticsearch
restart: always
depends_on:
  - mongodb
  - elasticsearch
ports:
  # Graylog web interface and REST API
  - 9000:9000
  # Syslog TCP
  - 1514:1514
  # Syslog UDP
  - 1514:1514/udp
  # GELF TCP
  - 12201-12210:12201-12210
  # GELF UDP
  - 12201:12201/udp
  # Volumes for persisting data, see https://docs.docker.com/engine/admin/volumes/volumes/

volumes:
mongo_data:
driver: local
es_data:
driver: local
graylog_data:
driver: local

Blockquote

Hey @alireza

Not sure if you got it right, looks like to commented out the network, the bridge will aloow network access alos, depned on what you wan to do.

Example:

version: '2'
services:
   
  mongodb:
    image: mongo:4
    network_mode: bridge
  
    volumes:
      - mongo_data:/data/db
  
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
    network_mode: bridge
  
    volumes:
      - es_data:/usr/share/elasticsearch/data
    environment:
      - http.host=0.0.0.0
      - transport.host=localhost
      - network.host=0.0.0.0
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    mem_limit: 1g
 
  graylog:
    image: graylog/graylog:4.2-jre11
    network_mode: bridge
    dns:
      - 192.168.2.15
      - 192.168.2.16
  
    volumes:
      - graylog_journal:/usr/share/graylog/data/journal
      - graylog_bin:/usr/share/graylog/bin
      - graylog_data:/usr/share/graylog/data
    environment:
      # Container time Zone
      - TZ=America/Chicago
     
      - GRAYLOG_PASSWORD_SECRET=pJodBpiuu2XLTZuyb2YW9eHiKLTifjy7cLpeWIjWW2nonDhN
      - GRAYLOG_ROOT_PASSWORD_SHA2=ef92b778c06659911881f383d4473e94f
      - GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
      - GRAYLOG_HTTP_EXTERNAL_URI=http://192.168.1.28:9000/
      - GRAYLOG_ROOT_TIMEZONE=America/Chicago

Here is some example for a different configuration if you want.

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