Coder Social home page Coder Social logo

Comments (6)

tobias-g avatar tobias-g commented on May 20, 2024 1

Yep looks like that was it 👍

Started elastic search and followed the logs unitl I saw

[2018-08-07T14:37:25,519][INFO ][o.e.c.m.MetaDataCreateIndexService] [XZjuckQ] [.triggered_watches] creating index, cause [auto(bulk api)], templates [triggered_watches], shards [1]/[1], mappings [triggered_watch]

And started graylog after that, streams and inputs all accounted for and present after that.

Also as far as exposing the data directory in ES using AWS ES anyway the above was just a local example.

Thanks for the help here :)

from graylog-docker.

mariussturm avatar mariussturm commented on May 20, 2024

Hi,
in general that should work. Do you see any error in the server logs related to content pack loading?

from graylog-docker.

tobias-g avatar tobias-g commented on May 20, 2024

See the following when I look for content pack related stuff in graylog logs.

2018-08-07 13:52:26,037 ERROR: org.graylog2.bundles.BundleImporter - Error while creating entities in content pack. Starting rollback.
java.lang.IllegalStateException: No default index set configured. This is a bug!
    at com.google.common.base.Preconditions.checkState(Preconditions.java:459) ~[graylog.jar:?]
    at org.graylog2.indexer.indexset.MongoIndexSetService.getDefault(MongoIndexSetService.java:105) ~[graylog.jar:?]
    at org.graylog2.indexer.MongoIndexSetRegistry.getDefault(MongoIndexSetRegistry.java:145) ~[graylog.jar:?]
    at org.graylog2.bundles.BundleImporter.createStream(BundleImporter.java:573) ~[graylog.jar:?]
    at org.graylog2.bundles.BundleImporter.createStreams(BundleImporter.java:557) ~[graylog.jar:?]
    at org.graylog2.bundles.BundleImporter.runImport(BundleImporter.java:189) [graylog.jar:?]
    at org.graylog2.bundles.BundleService.applyConfigurationBundle(BundleService.java:112) [graylog.jar:?]
    at org.graylog2.periodical.ContentPackLoaderPeriodical.doRun(ContentPackLoaderPeriodical.java:196) [graylog.jar:?]
    at org.graylog2.plugin.periodical.Periodical.run(Periodical.java:77) [graylog.jar:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
2018-08-07 13:52:26,085 INFO : org.graylog2.inputs.InputStateListener - Input [Syslog TCP/5b69a4194cedfd0001f3c24d] is now STARTING
2018-08-07 13:52:26,067 ERROR: org.graylog2.periodical.ContentPackLoaderPeriodical - Uncaught exception in periodical
java.lang.RuntimeException: java.lang.IllegalStateException: No default index set configured. This is a bug!
    at org.graylog2.bundles.BundleImporter.runImport(BundleImporter.java:200) ~[graylog.jar:?]
    at org.graylog2.bundles.BundleService.applyConfigurationBundle(BundleService.java:112) ~[graylog.jar:?]
    at org.graylog2.periodical.ContentPackLoaderPeriodical.doRun(ContentPackLoaderPeriodical.java:196) ~[graylog.jar:?]
    at org.graylog2.plugin.periodical.Periodical.run(Periodical.java:77) [graylog.jar:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
Caused by: java.lang.IllegalStateException: No default index set configured. This is a bug!
    at com.google.common.base.Preconditions.checkState(Preconditions.java:459) ~[graylog.jar:?]
    at org.graylog2.indexer.indexset.MongoIndexSetService.getDefault(MongoIndexSetService.java:105) ~[graylog.jar:?]
    at org.graylog2.indexer.MongoIndexSetRegistry.getDefault(MongoIndexSetRegistry.java:145) ~[graylog.jar:?]
    at org.graylog2.bundles.BundleImporter.createStream(BundleImporter.java:573) ~[graylog.jar:?]
    at org.graylog2.bundles.BundleImporter.createStreams(BundleImporter.java:557) ~[graylog.jar:?]
    at org.graylog2.bundles.BundleImporter.runImport(BundleImporter.java:189) ~[graylog.jar:?]
    ... 4 more

Not sure what to make of it to be honest, hopefully makes more sense to someone else.

from graylog-docker.

mariussturm avatar mariussturm commented on May 20, 2024

The default index set in Elasticsearch that is created during first start-up is not there. Maybe your ES cluster is in an error state or not accessible at all?

from graylog-docker.

tobias-g avatar tobias-g commented on May 20, 2024

Running the following locally gets me this scenario:

docker run --name mongo -d mongo:3

docker run --name elasticsearch \
    -e "http.host=0.0.0.0" \
    -e "xpack.security.enabled=false" \
    -d docker.elastic.co/elasticsearch/elasticsearch:5.6.2

docker create --link mongo --link elasticsearch \
    -p 9000:9000 -p 12201:12201 -p 514:514 -p 5555:5555 \
    --name graylog \
    -e GRAYLOG_CONTENT_PACKS_LOADER_ENABLED=true \
    -e GRAYLOG_CONTENT_PACKS_AUTO_LOAD=input.json,streams.json \
    -e GRAYLOG_CONTENT_PACKS_DIR=data/contentpacks \
    -e GRAYLOG_WEB_ENDPOINT_URI="http://127.0.0.1:9000/api" \
    graylog/graylog:2.4

docker cp /tmp/contentpacks/. graylog:/usr/share/graylog/data/contentpacks/

docker start graylog

Elastic search doesn't seem to be in an error state as far as I can tell.

Not used elastic search too much so is this a case of needing to wait a bit for elastic search to start and settle itself or do I need to set something up in elastic search before I start graylog to get the default index set?

GrayLog does eventually start up and work as expected so it's either fixing this issue itself of waiting until that index is there?

from graylog-docker.

mariussturm avatar mariussturm commented on May 20, 2024

That's possible, there shout be a log message about it later in the file. Usually you expose the data directory of the ES container anyways to keep state of the system. If you let it create once the import of the content pack should work then.

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.