ERROR: 哎呀!Jetty 似乎没有安装

huangapple 未分类评论46阅读模式
英文:

ERROR: Oops! Jetty doesn't appear to be installed

问题

特定错误:

** 错误:糟糕!Jetty 似乎没有安装在 /home/nicholas

尝试从控制台运行 /usr/share/jetty9/bin/jetty.sh restart

就我个人而言,我不会期望 aptJetty 安装到 home,所以就目前而言,这是可以接受的。显然存在配置错误或者我没有正确启动它。

尝试启动 jetty

nicholas@tech:~$ 
nicholas@tech:~$ /usr/share/jetty9/bin/jetty.sh restart
/usr/share/jetty9/bin/jetty.sh:第 250 行:cd:/opt/jetty9:没有那个文件或目录
** 错误:糟糕!Jetty 似乎没有安装在 /home/nicholas
** 错误:  /home/nicholas/start.jar 不可读!
nicholas@tech:~$ 

/etc/default/jetty9 的内容:

# 将 'no' 更改为默认设置,或取消注释以使用 /etc/default/rcS 中的默认设置
VERBOSE=yes

# 以此用户 ID 运行 Jetty(默认:jetty)
# 将其设置为空字符串可阻止 Jetty 自动启动
#JETTY_USER=jetty

# Java 运行时环境(JRE)的主目录。您至少需要 Java 8。如果未设置 JAVA_HOME,则会尝试一些常见的 OpenJDK 和 Oracle JDK 目录。
#JAVA_HOME=

# 传递给 JVM 的额外选项
#JAVA_OPTIONS="-Djava.awt.headless=true"

# 关闭所有 Web 应用程序的超时时间(以秒为单位)
#JETTY_SHUTDOWN=30

# 传递给 Jetty 的其他参数
#JETTY_ARGS=

# Jetty 使用目录存储临时文件,如已解压的 Web 应用程序
#JETTY_TMP=/var/cache/jetty9

# 在 /var/log/jetty9/ 中保留旧日志文件的天数,默认为 14 天
#LOGFILE_DAYS=14

# 如果您在端口号都大于 1023 的情况下运行 Jetty,则不需要 authbind。它用于将 Jetty 绑定到较低的端口号。
# (yes/no,默认:no)
#AUTHBIND=yes



JETTY_HOME=/opt/jetty9
JETTY_USER=jetty9
JETTY_PORT=8080
#JETTY_HOST=<span style="color: #ff0000;">127.0.0.1</span>
JETTY_LOGS=/opt/jetty9/logs/

我按照 建议 添加了最后几行。

Jetty 是在 Ubuntu 上使用 apt 进行了 安装

英文:

Specific error:

** ERROR: Oops! Jetty doesn't appear to be installed in /home/nicholas

when trying /usr/share/jetty9/bin/jetty.sh restart from the console.

I, for one, wouldn't expect apt to install Jetty to home, so that's fine so far as it goes. Clearly there's a misconfiguration or I'm not starting it properly.

trying to start jetty:

nicholas@tech:~$ 
nicholas@tech:~$ /usr/share/jetty9/bin/jetty.sh restart
/usr/share/jetty9/bin/jetty.sh: line 250: cd: /opt/jetty9: No such file or directory
** ERROR: Oops! Jetty doesn't appear to be installed in /home/nicholas
** ERROR:  /home/nicholas/start.jar is not readable!
nicholas@tech:~$ 

cat output of /etc/default/jetty9:

# change to 'no' or uncomment to use the default setting in /etc/default/rcS 
VERBOSE=yes

# Run Jetty as this user ID (default: jetty)
# Set this to an empty string to prevent Jetty from starting automatically
#JETTY_USER=jetty

# The home directory of the Java Runtime Environment (JRE). You need at least
# Java 8. If JAVA_HOME is not set, some common directories for OpenJDK and
# the Oracle JDK are tried.
#JAVA_HOME=

# Extra options to pass to the JVM
#JAVA_OPTIONS="-Djava.awt.headless=true"

# Timeout in seconds for the shutdown of all webapps
#JETTY_SHUTDOWN=30

# Additional arguments to pass to Jetty
#JETTY_ARGS=

# Jetty uses a directory to store temporary files like unpacked webapps
#JETTY_TMP=/var/cache/jetty9

# Default for number of days to keep old log files in /var/log/jetty9/
#LOGFILE_DAYS=14

# If you run Jetty on port numbers that are all higher than 1023, then you
# do not need authbind. It is used for binding Jetty to lower port numbers.
# (yes/no, default: no)
#AUTHBIND=yes



JETTY_HOME=/opt/jetty9
JETTY_USER=jetty9
JETTY_PORT=8080
#JETTY_HOST=<span style="color: #ff0000;">127.0.0.1</span>
JETTY_LOGS=/opt/jetty9/logs/

I added the last few lines as suggested.

Jetty was installed using apt on Ubuntu.

huangapple
  • 本文由 发表于 2020年6月29日 17:23:13
  • 转载请务必保留本文链接:https://java.coder-hub.com/62635050.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定