Default Config Name
Minor note:
When launching the graylog-web-interface binary it looks for graylog-web-interface.conf rather than web.conf, which looks to be copied from /etc/graylog/web to /usr/share/graylog-web/conf on startup but doesn't rename it to match what it's looking for? Manually renaming web.conf to graylog-web-interface.conf or specifying it isn't a huge deal.
[jro@fr-glog-03-it bin]# ./graylog-web-interface -Dhttp.port=disabled -Dhttps.port=9000 Play server process ID is 28465 08:31:34.132 [main] ERROR lib.Global - Your configuration should be at /usr/share/graylog-web/conf/graylog-web-interface.conf but does not exist, cannot continue without it. Oops, cannot start the server. java.lang.IllegalStateException: Missing configuration file /usr/share/graylog-web/conf/graylog-web-interface.conf
Centos6 graylog-web-1.1.1-1.noarch graylog-server-1.1.1-1.noarch
In order to pass https without setting up a keystore, I have to manually run the binary so it auto generates one. Using the normal init file with https settings will not auto generate a keystore if hasn't been created yet. After running the binary I can then use the init file with https params:
[jro@fr-glog-02-it bin]# ./graylog-web-interface -Dhttp.port=disabled -Dhttps.port=9000 Play server process ID is 704 [info] play - Application started (Prod) [info] play - Listening for HTTPS on port /0:0:0:0:0:0:0:0:9000 [warn] play - Using generated key with self signed certificate for HTTPS. This should not be used in production. [info] play - Generating HTTPS key pair in /usr/share/graylog-web/conf/generated.keystore - this may take some time. If nothing happens, try moving the mouse/typing on the keyboard to generate some entropy.
@bernd could you look into these issues if there's a packaging problem?
Possibly we need to update the documentation for the HTTPS issue, too.
Will do, thanks for the heads up!
@reighnman There was an issue with the init scripts that basically discarded the value of GRAYLOG_WEB_JAVA_OPTS.
This has been fixed in the latest revision of the packages. (1.1.2-4)
I tried to start the web interface with the following set in /etc/sysconfig/graylog-web.
GRAYLOG_WEB_JAVA_OPTS="-Dhttp.port=disabled -Dhttps.port=9000"
After restarting the web process via /etc/init.d/graylog-web restart, I see the following in the log.
Generating HTTPS key pair in /usr/share/graylog-web/conf/generated.keystore - this may take some time. If nothing happens, try moving the mouse/typing on the keyboard to generate some entropy.
So that works now. One problem though: /usr/share/graylog-web/conf is actually a symlink to /etc/graylog/web. That directory is not writable by the graylog-web user so the generation of the generated.keystore fails.
Unfortunately, the location of the generated.keystore file is hardcoded in the Play! framework source code so we cannot change that. :confused:
To make this work, you can execute chown graylog-web /etc/graylog/web so the web interface process can store the generated keystore file.
To summarize: adding the java opts in /etc/sysconfig/graylog-web and changing the owner of the /etc/graylog/web directory makes it work for me. (using the latest packages)
I will close this issue now, please re-open if you still have problems.
Unable map to port 80 from 9000. I get below error
[[email protected]]# bin/graylog-web-interface -Dhttp.port=80 -Dhttp.address=192.168.1.10
Play server process ID is 22075
[error] o.g.r.l.ApiClient - API failed due to IO error
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: ; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148) ~[com.fasterxml.jackson.core.jackson-databind-2.5.0.jar:2.5.0]
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3605) ~[com.fasterxml.jackson.core.jackson-databind-2.5.0.jar:2.5.0]
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3545) ~[com.fasterxml.jackson.core.jackson-databind-2.5.0.jar:2.5.0]
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2576) ~[com.fasterxml.jackson.core.jackson-databind-2.5.0.jar:2.5.0]
at org.graylog2.restclient.lib.ApiClientImpl.deserializeJson(ApiClientImpl.java:215) ~[org.graylog2.graylog2-rest-client-1.0.1.jar:na]
[error] o.g.r.l.ApiClient - API failed due to IO error
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: ; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148) ~[com.fasterxml.jackson.core.jackson-databind-2.5.0.jar:2.5.0]
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3605) ~[com.fasterxml.jackson.core.jackson-databind-2.5.0.jar:2.5.0]
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3545) ~[com.fasterxml.jackson.core.jackson-databind-2.5.0.jar:2.5.0]
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2576) ~[com.fasterxml.jackson.core.jackson-databind-2.5.0.jar:2.5.0]
at org.graylog2.restclient.lib.ApiClientImpl.deserializeJson(ApiClientImpl.java:215) ~[org.graylog2.graylog2-rest-client-1.0.1.jar:na]
[info] play - Application started (Prod)
Oops, cannot start the server.
org.jboss.netty.channel.ChannelException: Failed to bind to: /192.168.1.10:80
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
at play.core.server.NettyServer$$anonfun$8.apply(NettyServer.scala:129)
at play.core.server.NettyServer$$anonfun$8.apply(NettyServer.scala:126)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer.<init>(NettyServer.scala:126)
at play.core.server.NettyServer$.createServer(NettyServer.scala:243)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:280)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:275)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:275)
at play.core.server.NettyServer.main(NettyServer.scala)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296)
at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
@sathishdsgithub We are using GitHub issues for tracking bugs in Graylog itself, but this doesn't look like one. Please post this issue to our discussion forum or join the #graylog channel on freenode IRC.
Thank you!