I tried following commands to set graylog server up properly on local:
$ docker run --name mongo -d mongo:3
$ docker run --name elasticsearch \
-e "http.host=0.0.0.0" \
-e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
-d docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.4
$ docker run --link mongo --link elasticsearch \
-p 9000:9000 -p 12201:12201 -p 514:514 \
-e GRAYLOG_HTTP_BIND_ADDRESS="127.0.0.1:9000" \
-d graylog/graylog:3.0
Issue -> Graylog docker container goes into unhealthy state after 2 minutes and web interface of graylog does not work.
and
$ docker run --name some-mongo -d mongo:3
$ docker run --name some-elasticsearch -d elasticsearch:2.3 elasticsearch -Des.cluster.name="graylog"
$ docker run --link some-mongo:mongo --link some-elasticsearch:elasticsearch -d graylog2/server
Issue -> Web interface of graylog container does not work due to connectivity issues with elastic search
(Although elastic search has been working fine in both the cases)
These are coming straight from official docs: http://docs.graylog.org/en/3.0/pages/installation/docker.html#plugins and http://docs.graylog.org/en/2.0/pages/installation/docker.html.
Following set of commands helped me bring the web interface for graylogs container up:
docker run --name some-mongo -d mongo:2
docker run --name some-elasticsearch -d elasticsearch:2 elasticsearch -Des.cluster.name="graylog"
```docker run --link some-mongo:mongo --link some-elasticsearch:elasticsearch -p 9000:9000 -e GRAYLOG_WEB_ENDPOINT_URI="http://127.0.0.1:9000/api" -d graylog2/server```
But graylog is not able to show any messages still:
This is what I see in console:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
FetchProvider.js:17 There was an error fetching a resource: cannot GET http://127.0.0.1:9000/api/system/indexer/cluster/name (500). Additional information: Couldn't read Elasticsearch cluster health
e @ FetchProvider.js:17
overview:1 Uncaught (in promise) Error: cannot GET http://127.0.0.1:9000/api/system/indexer/cluster/name (500)
at new e (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:1:2346)
at http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:1:3747
at i (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:37:73003)
at o._settlePromiseFromHandler (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:37:46325)
at o._settlePromise (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:37:47125)
at o._settlePromise0 (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:37:47824)
at o._settlePromises (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:37:49040)
at http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:37:2564
From previous event:
at o.p [as _captureStackTrace] (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:37:10310)
at o._then (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:37:41772)
at o.then (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:37:40128)
at l.i.then (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:104:89483)
at t.value (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:1:3290)
at http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:1:1493
at s (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:1:1510)
at s.name (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:172:104989)
at s.update (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:172:104590)
at s.init (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:172:104483)
at new s (http://localhost:9000/assets/vendor.552834c48b86209e305c.js:33:197120)
at Object.e.exports [as createStore] (http://localhost:9000/assets/vendor.552834c48b86209e305c.js:33:197722)
at Object.<anonymous> (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:172:104424)
at e (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:1:101)
at Object.IndexerCluster (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:1:165871)
at t.value (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:1:167745)
at t.value (http://localhost:9000/assets/plugin/org.graylog.plugins.threatintel.ThreatIntelPlugin/plugin.org.graylog.plugins.threatintel.ThreatIntelPlugin.6c0f0f46cac15ead5e4e.js:1:20254)
at Object.1027 (http://localhost:9000/assets/16.0cbba45d8aad71248f6d.js:1:275)
at e (http://localhost:9000/assets/app.0cbba45d8aad71248f6d.js:1:101)
at Object.934 (http://localhost:9000/assets/16.0cbba45d8aad71248f6d.js:1:34067)
at e (http://localhost:9000/assets/app.0cbba45d8aad71248f6d.js:1:101)
at Object.1435 (http://localhost:9000/assets/16.0cbba45d8aad71248f6d.js:1:8686)
at e (http://localhost:9000/assets/app.0cbba45d8aad71248f6d.js:1:101)
at http://localhost:9000/assets/3.0cbba45d8aad71248f6d.js:1:491213
127.0.0.1:9000/api/system/indexer/cluster/name:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
FetchProvider.js:17 There was an error fetching a resource: cannot GET http://127.0.0.1:9000/api/system/indexer/cluster/name (500). Additional information: Couldn't read Elasticsearch cluster health
This is what localhost:9200
shows:
{
"name" : "S_ZsXNA",
"cluster_name" : "elasticsearch_simrankaur",
"cluster_uuid" : "0-LP8o1WSNy_4HakjIpK7g",
"version" : {
"number" : "6.5.4",
"build_flavor" : "oss",
"build_type" : "tar",
"build_hash" : "d2ef93d",
"build_date" : "2018-12-17T21:17:40.758843Z",
"build_snapshot" : false,
"lucene_version" : "7.5.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
This is what I see in docker container logs:
2
019-02-25 20:05:41,073 INFO : org.graylog2.periodical.IndexerClusterCheckerThread - Indexer not fully initialized yet. Skipping periodic cluster check.
2019-02-25 20:05:41,078 INFO : org.graylog2.periodical.IndexRetentionThread - Elasticsearch cluster not available, skipping index retention checks.
2019-02-25 20:05:41,505 WARN : org.graylog2.migrations.V20161130141500_DefaultStreamRecalcIndexRanges - Interrupted or timed out waiting for Elasticsearch cluster, checking again.
2019-02-25 20:05:47,289 ERROR: org.graylog2.indexer.cluster.Cluster - Couldn't read cluster health for indices [graylog_*] (Could not connect to http://127.0.0.1:9200)
2019-02-25 20:05:47,331 ERROR: org.graylog2.indexer.cluster.Cluster - Couldn't read cluster health for indices [graylog_*] (Could not connect to http://127.0.0.1:9200)
2019-02-25 20:05:48,191 ERROR: org.graylog2.indexer.cluster.Cluster - Couldn't read cluster health for indices [graylog_*] (Could not connect to http://127.0.0.1:9200)
2019-02-25 20:05:48,265 ERROR: org.graylog2.indexer.cluster.Cluster - Couldn't read cluster health for indices [graylog_*] (Could not connect to http://127.0.0.1:9200)
2019-02-25 20:05:56,900 INFO : org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Validating all active sessions...
2019-02-25 20:05:56,905 INFO : org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Finished session validation. No sessions were stopped.
2019-02-25 20:06:11,044 ERROR: org.graylog2.indexer.cluster.Cluster - Couldn't read cluster health for indices [graylog_*] (Could not connect to http://127.0.0.1:9200)
2019-02-25 20:06:11,044 INFO : org.graylog2.periodical.IndexerClusterCheckerThread - Indexer not fully initialized yet. Skipping periodic cluster check.
2019-02-25 20:06:41,004 ERROR: org.graylog2.indexer.cluster.Cluster - Couldn't read cluster health for indices [graylog_*] (Could not connect to http://127.0.0.1:9200)
2019-02-25 20:06:41,004 INFO : org.graylog2.periodical.IndexerClusterCheckerThread - Indexer not fully initialized yet. Skipping periodic cluster check.
2019-02-25 20:06:41,437 WARN : org.graylog2.migrations.V20161130141500_DefaultStreamRecalcIndexRanges - Interrupted or timed out waiting for Elasticsearch cluster, checking again.
2019-02-25 20:07:10,971 ERROR: org.graylog2.indexer.cluster.Cluster - Couldn't read cluster health for indices [graylog_*] (Could not connect to http://127.0.0.1:9200)
2019-02-25 20:07:10,971 INFO : org.graylog2.periodical.IndexerClusterCheckerThread - Indexer not fully initialized yet. Skipping periodic cluster check.
2019-02-25 20:07:40,934 ERROR: org.graylog2.indexer.cluster.Cluster - Couldn't read cluster health for indices [graylog_*] (Could not connect to http://127.0.0.1:9200)
2019-02-25 20:07:40,935 INFO : org.graylog2.periodical.IndexerClusterCheckerThread - Indexer not fully initialized yet. Skipping periodic cluster check.
2019-02-25 20:07:41,369 WARN : org.graylog2.migrations.V20161130141500_DefaultStreamRecalcIndexRanges - Interrupted or timed out waiting for Elasticsearch cluster, checking again.
How can I have this working properly on mac?