tomcat没有正确启动monit

d6kp6zgx  于 2021-07-11  发布在  Java
关注(0)|答案(0)|浏览(229)

我们尝试使用monit服务和下面的配置来启动/停止tomcat应用程序。

check process tomcat matching /opt/tomcat
  start program = "/usr/bin/env APP_ENCRYPTION_PASSWORD=Password /opt/tomcat/bin/startup.sh" as uid "tomcat" and gid "tomcat"
  stop program = "/usr/bin/env APP_ENCRYPTION_PASSWORD=Password /opt/tomcat/bin/shutdown.sh" as uid "tomcat" and gid "tomcat"
  if not exist
    then alert
  if changed pid
    then alert
  if 3 restarts within 3 cycles
    then alert
  if not exist
    then start

tomcat应用程序已启动,但某些功能不起作用。功能说明:从用户界面如果点击一个按钮,zip文件是在特定的路径上创建的。当我试图用monit启动tomcat时,上面的功能不起作用,但当我用startup.sh启动tomcat时,同样的功能也起作用。
错误如下:

Caused by: java.io.FileNotFoundException: DirectorRegister_5af97d34e4b0b0d7d7bb22c0_1601470611272.xlsx (Permission denied)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
    at com.tarento.framework.util.RegisterExcelUtil.downloadRegisterData(RegisterExcelUtil.java:193)
    at com.tarento.framework.util.RegisterExcelUtil$$FastClassBySpringCGLIB$$e02e1bec.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

帮个忙。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题