Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.38k stars 1.06k forks source link

Ubuntu 18.04 Support Or Documentation Needed #4837

Closed Chirishman closed 6 years ago

Chirishman commented 6 years ago

Followed the installation instructions from this document and graylog-server.service will not start under Ubuntu 18.04

Expected Behavior

Server starts successfully when all steps in documentation are followed.

Current Behavior

Server is not writing anything to /var/log/graylog-server/ before crashing. Checking my syslog I see the following errors:

graylog-server[4770]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release
graylog-server[4770]: Unrecognized VM option 'UseParNewGC'
graylog-server[4770]: Error: Could not create the Java Virtual Machine.
graylog-server[4770]: Error: A fatal exception ahs occurred. Program will exit.
systemd[1]; graylog-server.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]; graylog-server.service: Failed with result 'exit-code'.

Possible Solution

Support newer versions of Java or document specific java version dependency and include it in the prereqs portion of the install documentation

Steps to Reproduce (for bugs)

  1. Create a clean install of Ubuntu 18.04
  2. Follow the install instructions at http://docs.graylog.org/en/2.4/pages/installation/os/ubuntu.html
  3. Read /var/log/syslog

Context

Attempting to spin up a test instance of Graylog in my lab environment in an 18.04 VM.

Your Environment

Ubuntu 18.04 - Clean install

sudo apt update
sudo apt full-upgrade -y
sudo apt install -y default-jre apt-transport-https

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
sudo apt update
sudo apt install elasticsearch mongodb -y

wget https://packages.graylog2.org/repo/packages/graylog-2.4-repository_latest.deb
sudo dpkg -i graylog-2.4-repository_latest.deb
sudo apt update
sudo apt install -y graylog-server

Followed by the manual changes to the config files suggested by your docs, then enabling and starting/restarting all services.

joschi commented 6 years ago

@Chirishman Graylog 2.x is not compatible with Java 9 or later. You'll have to downgrade to Java 8, e. g. by installing openjdk-8-jre-headless which the documentation mentions.

joschi commented 6 years ago

I've just tested the installation instructions at http://docs.graylog.org/en/2.4/pages/installation/os/ubuntu.html on a fresh Ubuntu 18.04 LTS system (https://app.vagrantup.com/ubuntu/boxes/bionic64) and they worked without problems.

root@ubuntu-bionic:~# lsb_release -cr
Release:    18.04
Codename:   bionic
root@ubuntu-bionic:~# dpkg -l graylog-server elasticsearch mongodb-org* openjdk*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                                                  Version                                         Architecture                                    Description
+++-=====================================================================================-===============================================-===============================================-===============================================================================================================================================================================
ii  elasticsearch                                                                         5.6.9                                           all                                             Elasticsearch is a distributed RESTful search engine built for the cloud. Reference documentation can be found at https://www.elastic.co/guide/en/elasticsearch/reference/curre
ii  graylog-server                                                                        2.4.5-1                                         all                                             Graylog server
ii  mongodb-org                                                                           3.6.5                                           amd64                                           MongoDB open source document-oriented database system (metapackage)
ii  mongodb-org-mongos                                                                    3.6.5                                           amd64                                           MongoDB sharded cluster query router
ii  mongodb-org-server                                                                    3.6.5                                           amd64                                           MongoDB database server
ii  mongodb-org-shell                                                                     3.6.5                                           amd64                                           MongoDB shell client
ii  mongodb-org-tools                                                                     3.6.5                                           amd64                                           MongoDB tools
un  mongodb-org-unstable                                                                  <none>                                          <none>                                          (no description available)
un  mongodb-org-unstable-mongos                                                           <none>                                          <none>                                          (no description available)
un  mongodb-org-unstable-server                                                           <none>                                          <none>                                          (no description available)
un  mongodb-org-unstable-shell                                                            <none>                                          <none>                                          (no description available)
un  mongodb-org-unstable-tools                                                            <none>                                          <none>                                          (no description available)
un  openjdk-11-jre-headless                                                               <none>                                          <none>                                          (no description available)
ii  openjdk-8-jre-headless:amd64                                                          8u171-b11-0ubuntu0.18.04.1                      amd64                                           OpenJDK Java runtime, using Hotspot JIT (headless)
root@ubuntu-bionic:~# curl http://localhost:9000/api/?pretty=true
{
  "cluster_id" : "33293a64-beba-4dc7-91e1-ca8cc21f7a50",
  "node_id" : "de984781-a0fc-4130-b7de-f37a6b48a0b8",
  "version" : "2.4.5+8e18e6a",
  "tagline" : "Manage your logs in the dark and have lasers going and make it look like you're from space!"
}

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!

grownuphacker commented 6 years ago

I'd highly suggest adding sudo add-apt-repository universe at the very start of the docs to allow copy/pasting the rest of the install docs for 18.04

OndrejValenta commented 5 years ago

Is this a limitation that will forever be like this or are you working on supporting new versions of Java? Just to see the future.