JETTY_LOGS is added to JETTY_HOME

I am trying to run Jetty on CentOS and am having problems since I get unexpected results when I try to set the full path for JETTY_LOGS. The system tries to take this path and add it to the path specified in the JETTY_HOME variable.

JETTY_HOME=/usr/local/jetty/jetty-9.1.4
JETTY_USER=jetty
JETTY_PORT=8085
JETTY_HOST=0.0.0.0
JETTY_LOGS=/usr/local/jetty/jetty-9.1.4/logs

Any ideas on what I'm doing wrong?

The error I am getting is:

Starting Jetty: java.io.IOException: Cannot write start.log to directory
/usr/local/jetty/jetty-9.1.4/usr/local/jetty/jetty-9.1.4/logs [directory doesn't exist or is read-only]
java.io.IOException: Cannot write start.log to directory /usr/local/jetty/jetty-9.1.4/usr/local/jetty/jetty-9.1.4/logs [directory doesn't exist or is read-only]
        at org.eclipse.jetty.start.StartLog.initLogFile(StartLog.java:127)
        at org.eclipse.jetty.start.StartLog.initialize(StartLog.java:113)
        at org.eclipse.jetty.start.Main.processCommandLine(Main.java:520)
        at org.eclipse.jetty.start.Main.main(Main.java:102)
+4
source share
2 answers

The JETTY_LOG directory seems to be from JETTY_HOME.

Could you try to install:

 JETTY_LOGS=/logs

or alternatively

 JETTY_HOME=/usr/local/jetty/jetty-9.1.4/
 JETTY_LOGS=logs
+1
source

You are not doing anything wrong, this is the new behavior at berth 9.1.4:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=432192

- JETTY_LOGS env var dir- (, logs dir, tarball-):

JETTY_LOGS=logs

/usr/local/jetty/jetty-9.1.4/logs ( dir ).

, - , - JETTY_LOGS=logs env ; , /var/log/jetty:

# mv /usr/local/jetty/jetty-9.1.4/logs /var/log/jetty
# ln -s /var/log/jetty /usr/local/jetty/jetty-9.1.4/logs

, , , , , ; jetty jetty, dir:

# chown -R jetty:jetty /var/log/jetty
0

Source: https://habr.com/ru/post/1538936/


All Articles