问题描述:
ESB651 SAM在使用中,出现了一些问题,异常如下:
java.io.IOException: Cannot run program "/bin/sh" (in directory "F:
logsformonitor"): java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
at java.lang.Runtime.exec(Runtime.java:593)
at com.primeton.esb.ssm.log.driver.AbstractSSMLogDriver.countStandardLogByCommand(AbstractSSMLogDriver.java:152)
at com.primeton.esb.ssm.log.driver.DefaultSSMLogDriver.countStandardLog(DefaultSSMLogDriver.java:162)
at com.primeton.esb.sam.detail.AnotherServiceDetailManagement.queryServiceDetailsByTimeSpan(AnotherServiceDetailManagement.java:166)
at com.primeton.esb.sam.detail.AnotherServiceDetailManagement.queryServiceDetails(AnotherServiceDetailManagement.java:98)
at com.primeton.esb.sam.report.ReportUtil.queryServiceDetails(ReportUtil.java:67)
at com.primeton.esb.sam.report.ServiceDetailSearch_flow.invokePojo1_3(ServiceDetailSearch_flow.java:741)
at com.primeton.esb.sam.report.ServiceDetailSearch_flow._newQuery(ServiceDetailSearch_flow.java:908)
at com.primeton.esb.sam.report.ServiceDetailSearch_flow._view0(ServiceDetailSearch_flow.java:941)
at com.primeton.esb.sam.report.ServiceDetailSearch_flow.process(ServiceDetailSearch_flow.java:982)
at com.primeton.engine.core.impl.process.PageflowInstance.process(PageflowInstance.java:327)
at com.primeton.ext.engine.core.processor.AbstractPageFlowProcessor.doProcess(AbstractPageFlowProcessor.java:330)
at com.primeton.ext.engine.core.processor.AbstractPageFlowProcessor.process(AbstractPageFlowProcessor.java:112)
at com.primeton.access.http.impl.ProcessorWebInterceptor.doIntercept(ProcessorWebInterceptor.java:105)
at com.primeton.access.http.impl.WebInterceptorChainImpl.doIntercept(WebInterceptorChainImpl.java:54)
at com.primeton.access.authorization.impl.AccessedHttpResourceFilter.doIntercept(AccessedHttpResourceFilter.java:112)
at com.primeton.access.http.impl.WebInterceptorChainImpl.doIntercept(WebInterceptorChainImpl.java:54)
at com.eos.access.http.UserLoginCheckedFilter.doIntercept(UserLoginCheckedFilter.java:124)
at com.primeton.access.http.impl.WebInterceptorChainImpl.doIntercept(WebInterceptorChainImpl.java:54)
at com.primeton.access.http.impl.WebI18NInterceptor.doIntercept(WebI18NInterceptor.java:64)
at com.primeton.access.http.impl.WebInterceptorChainImpl.doIntercept(WebInterceptorChainImpl.java:54)
at com.primeton.sca.host.webapp.SCAWebServiceServletFilter.doIntercept(SCAWebServiceServletFilter.java:122)
at com.primeton.access.http.impl.WebInterceptorChainImpl.doIntercept(WebInterceptorChainImpl.java:54)
at com.eos.access.http.InterceptorFilter.doFilter(InterceptorFilter.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 38 more
解决办法:
从异常来看,是由于地址错误导致(缺省是windows的路径格式),在接口运行检索时是否有修改sam下user-config中对应地址为ssm指定地址,如下所述:
修改sam安装目录/sam/config/sam/config下user-config.xml文件,最后一段的路径,如下:
C:\Primeton\ssm\instances\default\esblogs .log. 修改logRootPath的地址为ssm解析生成的日志目录esblogs文件夹
重启SAM。 从异常来看仍然是默认的F:
logsformonitor地址。
更多参见:doc.primeton.com