logs are still showing "Starting Servlet Engine: Apache Tomcat/7.0.42" after upgrading tomcat to 7.0.054 - linux

i just upgraded tomcat to 7.0.54 from 7.0.42 and started it.. Everything is looking as expected but while starting the tomcat it showing "Starting Servlet Engine: Apache Tomcat/7.0.42" this line in logs..
i checked all my configurations again and but couldn't found from where that line is coming.
Please help me with this

Are you sure you have upgraded correctly. If you unpacked new tomcat to new location, but left the CATALINA_HOME variable unchanged most likely you still start up the old tomcat and hence the logs.
So check if you don't have system variables set to point to wrong paths. If you overwrote the old instalation check if you really did it, in linux there would be typically read only.

Thanks for the advise. I found the issue. I was overriding new tomcat on old tomcat. But i didn't replace new lib with old lib. After doing so, issue resolved

Related

service <tomcat8> start fails to start service without any error in servlet.log

I upgraded Apache tomcat from 7.x to 8.5.29 recently. tomcat is deployed inside my application. I have /etc/init.d script which starts tomcat (off course along with some of my project specific other services as well).
Command: service start was working fine till I was on tomcat 7 and then after upgrade to tomcat 8.5.29 this command stopped working. There are no changes in /etc/init.d script at all. Just matter of tomcat upgrade only. Servlet.log is not showing any error but if I compare servlet.log of tomcat 7 and tomcat 8.5.29 then I can figure out that my application is not loading. As such there are no errors in servlet.log of tomcat 8.
Whereas all things works prefectly fine if I use /etc/init.d/<myapp -tomcat8> start.
I'll really appreciate if I can get any help from you all guys.
So after 2-3 days of struggle, I found solution to my own question. Someone may find useful.
I switched on debug mode of apache tomcat 7 (I am using log4j2 and already it was configured) and apache tomcat 8 on two different system and compared working log of apache tomcat 7 with non-working log of apache tomcat 8. I found that tomcat8 is scanning many extra and irrelevant things.
I updated context.xml, located in Tomcat's /conf directory as follow and that worked for me.
<JarScanner scanClassPath="false"/>
Please note following :
Placing above in app specific context.xml didn't worked for me.
Updating catalina.properties file with tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\*.jar was also not working for me.
After doing changes I was facing error : java.lang.IllegalStateException: No output folder but that was due to wrong permission/ownership of tomcat folder.

Tomcat not recognizing WAR file with specific name

I have tomcat 7.0.12 installed under RHEL 6.3, but it was removed by mistake using remove command form terminal (Tomcat was up and running), after few days I had to deploy another WAR with the same name, what I did is stopped tomcat cleared cache and installed the new WAR, but when Tomcat manager was opened there is no trace to the new WAR (note if I changed the name form MyWAR to myWAR for example I can start it but the name MyWAR is not recognized), please advise.

Webapp Logback Logging Does Not Work Using Tomee Plus 1.6.0 on Linux

I am able to get logback logging to work correctly on my development environment (Windows) using Tomee 1.6.0.1; however, whenever I try to deploy the webapp on my Tomee server on Linux, it never creates the "test.app.log" file specified in the logback.xml configuration file inside of the WEB-INF/classes directory of the webapp.
Using maven, I have included logback-classic-1.1.2 and logback-core-1.1.2 in the WEB-INF/lib directory of the webapp.
I double check permissions for the directory to which I wish to write (CATALINA_BASE/logs), but it is set to rw for all users so I doubt that is the problem.
No matter what I try, all of my logs keep getting pushed to catalina.out. Can anybody solve the mystery as to why logging with logback works correctly on Windows (development environment) but not Linux?
It turns out that we were separating our EJB's into another directory and adding that directory as a "Deployment dir" in tomee.xml. This unhooks the webapp independent logging.
Romain, from Tomee fame, suggested I use either VirtualWebappLoader or jars.txt implementations.

Tomcat Intellij Idea: Remote deploy

RackSpace Cloud Server Ubuntu-12.04, Intellij Idea-11.1.2, Windows-8, Tomcat-7.0.26, JDK-6.
On Intellij Idea when i try to run jsf project on my remote Tomcat 7 server it says:
Error running servername: Unable to connect to the ip-address:1099
It seems problem is about JNDI port which is 1099 but I couldn't activate it I guess. Tomcat config is sth. like that:
What I've tried?
Setting CATALINA_OPTS or JAVA_OPTS on the server side with:
CATALINA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
and
JAVA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
But this one did not work, any ideas?
My answer to my question:
The correct way to deploy remotely is editing JAVA_OPTS environment variable on the remote server. Just enter the command below:
export JAVA_OPTS="-Dcom.sun.management.jmxremote=
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false"
If that's not going to work and if you don't have any obsession to deploy your website via Intellij Idea, I've got the solution for this problem. To be able to run your website under Tomcat, you can/should get artifact in form of .war file.
It can be done in Intellij from project settings(ctrl+alt+shift+s) then hit the plus button and add new artifact(web:application archieve)
After rebuilding the artifact, .war file can be seen in project-folder\out\artifacts. Next, you should place this file into your tomcat/webapps folder.
For example if you are using Tomcat-7, the folder that I mean exists in /var/lib/tomcat7/webapps. Before copying your .war file you should rename it as ROOT.war. This provides to access your site directly by http://youripaddress:8080. After restarting Tomcat7 service you can access the site.
But not finished yet, you can debug your project remotely like you are debugging your project at your local machine with Intellij Idea. Open Run/Debug Configuration in Idea, hit the plus button and there must be Remote. This is the way to debug your projects for application servers like JBoss, Glassfish as well in Idea. Enter your host and port numbers, select your project as a module.
Before starting to debug, as Intellij says you should give the following parameter to your server JVM:
JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
To be able to do that in Ubuntu and for Tomcat-7, modified the catalina.sh file in usr/share/tomcat7 folder. I inserted the parameter above of the if [ -z "$LOGGING_MANAGER" ]; then line. It must be on the middle part of the file. Then you should be able to debug your project with Intellij Idea.

PHP JAVA Bridge

I am very new to Linux but I am trying best to learn. We have dedicated hosting server of CentOS 6. It is configure with Apache Server as our public website. Now we need to install PHP JAVA Bridge on it.
What I did is, I install TomCat 6 and jdk 1.6. Then I copy JavaBridge.war file to $CATALINA_HOME/webapps folder and jar files on $CATALINA_HOME/lib folder. When I check from tomcat 8080 port JavaBridge is working very good.
Then I make symlink of $CATALINA_HOME/webapps/JavaBridge on my apache server. Untill here everything is okay
But when I try to browse from browser like http://www.xxx.com/JavaBridge I will get following error
You don't have permission to access /JavaBridge/ on this server.
Apache Server at www.gizeleonline.com Port 80
Now my question is that do I am doing it in wrong way or do I have to get rid of Apache server or I am missing something.
Kindly help on this experts :)
Actually it was my mistake. I just re-image my server and re-install everything it start working everything. thanx for help every body

Resources