issues with logging and debugging tomcat7 webapp on ubuntu
I used apt get to install jdk7, tomcat7, and mysql server.
My web app deploys fine and running good.
My first problem is with logging: during initialization of tomcat I get "ERROR Unable to create file ../logs/logfilename.log" java.io.IOException: No such file or directory, and my log file isn't being created.
I'm new to linux so I can only guess that the problem is tomcat's permissions to write to the location that the application is running from.
The other problem is that I have set the /etc/default/tomcat7 options to allow remote debugging of tomcat, and I can't connect. My debugger hangs.
What am I doing wrong?
Thanks.
2 Replies
For debugging, I'm asuming you have a firewall running and the port isn't open. I don't know what your client Os is but if it has telnet then try "telnet yourlinodeip thedebugportfortomcat". If it hangs then it's a firewall issue somewhere, your side, your ISP, your Linode
To get out of the telnet session in case it works, Ctrl+] then "close".
I managed to get the log to be written by directing it to a folder that tomcat can write to, thus bypassing the permission issue.
The telnet session is "closed by foreign host". That is not too important as it's only for very rare cases where the actual running environment gets my application to a point that it didn't come to while testing it on my local machine.
The specific issue didn't reproduce so I'm good for now.
Thanks very much.