Coder Social home page Coder Social logo

Comments (3)

joschi avatar joschi commented on May 20, 2024

@Zs14 What systems are your Docker containers running on?

from graylog-docker.

boizoe avatar boizoe commented on May 20, 2024

Oh, shi*
sorry.

It CentOS 7 with docker 1.12

from graylog-docker.

joschi avatar joschi commented on May 20, 2024

@Zs14 I'm unable to reproduce the problem with the example in the README file.

You probably shouldn't set web_listen_uri to 127.0.0.1 if you want to access it from outside of the container. 😉

I've tried to reproduce the issue with the following Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.provider "virtualbox" do |vb|
    vb.memory = "4096"
  end

  config.vm.provision "shell", inline: <<-SHELL
    # Install Docker from the CentOS repository
    sudo yum --quiet --assumeyes install docker
    # Start Docker daemon
    sudo service docker start
    # Download Docker images for MongoDB, Elasticsearch, and Graylog
    sudo docker pull mongo:3
    sudo docker pull docker.elastic.co/elasticsearch/elasticsearch:5.6.5
    sudo docker pull graylog/graylog:2.3.2-1
    # Start Docker containers as described in https://github.com/Graylog2/graylog-docker/blob/2.3.2-1/README.md#quick-start
    sudo docker run --name mongo -d mongo:3
    sudo docker run --name elasticsearch -e "http.host=0.0.0.0" -e "discovery.type=single-node" -e "xpack.security.enabled=false" -d docker.elastic.co/elasticsearch/elasticsearch:5.6.5
    sudo docker run --link mongo --link elasticsearch --name graylog -p 9000:9000 -e GRAYLOG_WEB_ENDPOINT_URI="http://127.0.0.1:9000/api" -d graylog/graylog:2.3.2-1
  SHELL
end

Start Vagrant box

# vagrant up

Log into Vagrant box

$ vagrant ssh
[vagrant@localhost ~]$ sudo -i
[root@localhost ~]# docker ps
CONTAINER ID        IMAGE                                                 COMMAND                  CREATED              STATUS              PORTS                    NAMES
5d0ea9ad2b7f        graylog/graylog:2.3.2-1                               "/docker-entrypoint.s"   About a minute ago   Up About a minute   0.0.0.0:9000->9000/tcp   graylog
8717c19fbba4        docker.elastic.co/elasticsearch/elasticsearch:5.6.5   "/bin/bash bin/es-doc"   About a minute ago   Up About a minute   9200/tcp, 9300/tcp       elasticsearch
adf6c9bb7936        mongo:3                                               "docker-entrypoint.sh"   About a minute ago   Up About a minute   27017/tcp                mongo
[root@localhost ~]# curl -i http://127.0.0.1:9000/
HTTP/1.1 200 OK
X-UA-Compatible: IE=edge
X-Graylog-Node-ID: 2a40c6f7-a2a4-4e0c-8b17-2c79bf04be2c
Content-Type: text/html
Date: Thu, 07 Dec 2017 14:41:10 GMT
Content-Length: 1316

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="robots" content="noindex, nofollow">
    <meta charset="UTF-8">
    <title>Graylog Web Interface</title>
    <link rel="shortcut icon" href="/assets/favicon.png">

  </head>
  <body>
    <script src="/config.js"></script>

    <script src="/assets/vendor.ab8f49e0e782eae99198.js"></script>

    <script src="/assets/polyfill.e83b3dfb1898222fd83b.js"></script>

    <script src="/assets/plugin/org.graylog.plugins.pipelineprocessor.ProcessorPlugin/plugin.org.graylog.plugins.pipelineprocessor.PipelineProcessorPlugin.54b3d0ec48cf21479ac0.js"></script>

    <script src="/assets/plugin/org.graylog.plugins.map.MapWidgetPlugin/plugin.org.graylog.plugins.map.MapWidgetPlugin.1844ee17febe31dc0551.js"></script>

    <script src="/assets/plugin/org.graylog.plugins.enterprise_integration.EnterpriseIntegrationPlugin/plugin.org.graylog.plugins.enterprise_integration.EnterpriseIntegrationPlugin.6174e551785d65068d4a.js"></script>

    <script src="/assets/plugin/org.graylog.plugins.collector.CollectorPlugin/plugin.org.graylog.plugins.collector.CollectorPlugin.2877139cd3f598ce5020.js"></script>

    <script src="/assets/app.e83b3dfb1898222fd83b.js"></script>

  </body>
</html>
[root@localhost ~]# curl -i http://127.0.0.1:9000/config.js
HTTP/1.1 200 OK
X-Graylog-Node-ID: 2a40c6f7-a2a4-4e0c-8b17-2c79bf04be2c
Content-Type: application/javascript
Date: Thu, 07 Dec 2017 14:41:14 GMT
Content-Length: 116

window.appConfig = {
  gl2ServerUrl: 'http://127.0.0.1:9000/api',
  gl2AppPathPrefix: '',
  rootTimeZone: 'UTC',
};
[root@localhost ~]# curl -i http://127.0.0.1:9000/api/?pretty=true
HTTP/1.1 200 OK
X-Graylog-Node-ID: 2a40c6f7-a2a4-4e0c-8b17-2c79bf04be2c
X-Runtime-Microseconds: 24377
Content-Type: application/json
Date: Thu, 07 Dec 2017 14:41:28 GMT
Content-Length: 253

{
  "cluster_id" : "99f8e36e-7d65-4ed4-83ab-222794132d7f",
  "node_id" : "2a40c6f7-a2a4-4e0c-8b17-2c79bf04be2c",
  "version" : "2.3.2+3df951e",
  "tagline" : "Manage your logs in the dark and have lasers going and make it look like you're from space!"
}
[root@localhost ~]# docker stop graylog elasticsearch mongo
graylog
elasticsearch
mongo
[root@localhost ~]# logout
[vagrant@localhost ~]$ logout
Shared connection to 127.0.0.1 closed.

from graylog-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.