gpt4 book ai didi

ubuntu - 在 Debian/Ubuntu 上运行 Jetty 7 作为服务……

转载 作者:行者123 更新时间:2023-12-04 20:01:05 27 4
gpt4 key购买 nike

我在 Ubuntu 中将 jetty 7 作为服务运行时遇到问题。

Jetty 6 运行良好,但我必须升级。我遇到的问题是 Jetty 启动了两个 java 进程,在从我复制到/etc/init.d 的脚本或直接从 jettys bin 文件夹停止后,一个进程仍然存在:

~/jetty/bin$ sudo ./jetty.sh start
Starting Jetty: OK
~/jetty/bin$ ps ax | grep jetty
28888 ? Sl 0:00 /usr/bin/java -Djetty.home=/usr/share/jetty -Djava.io.tmpdir=/tmp -jar /usr/share/jetty/start.jar --pre=etc/jetty-logging.xml --daemon
28904 ? Sl 0:05 /usr/lib/jvm/java-6-sun-1.6.0.22/jre/bin/java -Xmx2000m -Xmn512m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -Djetty.home=/usr/share/jetty -cp /usr/share/jetty/lib/jetty-xml-7.3.0.v20110203.jar:/usr/share/jetty/lib/servlet-api-2.5.jar:/usr/share/jetty/lib/jetty-http-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-continuation-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-server-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-security-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-servlet-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-webapp-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-deploy-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-servlets-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-jmx-7.3.0.v20110203.jar:/usr/share/jetty/lib/jsp/com.sun.el_1.0.0.v201004190952.jar:/usr/share/jetty/lib/jsp/ecj-3.6.jar:/usr/share/jetty/lib/jsp/javax.el_2.1.0.v201004190952.jar:/usr/share/jetty/lib/jsp/javax.servlet.jsp_2.1.0.v201004190952.jar:/usr/share/jetty/lib/jsp/javax.servlet.jsp.jstl_1.2.0.v201004190952.jar:/usr/share/jetty/lib/jsp/jetty-jsp-2.1-7.3.0.v20110203.jar:/usr/share/jetty/lib/jsp/org.apache.jasper.glassfish_2.1.0.v201007080150.jar:/usr/share/jetty/lib/jsp/org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar:/usr/share/jetty/resources:/usr/share/jetty/lib/jetty-websocket-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-util-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-io-7.3.0.v20110203.jar org.eclipse.jetty.xml.XmlConfiguration /tmp/start6429233784810245794.properties /usr/share/jetty/etc/jetty-logging.xml /usr/share/jetty/etc/jetty.xml /usr/share/jetty/etc/jetty-deploy.xml /usr/share/jetty/etc/jetty-webapps.xml /usr/share/jetty/etc/jetty-contexts.xml /usr/share/jetty/etc/jetty-testrealm.xml
28938 pts/1 R+ 0:00 grep jetty
~/jetty/bin$ sudo ./jetty.sh stop
Stopping Jetty: OK
~/jetty/bin$ ps ax | grep jetty
28904 ? Sl 0:31 /usr/lib/jvm/java-6-sun-1.6.0.22/jre/bin/java -Xmx2000m -Xmn512m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -Djetty.home=/usr/share/jetty -cp /usr/share/jetty/lib/jetty-xml-7.3.0.v20110203.jar:/usr/share/jetty/lib/servlet-api-2.5.jar:/usr/share/jetty/lib/jetty-http-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-continuation-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-server-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-security-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-servlet-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-webapp-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-deploy-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-servlets-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-jmx-7.3.0.v20110203.jar:/usr/share/jetty/lib/jsp/com.sun.el_1.0.0.v201004190952.jar:/usr/share/jetty/lib/jsp/ecj-3.6.jar:/usr/share/jetty/lib/jsp/javax.el_2.1.0.v201004190952.jar:/usr/share/jetty/lib/jsp/javax.servlet.jsp_2.1.0.v201004190952.jar:/usr/share/jetty/lib/jsp/javax.servlet.jsp.jstl_1.2.0.v201004190952.jar:/usr/share/jetty/lib/jsp/jetty-jsp-2.1-7.3.0.v20110203.jar:/usr/share/jetty/lib/jsp/org.apache.jasper.glassfish_2.1.0.v201007080150.jar:/usr/share/jetty/lib/jsp/org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar:/usr/share/jetty/resources:/usr/share/jetty/lib/jetty-websocket-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-util-7.3.0.v20110203.jar:/usr/share/jetty/lib/jetty-io-7.3.0.v20110203.jar org.eclipse.jetty.xml.XmlConfiguration /tmp/start6429233784810245794.properties /usr/share/jetty/etc/jetty-logging.xml /usr/share/jetty/etc/jetty.xml /usr/share/jetty/etc/jetty-deploy.xml /usr/share/jetty/etc/jetty-webapps.xml /usr/share/jetty/etc/jetty-contexts.xml /usr/share/jetty/etc/jetty-testrealm.xml
~/jetty/bin$ sudo kill 28904
~/jetty/bin$ ps ax | grep jetty
29017 pts/1 S+ 0:00 grep jetty

不得不一直手动杀死它真的很烦人。有人知道为什么吗?

更多信息:似乎“错误的”进程存储在 pid 文件中,然后被停止脚本停止:如果我手动杀死另一个进程,两个进程都会停止。

最佳答案

您尝试过“服务 jetty 停止”/“服务 jetty 开始”吗?

关于ubuntu - 在 Debian/Ubuntu 上运行 Jetty 7 作为服务……,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6444246/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com