如何解决Linux系统下的linux java进程消失失

他的最新文章
他的热门文章
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)Linux下查看和停止所有java进程_C/C++教程_动态网站制作指南
Linux下查看和停止所有java进程
来源:人气:220
& 在下查看所有进程命令:ps -ef | grep java
& 1.停止所有java进程命令:pkill -9&
& 2.停止特定java进程命令:kill -9&java进程序号
& 比如:kill -9 97993
优质网站模板非常简单]Linux下启动java程序的通用脚本sh
我的图书馆
非常简单]Linux下启动java程序的通用脚本sh
如果未设置JAVA_HOME环境变量,需要手动指定
#JDK所在路径 JAVA_HOME=/root/JDK/jdk1.6.0_24
RUNNING_USER、APP_HOME、APP_MAINCLASS、CLASSPATH根据自己项目的情况修改即可。
如果在windows下编辑上传到linux,注意用dos2unix命令转换文件格式,不然会报错。
#!/bin/sh #该脚本为Linux下启动java程序的通用脚本。即可以作为开机自启动service脚本被调用, #也可以作为启动java程序的独立脚本来使用。 # #Author: tudaxia.com, Date:
# #警告!!!:该脚本stop部分使用系统kill命令来强制终止指定的java程序进程。 #在杀死进程前,未作任何条件检查。在某些情况下,如程序正在进行文件或数据库写操作, #可能会造成数据丢失或数据不完整。如果必须要考虑到这类情况,则需要改写此脚本, #增加在执行kill命令前的一系列检查。 # # ################################### #环境变量及程序执行参数 #需要根据实际环境以及Java程序名称来修改这些参数 ################################### #JDK所在路径 #JAVA_HOME=/root/JDK/jdk1.6.0_24 echo $JAVA_HOME #执行程序启动所使用的系统用户,考虑到安全,推荐不使用root帐号 RUNNING_USER=root #Java程序所在的目录(classes的上一级目录) APP_HOME=/usr/local/NMAgent #需要启动的Java主程序(main方法类) APP_MAINCLASS=com.eastelsoft.netmanager.agent.Application #拼凑完整的classpath参数,包括指定lib目录下所有的jar CLASSPATH=$APP_HOME for i in "$APP_HOME"/lib/*.*; do CLASSPATH="$CLASSPATH":"$i" done #java虚拟机启动参数 JAVA_OPTS="-ms512m -mx512m -Xmn256m -Djava.awt.headless=true -XX:MaxPermSize=128m" ################################### #(函数)判断程序是否已启动 # #说明: #使用JDK自带的JPS命令及grep命令组合,准确查找pid #jps 加 l 参数,表示显示java的完整包路径 #使用awk,分割出pid ($1部分),及Java程序名称($2部分) ################################### #初始化psid变量(全局) psid=0 checkpid() { javaps=`$JAVA_HOME/bin/jps -l | grep $APP_MAINCLASS` if [ -n "$javaps" ]; then psid=`echo $javaps | awk '{print $1}'` else psid=0 fi } ################################### #(函数)启动程序 # #说明: #1. 首先调用checkpid函数,刷新$psid全局变量 #2. 如果程序已经启动($psid不等于0),则提示程序已启动 #3. 如果程序没有被启动,则执行启动命令行 #4. 启动命令执行后,再次调用checkpid函数 #5. 如果步骤4的结果能够确认程序的pid,则打印[OK],否则打印[Failed] #注意:echo -n 表示打印字符后,不换行 #注意: "nohup 某命令 &/dev/null 2&&1 &" 的用法 ################################### start() { checkpid if [ $psid -ne 0 ]; then echo "================================" echo "warn: $APP_MAINCLASS already started! (pid=$psid)" echo "================================" else echo -n "Starting $APP_MAINCLASS ..." JAVA_CMD="nohup $JAVA_HOME/bin/java $JAVA_OPTS -classpath $CLASSPATH $APP_MAINCLASS &/dev/null 2&&1 &" su - $RUNNING_USER -c "$JAVA_CMD" checkpid if [ $psid -ne 0 ]; then echo "(pid=$psid) [OK]" else echo "[Failed]" fi fi } ################################### #(函数)停止程序 # #说明: #1. 首先调用checkpid函数,刷新$psid全局变量 #2. 如果程序已经启动($psid不等于0),则开始执行停止,否则,提示程序未运行 #3. 使用kill -9 pid命令进行强制杀死进程 #4. 执行kill命令行紧接其后,马上查看上一句命令的返回值: $? #5. 如果步骤4的结果$?等于0,则打印[OK],否则打印[Failed] #6. 为了防止java程序被启动多次,这里增加反复检查进程,反复杀死的处理(递归调用stop)。 #注意:echo -n 表示打印字符后,不换行 #注意: 在shell编程中,"$?" 表示上一句命令或者一个函数的返回值 ################################### stop() { checkpid if [ $psid -ne 0 ]; then echo -n "Stopping $APP_MAINCLASS ...(pid=$psid) " su - $RUNNING_USER -c "kill -9 $psid" if [ $? -eq 0 ]; then echo "[OK]" else echo "[Failed]" fi checkpid if [ $psid -ne 0 ]; then stop fi else echo "================================" echo "warn: $APP_MAINCLASS is not running" echo "================================" fi } ################################### #(函数)检查程序运行状态 # #说明: #1. 首先调用checkpid函数,刷新$psid全局变量 #2. 如果程序已经启动($psid不等于0),则提示正在运行并表示出pid #3. 否则,提示程序未运行 ################################### status() { checkpid if [ $psid -ne 0 ]; then echo "$APP_MAINCLASS is running! (pid=$psid)" else echo "$APP_MAINCLASS is not running" fi } ################################### #(函数)打印系统环境参数 ################################### info() { echo "System Information:" echo "****************************" echo `head -n 1 /etc/issue` echo `uname -a` echo echo "JAVA_HOME=$JAVA_HOME" echo `$JAVA_HOME/bin/java -version` echo echo "APP_HOME=$APP_HOME" echo "APP_MAINCLASS=$APP_MAINCLASS" echo "****************************" } ################################### #读取脚本的第一个参数($1),进行判断 #参数取值范围:{start|stop|restart|status|info} #如参数不在指定范围之内,则打印帮助信息 ################################### case "$1" in 'start') start ;; 'stop') stop ;; 'restart') stop start ;; 'status') status ;; 'info') info ;; *) echo "Usage: $0 {start|stop|restart|status|info}" exit 1 esac exit 0
TA的最新馆藏[转]&[转]&[转]&[转]&[转]&[转]&
喜欢该文的人也喜欢Linux 下的Java进程自己关闭,怎么解_百度知道
Linux 下的Java进程自己关闭,怎么解
我有更好的答案
是程序本身出现bug,造成java程序崩溃Linux中java进程自己关闭,有2种可能:1,关闭了java进程来释放占用的资源,进程失效;2、是系统服务设置了自我监控的机制,java占用资源过多的话
采纳率:71%
来自团队:
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。linux系统,java运行程序总是自动停止 - ITeye问答
不知道是怎么回事,
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& TERM trapped.& Shutting down.
STATUS | wrapper& |
18:08:50 | &-- Wrapper Stopped
STATUS | wrapper& |
18:09:01 | --& Wrapper Started as Daemon
STATUS | wrapper& |
18:09:01 | Launching a JVM...
INFO&& | jvm 1&&& |
18:09:02 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO&& | jvm 1&&& |
18:09:02 |&& Copyright
Tanuki Software, Inc.& All Rights Reserved.
INFO&& | jvm 1&&& |
18:09:02 |
INFO&& | jvm 1&&& |
18:09:02 | WrapperSimpleApp: Unable to locate the class service.MainService: java.lang.ClassFormatError: service.MainService (unrecognized class file version)
INFO&& | jvm 1&&& |
18:09:02 |
INFO&& | jvm 1&&& |
18:09:02 | WrapperSimpleApp Usage:
INFO&& | jvm 1&&& |
18:09:02 |&& java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments]
INFO&& | jvm 1&&& |
18:09:02 |
INFO&& | jvm 1&&& |
18:09:02 | Where:
INFO&& | jvm 1&&& |
18:09:02 |&& app_class:&&&&& The fully qualified class name of the application to run.
INFO&& | jvm 1&&& |
18:09:02 |&& app_arguments:& The arguments that would normally be passed to the
INFO&& | jvm 1&&& |
18:09:02 |&&&&&&&&&&&&&&&&&& application.
STATUS | wrapper& |
18:09:03 | &-- Wrapper Stopped
问题补充:STATUS | wrapper& |
17:56:24 | --& Wrapper Started as Daemon
STATUS | wrapper& |
17:56:24 | Launching a JVM...
INFO&& | jvm 1&&& |
17:56:24 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO&& | jvm 1&&& |
17:56:24 |&& Copyright
Tanuki Software, Inc.& All Rights Reserved.
INFO&& | jvm 1&&& |
17:56:24 |
INFO&& | jvm 1&&& |
17:56:24 | Initializing...
INFO&& | jvm 1&&& |
17:56:24 | start()
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO&& | jvm 1&&& |
17:56:24 | 信息: Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@ce5b1c: display name [org.springframework.context.support.FileSystemXmlApplicationContext@ce5b1c]; startup date [Thu Mar 17 17:56:24 CST 2011]; root of context hierarchy
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO&& | jvm 1&&& |
17:56:24 | 信息: Loading XML bean definitions from file [/home/mbs/Exec/gecxml/bak/qutztimer.xml]
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO&& | jvm 1&&& |
17:56:24 | 信息: Bean factory for application context [org.springframework.context.support.FileSystemXmlApplicationContext@ce5b1c]: org.springframework.beans.factory.support.DefaultListableBeanFactory@39443f
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO&& | jvm 1&&& |
17:56:24 | 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@39443f: defining beans [databasebackup,searchEngerneTask,cronTrigger,org.springframework.scheduling.quartz.SchedulerFactoryBean#0]; root of factory hierarchy
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.core.QuartzScheduler &init&
INFO&& | jvm 1&&& |
17:56:24 | 信息: Quartz Scheduler v.1.5.2 created.
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.simpl.RAMJobStore initialize
INFO&& | jvm 1&&& |
17:56:24 | 信息: RAMJobStore initialized.
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.impl.StdSchedulerFactory instantiate
INFO&& | jvm 1&&& |
17:56:24 | 信息: Quartz scheduler 'org.springframework.scheduling.quartz.SchedulerFactoryBean#0' initialized from an externally provided properties instance.
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.impl.StdSchedulerFactory instantiate
INFO&& | jvm 1&&& |
17:56:24 | 信息: Quartz scheduler version: 1.5.2
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.core.QuartzScheduler setJobFactory
INFO&& | jvm 1&&& |
17:56:24 | 信息: JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFactory@1e1dadb
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.springframework.scheduling.quartz.SchedulerFactoryBean startScheduler
INFO&& | jvm 1&&& |
17:56:24 | 信息: Starting Quartz Scheduler now
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.core.QuartzScheduler start
INFO&& | jvm 1&&& |
17:56:24 | 信息: Scheduler org.springframework.scheduling.quartz.SchedulerFactoryBean#0_$_NON_CLUSTERED started.
INFO&& | jvm 1&&& |
17:56:24 | httpurl=http://10.10.21.55/reloadall.php执行成功!
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO&& | jvm 1&&& |
17:56:24 | 信息: Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@ae533a: display name [org.springframework.context.support.FileSystemXmlApplicationContext@ae533a]; startup date [Thu Mar 17 17:56:24 CST 2011]; root of context hierarchy
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO&& | jvm 1&&& |
17:56:24 | 信息: Loading XML bean definitions from file [/home/mbs/Exec/gecxml/bak/qutztimer_runphp.xml]
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO&& | jvm 1&&& |
17:56:24 | 信息: Bean factory for application context [org.springframework.context.support.FileSystemXmlApplicationContext@ae533a]: org.springframework.beans.factory.support.DefaultListableBeanFactory@15fc40c
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO&& | jvm 1&&& |
17:56:24 | 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@15fc40c: defining beans [exam_result,threeDetail,threeTrigger,org.springframework.scheduling.quartz.SchedulerFactoryBean#0]; root of factory hierarchy
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.core.QuartzScheduler &init&
INFO&& | jvm 1&&& |
17:56:24 | 信息: Quartz Scheduler v.1.5.2 created.
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.simpl.RAMJobStore initialize
INFO&& | jvm 1&&& |
17:56:24 | 信息: RAMJobStore initialized.
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.impl.StdSchedulerFactory instantiate
INFO&& | jvm 1&&& |
17:56:24 | 信息: Quartz scheduler 'org.springframework.scheduling.quartz.SchedulerFactoryBean#0' initialized from an externally provided properties instance.
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.impl.StdSchedulerFactory instantiate
INFO&& | jvm 1&&& |
17:56:24 | 信息: Quartz scheduler version: 1.5.2
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.core.QuartzScheduler setJobFactory
INFO&& | jvm 1&&& |
17:56:24 | 信息: JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFactory@b754b2
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.springframework.scheduling.quartz.SchedulerFactoryBean startScheduler
INFO&& | jvm 1&&& |
17:56:24 | 信息: Starting Quartz Scheduler now
INFO&& | jvm 1&&& |
17:56:24 |
17:56:24 org.quartz.core.QuartzScheduler start
INFO&& | jvm 1&&& |
17:56:24 | 信息: Scheduler org.springframework.scheduling.quartz.SchedulerFactoryBean#0_$_NON_CLUSTERED started.
INFO&& | jvm 1&&& |
17:56:24 | fpath=gecxml/task
INFO&& | jvm 1&&& |
17:56:24 | fpath-size=19
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_page
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_page
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:24 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:24 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
17:56:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
17:56:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | fpath=gecxml/task
INFO&& | jvm 1&&& |
18:01:25 | fpath-size=19
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_page
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_page
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:01:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:01:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | fpath=gecxml/task
INFO&& | jvm 1&&& |
18:06:25 | fpath-size=19
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_page
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_page
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
INFO&& | jvm 1&&& |
18:06:25 | filelist-name=.properties
INFO&& | jvm 1&&& |
18:06:25 | EVENTNAME=exam_result
STATUS | wrapper& |
18:08:49 | TERM trapped.& Shutting down.
STATUS | wrapper& |
18:08:50 | &-- Wrapper Stopped
STATUS | wrapper& |
18:09:01 | --& Wrapper Started as Daemon
STATUS | wrapper& |
18:09:01 | Launching a JVM...
INFO&& | jvm 1&&& |
18:09:02 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO&& | jvm 1&&& |
18:09:02 |&& Copyright
Tanuki Software, Inc.& All Rights Reserved.
INFO&& | jvm 1&&& |
18:09:02 |
INFO&& | jvm 1&&& |
18:09:02 | WrapperSimpleApp: Unable to locate the class service.MainService: java.lang.ClassFormatError: service.MainService (unrecognized class file version)
INFO&& | jvm 1&&& |
18:09:02 |
INFO&& | jvm 1&&& |
18:09:02 | WrapperSimpleApp Usage:
INFO&& | jvm 1&&& |
18:09:02 |&& java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments]
INFO&& | jvm 1&&& |
18:09:02 |
INFO&& | jvm 1&&& |
18:09:02 | Where:
INFO&& | jvm 1&&& |
18:09:02 |&& app_class:&&&&& The fully qualified class name of the application to run.
INFO&& | jvm 1&&& |
18:09:02 |&& app_arguments:& The arguments that would normally be passed to the
INFO&& | jvm 1&&& |
18:09:02 |&&&&&&&&&&&&&&&&&& application.
STATUS | wrapper& |
18:09:03 | &-- Wrapper Stopped
这个是完整的日志,我那里的程序,他是先运行着,然后突然就停止了,一直在找原因,我自己在本地机器上面运行,和测试服务器上面运行都不会出现这种问题
问题补充:我本机编译的jdk版本是1.6,我的服务器版本也是一样的,怎么会存在编译识别错误,我很纳闷
问题补充:
这个是我服务器的版本
问题补充:
看到的是这个,我对Linux不是很熟,我本地测试的服务器和那台服务器的配置都是一样的,red hat linux系统,但是我本地测试机器一点问题也没有,没出现报错的现象,在那台服务器上面运行的时候先是能运行,然后突然就断掉了
问题补充:我的编译版本和服务器的jdk版本是一样的,都是1.6。
问题补充:我的本机是win7,测试机是linux,客户那里的机器也是linux现在是测试机可以跑,客户那里的服务器总是停掉,都是redhat的系统
客户那里的版本是red hat Enterprise Linux Server release5.3(Tikanga)
我自己本地测试服务器的版本是red hat Linux release9(Shrike)
问题补充:
那个命令已使用就变成乱码的,看不到里面的信息
问题补充:
这是JAVA的home环境
问题补充:恩,这是客户机上面的enet_java 写道这个是客户机器上的配置?
问题补充:可以告诉我您的Q吗?如果可以您能帮我远程看一下吗?我的Q是enet_java 写道java 程序是怎么运行,通过shell文件?
问题补充:#! /bin/sh
#
# Copyright (c)
Tanuki Software Inc.
#
# Java Service Wrapper sh script.& Suitable for starting and stopping
#& wrapped Java applications on UNIX platforms.
#
#-----------------------------------------------------------------------------
# These settings can be modified to fit the needs of your application
# Application
APP_NAME="gecapp"
APP_LONG_NAME="gecapp application"
# Wrapper
WRAPPER_CMD="wrapper"
WRAPPER_CONF="wrapper.conf"
# Priority at which to run the wrapper.& See "man nice" for valid priorities.
#& nice is only used if a priority is specified.
PRIORITY=
# Location of the pid file.
PIDDIR="."
# If uncommented, causes the Wrapper to be shutdown using an anchor file.
#& When launched with the 'start' command, it will also ignore all INT and
#& TERM signals.
#IGNORE_SIGNALS=true
# If specified, the Wrapper will be run as the specified user.
# IMPORTANT - Make sure that the user has the required privileges to write
#& the PID file and wrapper.log files.& Failure to be able to write the log
#& file will cause the Wrapper to exit without any way to write out an error
#& message.
# NOTE - This will set the user which is used to run the Wrapper as well as
#& the JVM and is not useful in situations where a privileged resource or
#& port needs to be allocated prior to the user being changed.
#RUN_AS_USER=
# The following two lines are used by the chkconfig command. Change as is
#& appropriate for your application.& They should remain commented.
# chkconfig:
# description: @app.long.name@
# Do not modify anything beyond this point
#-----------------------------------------------------------------------------
# Get the fully qualified path to the script
case $0 in
&&& /*)
&&&&&&& SCRIPT="$0"
&&&&&&& ;;
&&& *)
&&&&&&& PWD=`pwd`
&&&&&&& SCRIPT="$PWD/$0"
&&&&&&& ;;
esac
# Resolve the true real path without any sym links.
CHANGED=true
while [ "X$CHANGED" != "X" ]
do
&&& # Change spaces to ":" so the tokens can be parsed.
&&& SAFESCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`
&&& # Get the real path to this script, resolving any symbolic links
&&& TOKENS=`echo $SAFESCRIPT | sed -e 's;/; ;g'`
&&& REALPATH=
&&& for C in $TOKENS; do
&&&&&&& # Change any ":" in the token back to a space.
&&&&&&& C=`echo $C | sed -e 's;:; ;g'`
&&&&&&& REALPATH="$REALPATH/$C"
&&&&&&& # If REALPATH is a sym link, resolve it.& Loop for nested links.
&&&&&&& while [ -h "$REALPATH" ] ; do
&&&&&&&&&&& LS="`ls -ld "$REALPATH"`"
&&&&&&&&&&& LINK="`expr "$LS" : '.*-& \(.*\)$'`"
&&&&&&&&&&& if expr "$LINK" : '/.*' & /dev/ then
&&&&&&&&&&&&&&& # LINK is absolute.
&&&&&&&&&&&&&&& REALPATH="$LINK"
&&&&&&&&&&& else
&&&&&&&&&&&&&&& # LINK is relative.
&&&&&&&&&&&&&&& REALPATH="`dirname "$REALPATH"`""/$LINK"
&&&&&&&&&&& fi
&&&&&&& done
&&& done
&&& if [ "$REALPATH" = "$SCRIPT" ]
&&& then
&&&&&&& CHANGED=""
&&& else
&&&&&&& SCRIPT="$REALPATH"
&&& fi
done
# Change the current directory to the location of the script
cd "`dirname "$REALPATH"`"
REALDIR=`pwd`
# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if
#& the working directory is later changed.
FIRST_CHAR=`echo $PIDDIR | cut -c1,1`
if [ "$FIRST_CHAR" != "/" ]
then
&&& PIDDIR=$REALDIR/$PIDDIR
fi
# Same test for WRAPPER_CMD
FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1`
if [ "$FIRST_CHAR" != "/" ]
then
&&& WRAPPER_CMD=$REALDIR/$WRAPPER_CMD
fi
# Same test for WRAPPER_CONF
FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1`
if [ "$FIRST_CHAR" != "/" ]
then
&&& WRAPPER_CONF=$REALDIR/$WRAPPER_CONF
fi
# Process ID
ANCHORFILE="$PIDDIR/$APP_NAME.anchor"
PIDFILE="$PIDDIR/$APP_NAME.pid"
LOCKDIR="/var/lock/subsys"
LOCKFILE="$LOCKDIR/$APP_NAME"
pid=""
# Resolve the location of the 'ps' command
PSEXE="/usr/bin/ps"
if [ ! -x "$PSEXE" ]
then
&&& PSEXE="/bin/ps"
&&& if [ ! -x "$PSEXE" ]
&&& then
&&&&&&& echo "Unable to locate 'ps'."
&&&&&&& echo "Please report this message along with the location of the command on your system."
&&&&&&& exit 1
&&& fi
fi
# Resolve the os
DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]`
case "$DIST_OS" in
&&& 'sunos')
&&&&&&& DIST_OS="solaris"
&&&&&&& ;;
&&& 'hp-ux' | 'hp-ux64')
&&&&&&& DIST_OS="hpux"
&&&&&&& ;;
&&& 'darwin')
&&&&&&& DIST_OS="macosx"
&&&&&&& ;;
&&& 'unix_sv')
&&&&&&& DIST_OS="unixware"
&&&&&&& ;;
esac
# Resolve the architecture
DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]`
if [ "$DIST_ARCH" = "unknown" ]
then
&&& DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]`
fi
case "$DIST_ARCH" in
&&& 'amd64' | 'athlon' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64')
&&&&&&& DIST_ARCH="x86"
&&&&&&& ;;
&&& 'ip27')
&&&&&&& DIST_ARCH="mips"
&&&&&&& ;;
&&& 'power' | 'powerpc' | 'power_pc' | 'ppc64')
&&&&&&& DIST_ARCH="ppc"
&&&&&&& ;;
&&& 'pa_risc' | 'pa-risc')
&&&&&&& DIST_ARCH="parisc"
&&&&&&& ;;
&&& 'sun4u' | 'sparcv9')
&&&&&&& DIST_ARCH="sparc"
&&&&&&& ;;
&&& '')
&&&&&&& DIST_ARCH="parisc"
&&&&&&& ;;
esac
outputFile() {
&&& if [ -f "$1" ]
&&& then
&&&&&&& echo "& $1 (Found but not executable.)";
&&& else
&&&&&&& echo "& $1"
&&& fi
}
# Decide on the wrapper binary to use.
# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit
#& platforms, if the 64-bit binary exists then the distribution most
#& likely wants to use long names.& Otherwise, look for the default.
# For macosx, we also want to look for universal binaries.
WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
if [ -x "$WRAPPER_TEST_CMD" ]
then
&&& WRAPPER_CMD="$WRAPPER_TEST_CMD"
else
&&& if [ "$DIST_OS" = "macosx" ]
&&& then
&&&&&&& WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32"
&&&&&&& if [ -x "$WRAPPER_TEST_CMD" ]
&&&&&&& then
&&&&&&&&&&& WRAPPER_CMD="$WRAPPER_TEST_CMD"
&&&&&&& else
&&&&&&&&&&& WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
&&&&&&&&&&& if [ -x "$WRAPPER_TEST_CMD" ]
&&&&&&&&&&& then
&&&&&&&&&&&&&&& WRAPPER_CMD="$WRAPPER_TEST_CMD"
&&&&&&&&&&& else
&&&&&&&&&&&&&&& WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64"
&&&&&&&&&&&&&&& if [ -x "$WRAPPER_TEST_CMD" ]
&&&&&&&&&&&&&&& then
&&&&&&&&&&&&&&&&&&& WRAPPER_CMD="$WRAPPER_TEST_CMD"
&&&&&&&&&&&&&&& else
&&&&&&&&&&&&&&&&&&& if [ ! -x "$WRAPPER_CMD" ]
&&&&&&&&&&&&&&&&&&& then
&&&&&&&&&&&&&&&&&&&&&&& echo "Unable to locate any of the following binaries:"
&&&&&&&&&&&&&&&&&&&&&&& outputFile "$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
&&&&&&&&&&&&&&&&&&&&&&& outputFile "$WRAPPER_CMD-$DIST_OS-universal-32"
&&&&&&&&&&&&&&&&&&&&&&& outputFile "$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
&&&&&&&&&&&&&&&&&&&&&&& outputFile "$WRAPPER_CMD-$DIST_OS-universal-64"
&&&&&&&&&&&&&&&&&&&&&&& outputFile "$WRAPPER_CMD"
&&&&&&&&&&&&&&&&&&&&&&& exit 1
&&&&&&&&&&&&&&&&&&& fi
&&&&&&&&&&&&&&& fi
&&&&&&&&&&& fi
&&&&&&& fi
&&& else
&&&&&&& WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
&&&&&&& if [ -x "$WRAPPER_TEST_CMD" ]
&&&&&&& then
&&&&&&&&&&& WRAPPER_CMD="$WRAPPER_TEST_CMD"
&&&&&&& else
&&&&&&&&&&& if [ ! -x "$WRAPPER_CMD" ]
&&&&&&&&&&& then
&&&&&&&&&&&&&&& echo "Unable to locate any of the following binaries:"
&&&&&&&&&&&&&&& outputFile "$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
&&&&&&&&&&&&&&& outputFile "$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
&&&&&&&&&&&&&&& outputFile "$WRAPPER_CMD"
&&&&&&&&&&&&&&& exit 1
&&&&&&&&&&& fi
&&&&&&& fi
&&& fi
fi
# Build the nice clause
if [ "X$PRIORITY" = "X" ]
then
&&& CMDNICE=""
else
&&& CMDNICE="nice -$PRIORITY"
fi
# Build the anchor file clause.
if [ "X$IGNORE_SIGNALS" = "X" ]
then
&& ANCHORPROP=
&& IGNOREPROP=
else
&& ANCHORPROP=wrapper.anchorfile=\"$ANCHORFILE\"
&& IGNOREPROP=wrapper.ignore_signals=TRUE
fi
# Build the lock file clause.& Only create a lock file if the lock directory exists on this platform.
LOCKPROP=
if [ -d $LOCKDIR ]
then
&&& if [ -w $LOCKDIR ]
&&& then
&&&&&&& LOCKPROP=wrapper.lockfile=\"$LOCKFILE\"
&&& fi
fi
checkUser() {
&&& # $1 touchLock flag
&&& # $2 command
&&& # Check the configured user.& If necessary rerun this script as the desired user.
&&& if [ "X$RUN_AS_USER" != "X" ]
&&& then
&&&&&&& # Resolve the location of the 'id' command
&&&&&&& IDEXE="/usr/xpg4/bin/id"
&&&&&&& if [ ! -x "$IDEXE" ]
&&&&&&& then
&&&&&&&&&&& IDEXE="/usr/bin/id"
&&&&&&&&&&& if [ ! -x "$IDEXE" ]
&&&&&&&&&&& then
&&&&&&&&&&&&&&& echo "Unable to locate 'id'."
&&&&&&&&&&&&&&& echo "Please report this message along with the location of the command on your system."
&&&&&&&&&&&&&&& exit 1
&&&&&&&&&&& fi
&&&&&&& fi
&&&
&&&&&&& if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ]
&&&&&&& then
&&&&&&&&&&& # Already running as the configured user.& Avoid password prompts by not calling su.
&&&&&&&&&&& RUN_AS_USER=""
&&&&&&& fi
&&& fi
&&& if [ "X$RUN_AS_USER" != "X" ]
&&& then
&&&&&&& # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be
&&&&&&& # able to create the lock file.& The Wrapper will be able to update this file once it
&&&&&&& # is created but will not be able to delete it on shutdown.& If $2 is defined then
&&&&&&& # the lock file should be created for the current command
&&&&&&& if [ "X$LOCKPROP" != "X" ]
&&&&&&& then
&&&&&&&&&&& if [ "X$1" != "X" ]
&&&&&&&&&&& then
&&&&&&&&&&&&&&& # Resolve the primary group
&&&&&&&&&&&&&&& RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
&&&&&&&&&&&&&&& if [ "X$RUN_AS_GROUP" = "X" ]
&&&&&&&&&&&&&&& then
&&&&&&&&&&&&&&&&&&& RUN_AS_GROUP=$RUN_AS_USER
&&&&&&&&&&&&&&& fi
&&&&&&&&&&&&&&& touch $LOCKFILE
&&&&&&&&&&&&&&& chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE
&&&&&&&&&&& fi
&&&&&&& fi
&&&&&&& # Still want to change users, recurse.& This means that the user will only be
&&&&&&& #& prompted for a password once. Variables shifted by 1
&&&&&&& su -m $RUN_AS_USER -c "\"$REALPATH\" $2"
&&&&&&& # Now that we are the original user again, we may need to clean up the lock file.
&&&&&&& if [ "X$LOCKPROP" != "X" ]
&&&&&&& then
&&&&&&&&&&& getpid
&&&&&&&&&&& if [ "X$pid" = "X" ]
&&&&&&&&&&& then
&&&&&&&&&&&&&&& # Wrapper is not running so make sure the lock file is deleted.
&&&&&&&&&&&&&&& if [ -f "$LOCKFILE" ]
&&&&&&&&&&&&&&& then
&&&&&&&&&&&&&&&&&&& rm "$LOCKFILE"
&&&&&&&&&&&&&&& fi
&&&&&&&&&&& fi
&&&&&&& fi
&&&&&&& exit 0
&&& fi
}
getpid() {
&&& if [ -f "$PIDFILE" ]
&&& then
&&&&&&& if [ -r "$PIDFILE" ]
&&&&&&& then
&&&&&&&&&&& pid=`cat "$PIDFILE"`
&&&&&&&&&&& if [ "X$pid" != "X" ]
&&&&&&&&&&& then
&&&&&&&&&&&&&&& # It is possible that 'a' process with the pid exists but that it is not the
&&&&&&&&&&&&&&& #& correct process.& This can happen in a number of cases, but the most
&&&&&&&&&&&&&&& #& common is during system startup after an unclean shutdown.
&&&&&&&&&&&&&&& # The ps statement below looks for the specific wrapper command running as
&&&&&&&&&&&&&&& #& the pid.& If it is not found then the pid file is considered to be stale.
&&&&&&&&&&&&&&& pidtest=`$PSEXE -p $pid -o args | grep "$WRAPPER_CMD" | tail -1`
&&&&&&&&&&&&&&& if [ "X$pidtest" = "X" ]
&&&&&&&&&&&&&&& then
&&&&&&&&&&&&&&&&&&& # This is a stale pid file.
&&&&&&&&&&&&&&&&&&& rm -f "$PIDFILE"
&&&&&&&&&&&&&&&&&&& echo "Removed stale pid file: $PIDFILE"
&&&&&&&&&&&&&&&&&&& pid=""
&&&&&&&&&&&&&&& fi
&&&&&&&&&&& fi
&&&&&&& else
&&&&&&&&&&& echo "Cannot read $PIDFILE."
&&&&&&&&&&& exit 1
&&&&&&& fi
&&& fi
}
testpid() {
&&& pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
&&& if [ "X$pid" = "X" ]
&&& then
&&&&&&& # Process is gone so remove the pid file.
&&&&&&& rm -f "$PIDFILE"
&&&&&&& pid=""
&&& fi
}
console() {
&&& echo "Running $APP_LONG_NAME..."
&&& getpid
&&& if [ "X$pid" = "X" ]
&&& then
&&&&&&& # The string passed to eval must handles spaces in paths correctly.
&&&&&&& COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=$APP_NAME wrapper.pidfile=\"$PIDFILE\" $ANCHORPROP $LOCKPROP"
&&&&&&& eval $COMMAND_LINE
&&& else
&&&&&&& echo "$APP_LONG_NAME is already running."
&&&&&&& exit 1
&&& fi
}
start() {
&&& echo "Starting $APP_LONG_NAME..."
&&& getpid
&&& if [ "X$pid" = "X" ]
&&& then
&&&&&&& # The string passed to eval must handles spaces in paths correctly.
&&&&&&& COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=$APP_NAME wrapper.pidfile=\"$PIDFILE\" wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
&&&&&&& eval $COMMAND_LINE
&&& else
&&&&&&& echo "$APP_LONG_NAME is already running."
&&&&&&& exit 1
&&& fi
}
stopit() {
&&& echo "Stopping $APP_LONG_NAME..."
&&& getpid
&&& if [ "X$pid" = "X" ]
&&& then
&&&&&&& echo "$APP_LONG_NAME was not running."
&&& else
&&&&&&& if [ "X$IGNORE_SIGNALS" = "X" ]
&&&&&&& then
&&&&&&&&&&& # Running so try to stop it.
&&&&&&&&&&& kill $pid
&&&&&&&&&&& if [ $? -ne 0 ]
&&&&&&&&&&& then
&&&&&&&&&&&&&&& # An explanation for the failure should have been given
&&&&&&&&&&&&&&& echo "Unable to stop $APP_LONG_NAME."
&&&&&&&&&&&&&&& exit 1
&&&&&&&&&&& fi
&&&&&&& else
&&&&&&&&&&& rm -f "$ANCHORFILE"
&&&&&&&&&&& if [ -f "$ANCHORFILE" ]
&&&&&&&&&&& then
&&&&&&&&&&&&&&& # An explanation for the failure should have been given
&&&&&&&&&&&&&&& echo "Unable to stop $APP_LONG_NAME."
&&&&&&&&&&&&&&& exit 1
&&&&&&&&&&& fi
&&&&&&& fi
&&&&&&& # We can not predict how long it will take for the wrapper to
&&&&&&& #& actually stop as it depends on settings in wrapper.conf.
&&&&&&& #& Loop until it does.
&&&&&&& savepid=$pid
&&&&&&& CNT=0
&&&&&&& TOTCNT=0
&&&&&&& while [ "X$pid" != "X" ]
&&&&&&& do
&&&&&&&&&&& # Show a waiting message every 5 seconds.
&&&&&&&&&&& if [ "$CNT" -lt "5" ]
&&&&&&&&&&& then
&&&&&&&&&&&&&&& CNT=`expr $CNT + 1`
&&&&&&&&&&& else
&&&&&&&&&&&&&&& echo "Waiting for $APP_LONG_NAME to exit..."
&&&&&&&&&&&&&&& CNT=0
&&&&&&&&&&& fi
&&&&&&&&&&& TOTCNT=`expr $TOTCNT + 1`
&&&&&&&&&&& sleep 1
&&&&&&&&&&& testpid
&&&&&&& done
&&&&&&& pid=$savepid
&&&&&&& testpid
&&&&&&& if [ "X$pid" != "X" ]
&&&&&&& then
&&&&&&&&&&& echo "Failed to stop $APP_LONG_NAME."
&&&&&&&&&&& exit 1
&&&&&&& else
&&&&&&&&&&& echo "Stopped $APP_LONG_NAME."
&&&&&&& fi
&&& fi
}
status() {
&&& getpid
&&& if [ "X$pid" = "X" ]
&&& then
&&&&&&& echo "$APP_LONG_NAME is not running."
&&&&&&& exit 1
&&& else
&&&&&&& echo "$APP_LONG_NAME is running ($pid)."
&&&&&&& exit 0
&&& fi
}
dump() {
&&& echo "Dumping $APP_LONG_NAME..."
&&& getpid
&&& if [ "X$pid" = "X" ]
&&& then
&&&&&&& echo "$APP_LONG_NAME was not running."
&&& else
&&&&&&& kill -3 $pid
&&&&&&& if [ $? -ne 0 ]
&&&&&&& then
&&&&&&&&&&& echo "Failed to dump $APP_LONG_NAME."
&&&&&&&&&&& exit 1
&&&&&&& else
&&&&&&&&&&& echo "Dumped $APP_LONG_NAME."
&&&&&&& fi
&&& fi
}
case "$1" in
&&& 'console')
&&&&&&& checkUser touchlock $1
&&&&&&& console
&&&&&&& ;;
&&& 'start')
&&&&&&& checkUser touchlock $1
&&&&&&& start
&&&&&&& ;;
&&& 'stop')
&&&&&&& checkUser "" $1
&&&&&&& stopit
&&&&&&& ;;
&&& 'restart')
&&&&&&& checkUser touchlock $1
&&&&&&& stopit
&&&&&&& start
&&&&&&& ;;
&&& 'status')
&&&&&&& checkUser "" $1
&&&&&&& status
&&&&&&& ;;
&&& 'dump')
&&&&&&& checkUser "" $1
&&&&&&& dump
&&&&&&& ;;
&&& *)
&&&&&&& echo "Usage: $0 { console | start | stop | restart | status | dump }"
&&&&&&& exit 1
&&&&&&& ;;
esac
我的启动文件是这个文件
问题补充:您的邮箱多少,我发一份邮件到您的邮箱去,您帮我看看,我实在是找不到原因了,我找了几个星期了,编译过很多次了enet_java 写道配置文件看不出什么东东。
试试
javac -version
java version
如果jdk没有问题,重新编译一下发布再试试。
采纳的答案
配置文件看不出什么东东。
试试
javac -version
java version
如果jdk没有问题,重新编译一下发布再试试。
直接在客户的那台机器上进行编译看看吧。
如果还是不行,可能更操作系统有关系吧。
我这里上不了QQ呀,痛苦。
java 程序是怎么运行,通过shell文件?
这个是客户机器上的配置?
more profile 一下。
profile 是一个文件。
定位这个问题,可以从客户那里的red hat Enterprise Linux Server release5.3(Tikanga) 的jdk版本和环境变量设置即profile文件开始定位。
因为对你的环境不是很熟悉,只可以跟你说一下思路。
/etc/profile 贴上来看看吧。
本地测试机器是什么系统
windows 还是linux?
到这个目录下面看看java -version 看看jdk 的版本。
具体的linux下解决这个问题的办法,可以参考:
http://hulefei29.iteye.com/blog/781222
服务器端 敲入 which java 看看环境变量设置的是不是JDK1.6的。
环境变量设置正确不?
引用INFO&& | jvm 1&&& |
18:09:02 | WrapperSimpleApp: Unable to locate the class service.MainService: java.lang.ClassFormatError: service.MainService (unrecognized class file version) INFO&& | jvm 1&&& |
18:09:02 |
INFO&& | jvm 1&&& |
18:09:02 | WrapperSimpleApp Usage:
INFO&& | jvm 1&&& |
18:09:02 |&& java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments]
INFO&& | jvm 1&&& |
18:09:02 |
INFO&& | jvm 1&&& |
18:09:02 | Where:
INFO&& | jvm 1&&& |
18:09:02 |&& app_class:&&&&& The fully qualified class name of the application to run.
INFO&& | jvm 1&&& |
18:09:02 |&& app_arguments:& The arguments that would normally be passed to the
INFO&& | jvm 1&&& |
18:09:02 |&&&&&&&&&&&&&&&&&& application.
STATUS | wrapper& |
18:09:03 | &-- Wrapper Stopped
红色字体部分应该是错误提示。
引用Unable to locate the class service.MainService: java.lang.ClassFormatError: service.MainService (unrecognized class file version)
感觉是存在jdk版本不一致编译的文件导致,先确认一下。
已解决问题
未解决问题

我要回帖

更多关于 dnf进程自动消失 的文章

 

随机推荐