gpt4 book ai didi

java代码和unix守护进程

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:01:08 25 4
gpt4 key购买 nike

我在尝试使用 nohup 运行我的 java 代码时遇到问题:

[root@ /]# nohup opt/jdk1.6.0_22/bin/java -cp "lib/hibernate/*:lib/tuscany-sca-1.6/lib/*:lib/tuscany-sca-1.6/modules/*:./*" com.lab.launch.Launcher &

[1] 23148

nohup.out 的内容:

22 dec. 2010 18:20:21 org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: SOAPExchange.composite
22 dec. 2010 18:20:22 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
INFO: Loading contribution: file:/xf_exchange.jar
22 dec. 2010 18:20:23 org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: SOAPExchange.composite
22 dec. 2010 18:20:32 org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
INFO: Added Servlet mapping: http://ns200534.ovh.net:8094/SOAPExchange
Exception in thread "main" java.io.IOException: Bad file descriptor
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:199)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at com.xavier.launch.Launcher.main(Launcher.java:24)
Exception in thread "Thread-1" java.lang.IllegalStateException: Shutdown in progress
at java.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks.java:55)
at java.lang.Runtime.removeShutdownHook(Runtime.java:220)
at org.apache.tuscany.sca.binding.ws.axis2.TuscanyListenerManager.stop(TuscanyListenerManager.java:87)
at org.apache.tuscany.sca.binding.ws.axis2.TuscanyListenerManager$ListenerManagerShutdownThread.run(TuscanyListenerManager.java:100)
java.lang.IllegalStateException: Shutdown in progress
at java.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks.java:55)
at java.lang.Runtime.removeShutdownHook(Runtime.java:220)
at org.apache.tuscany.sca.binding.ws.axis2.TuscanyListenerManager.stop(TuscanyListenerManager.java:87)
at org.apache.axis2.context.ConfigurationContext.terminate(ConfigurationContext.java:744)
at org.apache.axis2.transport.http.AxisServlet.destroy(AxisServlet.java:465)
at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.destroy(Axis2ServiceServlet.java:295)
at org.mortbay.jetty.servlet.ServletHolder.destroyInstance(ServletHolder.java:315)
at org.mortbay.jetty.servlet.ServletHolder.doStop(ServletHolder.java:286)
at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
at org.mortbay.jetty.servlet.ServletHandler.doStop(ServletHandler.java:170)
at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
at org.mortbay.jetty.servlet.SessionHandler.doStop(SessionHandler.java:124)
at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:566)
at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:129)
at org.mortbay.jetty.Server.doStop(Server.java:281)
at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:65)
at org.mortbay.jetty.Server$ShutdownHookThread.run(Server.java:559)

谢谢你的帮助

最佳答案

Exception in thread "main" java.io.IOException: Bad file descriptor
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:199)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at com.xavier.launch.Launcher.main(Launcher.java:24)

您的应用程序(或其参数)中似乎存在错误,我不确定它与 nohup 无关。它试图读取的文件是什么?

关于java代码和unix守护进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4512663/

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