Environment OS: Linux galaxy 5.0.0-25-generic #26-Ubuntu SMP Thu Aug 1 12:04:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux JAVA: openjdk version '11.0.4' 2019-07-1 ..

Symphony Causes Jetty9 to Crash

Environment

OS: Linux galaxy 5.0.0-25-generic #26-Ubuntu SMP Thu Aug 1 12:04:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

JAVA: openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu219.04)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu219.04, mixed mode, sharing)

MySQL Ver 14.14 Distrib 5.7.27, for Linux (x86_64) using EditLine wrapper

MySQL db:
CREATE DATABASE b3log_symphony CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci

symphony: latest from GitHub with minimum change (mysql login change only)

Error from Jetty status:

dude@galaxy:/usr/share/jetty9/webapps$ sudo systemctl status jetty9
[sudo] password for dude:
● jetty9.service - Jetty 9 Web Application Server
Loaded: loaded (/lib/systemd/system/jetty9.service; enabled; vendor preset: e
Active: failed (Result: exit-code) since Wed 2019-08-21 16:28:42 CST; 39min a
Docs: https://www.eclipse.org/jetty/documentation/current/
Process: 25853 ExecStart=/usr/share/jetty9/bin/jetty.sh run (code=exited, stat
Main PID: 25853 (code=exited, status=255/EXCEPTION)

Aug 21 16:28:42 galaxy jetty9[25853]: at org.eclipse.jetty.xml.XmlConfig
Aug 21 16:28:42 galaxy jetty9[25853]: at java.base/jdk.internal.reflect.
Aug 21 16:28:42 galaxy jetty9[25853]: at java.base/jdk.internal.reflect.
Aug 21 16:28:42 galaxy jetty9[25853]: at java.base/jdk.internal.reflect.
Aug 21 16:28:42 galaxy jetty9[25853]: at java.base/java.lang.reflect.Met
Aug 21 16:28:42 galaxy jetty9[25853]: at org.eclipse.jetty.start.Main.in
Aug 21 16:28:42 galaxy jetty9[25853]: at org.eclipse.jetty.start.Main.st
Aug 21 16:28:42 galaxy jetty9[25853]: at org.eclipse.jetty.start.Main.ma
Aug 21 16:28:42 galaxy systemd[1]: jetty9.service: Main process exited, code=exi
Aug 21 16:28:42 galaxy systemd[1]: jetty9.service: Failed with result 'exit-code
lines 1-17/17 (END)

  • Sym

    Sym 是一个用 Java 实现的现代化社区(论坛/BBS/社交网络/博客)平台,“下一代的社区系统,为未来而构建”。

    448 引用 • 4214 回帖 • 641 关注
  • Jetty
    22 引用 • 48 回帖 • 1 关注
  • Q&A

    提问之前请先看《提问的智慧》,好的问题比好的答案更有价值。

    1316 引用 • 8590 回帖 • 578 关注
5 回帖
请输入回帖内容...
  • godadada

    More complete jetty9 status:

    dude@galaxy:/usr/share/jetty9/webapps$ sudo systemctl status jetty9
    ● jetty9.service - Jetty 9 Web Application Server
    Loaded: loaded (/lib/systemd/system/jetty9.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Wed 2019-08-21 16:28:42 CST; 42min ago
    Docs: https://www.eclipse.org/jetty/documentation/current/
    Process: 25853 ExecStart=/usr/share/jetty9/bin/jetty.sh run (code=exited, status=255/EXCEPTION)
    Main PID: 25853 (code=exited, status=255/EXCEPTION)

    Aug 21 16:28:42 galaxy jetty9[25853]: at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1511)
    Aug 21 16:28:42 galaxy jetty9[25853]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    Aug 21 16:28:42 galaxy jetty9[25853]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    Aug 21 16:28:42 galaxy jetty9[25853]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    Aug 21 16:28:42 galaxy jetty9[25853]: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    Aug 21 16:28:42 galaxy jetty9[25853]: at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
    Aug 21 16:28:42 galaxy jetty9[25853]: at org.eclipse.jetty.start.Main.start(Main.java:490)
    Aug 21 16:28:42 galaxy jetty9[25853]: at org.eclipse.jetty.start.Main.main(Main.java:77)
    Aug 21 16:28:42 galaxy systemd[1]: jetty9.service: Main process exited, code=exited, status=255/EXCEPTION
    Aug 21 16:28:42 galaxy systemd[1]: jetty9.service: Failed with result 'exit-code'.
    dude@galaxy:/usr/share/jetty9/webapps

  • 88250

    你是如何判断出是 Symphony Causes 而不是其他原因导致的进程退出?

    1 回复
  • godadada

    two indicators:

    1. if I remove symphony.war from jetty, all is fine;
    2. the return exit error code is 255 (-1) coming from app, not jetty9( which is 0 or 1).
  • 88250

    我这里重现不了哦,暂时也没收到其他用户报告类似问题。

  • godadada

    This may be the issue:

    jetty9[2996]: [ERROR]-[2019-08-21 11:29:39]-[org.b3log.symphony.util.Symphonys:342]: Init upload dir failed
    jetty9[2996]: java.io.IOException: Can't create: /usr/share/jetty9/sym/upload

    my guess is that symphony.properties has entry: upload.local.dir=~/sym/upload/
    which ends up /usr/share/jetty9/sym/upload when useing jetty9 as a systemd service and under user Jetty with home /usr/share/jetty9.