Hi,
I am using a graylog 5.1.9 installed manually using the following procedure (procedure):
wget https://packages.graylog2.org/repo/packages/graylog-5.0-repository_latest.deb
sudo dpkg -i graylog-5.0-repository_latest.deb
sudo apt-get update
sudo apt-get install graylog-server
For testing purpose, I wanted to replace the graylog.jar placed in /usr/share/graylog/ by a graylog.jar locally compiled version based on he original sources from github.
I cloned graylog2-server from the official github repo : https://github.com/Graylog2/graylog2-server.git
Then I used mvn compile and then mvn jar:jar install:install in order to retrieve a locally compiled graylog.jar.
Then I replaced graylog.jar in /usr/share/graylog/ but now graylog does not work anymore.
I get this error:
janv. 02 13:33:57 DEV-X systemd[1]: Started Graylog server.
janv. 02 13:33:58 DEV-X graylog-server[110224]: Exception in thread "main" java.lang.NoClassDefFoundError: com/github/rvesse/airline/Cli
janv. 02 13:33:58 DEV-X graylog-server[110224]: at org.graylog2.bootstrap.Main.main(Main.java:29)
janv. 02 13:33:58 DEV-X graylog-server[110224]: Caused by: java.lang.ClassNotFoundException: com.github.rvesse.airline.Cli
janv. 02 13:33:58 DEV-X graylog-server[110224]: at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
janv. 02 13:33:58 DEV-X graylog-server[110224]: at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
janv. 02 13:33:58 DEV-X graylog-server[110224]: at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
janv. 02 13:33:58 DEV-X graylog-server[110224]: ... 1 more
janv. 02 13:33:58 DEV-X systemd[1]: graylog-server.service: Main process exited, code=exited, status=1/FAILURE
janv. 02 13:33:58 DEV-X systemd[1]: graylog-server.service: Failed with result 'exit-code'.
The code was not modified at all. Does anyone knows why graylog behaves this way ?
Would it come from my previous Graylog 5.1.9 version installed ? Or would it come from the way graylog.jar is executed ?
This the execution command from the graylog-server systemctl service:
usr/share/graylog-server/jvm/bin/java -Xms1g -Xmx1g -server -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -Djdk.tls.acknowledgeCloseNotify=true -Dlog4j2.formatMsgNoLookups=true -jar -Dlog4j.configurationFile=file:///etc/graylog/server/log4j2.xml -Djava.library.path=/usr/share/graylog-server/lib/sigar -Dgraylog2.installation_source=deb /usr/share/graylog-server/graylog.jar server -f /etc/graylog/server/server.conf -np
All confs / files are originals and were not altered / modified.