I have manged to install Graylog2 from scratch by downloading all the DEB files and making the configurations. Now I try to install Graylog2 with the help of puppet in an environment and had no luck so far.
I am using elasticsearch/elasticsearch and graylog/graylog from the forge.
This is my configuration so far:
#site.pp
node 'mynode' {
class {'apt':
proxy_host => 'proxynode',
proxy_port => '3142',
}
class {'toolbox':}
class {'java':}
class {'elasticsearch':
ensure => 'present',
#enabled => ensure running + enabled true
status => 'enabled',
###only works with the repository
#version => '1.3.2',
package_url => 'puppet:///files/deb/elasticsearch-0.90.13.deb',
}
elasticsearch::instance {'graylog2':}
class {'mongodb':}
class {'graylog2::repo':
version => '0.21',
} ->
class {'graylog2::server':
service_enable => 'true',
rest_listen_uri => "http://${::ipaddress}:12900",
rest_transport_uri => "http://${::ipaddress}:12900",
#verysecurepw
password_secret => 'cdebc192e0ae1f5df753018a8d284b9eacf2042d55fb712f7a89260c3fc3668d',
root_password_sha2 => 'cdebc192e0ae1f5df753018a8d284b9eacf2042d55fb712f7a89260c3fc3668d',
} ->
class {'graylog2::web':
application_secret => 'cdebc192e0ae1f5df753018a8d284b9eacf2042d55fb712f7a89260c3fc3668d',
graylog2_server_uris => ["http://${::ipaddress}:12900"],
}
}
The deb packages are downloaded successfully and installed as well. When I use a custom elasticsearch instance it starts up automatically, if I don't the instance does not start.
However if I try to start graylog-server it gives me the following:
ERROR: Could not successfully connect to ElasticSearch. Check that your cluster state is not RED and that ElasticSearch is running properly.
Checking the Elasticsearch service:
curl -XGET 'http://192.168.0.1:9200/_cluster/health?pretty=true'
{
"cluster_name" : "elasticsearch",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 2,
"number_of_data_nodes" : 2,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0
}
Looks OK
Looking on the Webpage 192.168.0.1:9000 gives me an error that graylog-web service can't connect to the server.
Maybe I am missing a connection between graylog and Elasticsearch, but I can't seem to find it.
The Graylog Error Log:
2014-09-09T12:02:54.383+02:00 ERROR [ServiceManager] Service IndexerSetupService [FAILED] has failed in the STARTING state.
java.lang.IllegalStateException
at org.graylog2.UI.exitHardWithWall(UI.java:40)
at org.graylog2.indexer.Indexer.start(Indexer.java:205)
at org.graylog2.initializers.IndexerSetupService.startUp(IndexerSetupService.java:66)
at com.google.common.util.concurrent.AbstractIdleService$2$1.run(AbstractIdleService.java:54)
at com.google.common.util.concurrent.Callables$3.run(Callables.java:95)
at java.lang.Thread.run(Thread.java:745)
2014-09-09T12:02:54.394+02:00 ERROR [InputSetupService] Not starting any inputs because lifecycle is: Uninitialized?[LB:DEAD]
2014-09-09T12:02:54.404+02:00 INFO [PeriodicalsService] Shutting down periodical [org.graylog2.periodical.DeflectorManagerThread].
2014-09-09T12:02:54.404+02:00 INFO [PeriodicalsService] Shutdown of periodical [org.graylog2.periodical.DeflectorManagerThread] complete, took <0ms>.
---snip---