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

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.

Related

Running Wildfly 10.1.0 with limited user permissions

I have a wildfly 10 install running on CentOS Linux 7.3.1611 with kernel3.10.0-514.16.1.el7.x86_64.
Initially when I started running wildfly I was doing so as root in a domain configuration. I have decided to change this practice and configure it as a service. After configuring it as a service, and letting it run for a while I decided to create a user "wildfly", and make the appropriate changes to the systemd service config and directory permissions. Wildfly starts up properly and the application runs fine.
My issue starts when I try and create another server instance from the management console. The console records the server but its never able to start. After some checking I found wildfly is unable to create server directories. This occurs even when having permissions to do so.
The only error I get is this one from /var/log/audit/audit.log;
type=ANOM_ABEND msg=audit(1507241312.223:19650): auid=4294967295 uid=994 gid=994 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 pid=8570 comm="java" reason="memory violation" sig=6
I have disabled SELinux, and checked the ACL's on all files in the directory structure. Any help would be greatly appreciated. Thanks in advance.

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

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

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.

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