1

I've got CentOS 7 installed on my machine (Basic Web Server with Java Servlet Engine - Tomcat), and I have Spring Boot app. If I build my app as a jar, and run it on server with java -jar my_app.jar, the app starts fine, and logs to file specified in application.properties (logging.file). But, after converting app to war packaging (using this tutorial), and deploying it to tomcat, app is running but tomcat doesn't log to file I specified, nor does it log in catalina.out

Both catalina.home and catalina.base point to /usr/share/tomcat/ folder. Also, I can't acces /usr/share/tomcat/logs even though I'm admin and using sudo. Only thing written in catalina.out is: tomcat-7.0.54 RPM installed. I've checked that as a root user. Might be permission problem, don't know. Normally, I would use logger to check for problems, but, as I've said, relevant logs are non-existent.

Has anyone expirienced similar issue, or knows the solution?

zkristic
  • 629
  • 1
  • 9
  • 24
  • 1
    Sounds very weird. Tomcat never prints "tomcat-7.0.54 RPM installed" to `catalina.out`, so that came from somewhere else. What happens if you launch Tomcat using `bin/catalina.sh run` instead of `bin/catalina.sh start` or `bin/startup.sh`? – Christopher Schultz Mar 12 '16 at 13:55
  • Sorry, can't answer that question. Since I didn't get any answers or comments I decided to remove Tomcat and deploy my app as a .jar file using systemd. But thanks for trying to help ;) – zkristic Mar 14 '16 at 08:16
  • Awesome: `systemd` is now a servlet container. Getting better every day. – Christopher Schultz Mar 16 '16 at 01:18
  • I don't know if you are sarcastic or serious but that is not what I said. systemd is not a servlet container (at least I don't think so). I said I used systemd to start my app which is in .jar format (like most of Java apps). Spring Boot .jar files have embedded Tomcat instance. I hope I clarified my previous comment. Kind regards :) – zkristic Mar 16 '16 at 11:25

0 Answers0