Giter VIP home page Giter VIP logo

Comments (8)

philgh avatar philgh commented on July 30, 2024

Is the webinterface also using authentication for mongodb? Could you post your graylog2.conf and mongodb.yml?

from graylog2-server.

flavio avatar flavio commented on July 30, 2024

Contents of /etc/graylog2.conf

# On which port (UDP) should we listen for Syslog messages? (Standard: 514)  
syslog_listen_port = 514
syslog_protocol = udp

# MongoDB Configuration
mongodb_useauth = true
mongodb_user = grayloguser
mongodb_password = 123
mongodb_host = localhost
#mongodb_replica_set = localhost:27017,localhost:27018,localhost:27019
mongodb_database = graylog2
mongodb_port = 27017
mongodb_max_connections = 500

# The (pre-allocated) size of the messages collection in bytes.. (All your syslog and GELF messages are stored here. Standard: 50000000 [~50MB])
messages_collection_size = 50000000 

# Graylog Extended Log Format (GELF)
use_gelf = true
gelf_listen_port = 12201

Contents of mongodb.yml
production:
hostname: localhost
database: graylog2
port: 27017
authenticate: false
username:
password:

"graylog2-web-interface" works means: no exceptions is generated while browsing it. Unfortunately my mongodb is empty so there's nothing to show.

from graylog2-server.

lennartkoopmann avatar lennartkoopmann commented on July 30, 2024

Try to set mongodb_useauth to false. Also: Is the web interface running on the same host as the server?

from graylog2-server.

philgh avatar philgh commented on July 30, 2024

To use authentication you have to do:

  • start mongod with "--auth"
  • connect to monodb
    ./mongo
    MongoDB shell version: 1.6.5
    connecting to: test
    
    

set admin user (after this you always have to authenticate)

use admin
db.addUser("myadminuser","password")

authenticate

db.auth("myadminuser","password")

add user for the graylog2 db

use graylog2
db.addUser("grayloguser","123");

PS: to use the password "123" in mongodb.yml be sure to use quotation marks, otherwise you'll get an exception.

from graylog2-server.

lennartkoopmann avatar lennartkoopmann commented on July 30, 2024

Thanks. Did this fix your problem?

from graylog2-server.

flavio avatar flavio commented on July 30, 2024

Try to set mongodb_useauth to false.

This solved the issue.

Also: Is the web interface running on the same host as the server?

Yes, everything is running on the same server.

from graylog2-server.

flavio avatar flavio commented on July 30, 2024

I tried also the solution proposed by philgh but it didn't work.

from graylog2-server.

lennartkoopmann avatar lennartkoopmann commented on July 30, 2024

Great. Thank you both!

from graylog2-server.

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.