I successfully created a JSFJSP using Netbeans on my PC, and gotten it to run on my tomcat server which is running on my Sun workstation. This was version 5.5.9 of tomcat. I needed to copy some files of code and libraries from my PC directories to the Unix side, but everything worked (and I planned on creating a better infrastructure in the near future).
Recently, the server stopped working mysteriously. I ended up downloading tomcat 5.5.17 and was able to get my tomcat server to restart. However, when I type in my URL of:
instead of seeing the nifty Tomcat screen that lists all of my subdirectories, which I can click on to run my JSP, (which I used to until it mysteriously stopped working) I see a completely blank page. Absolutely white with nothing on it at all.
I've recopied my directory trees of libraries, code, WEB-INF files, etc to everywhere I can think of that is appropriate - under my $CATALINA_HOME, my $CATALINA_BASE, my $CATALINA_HOME/webapps, etc.
Since this all worked recently I am rather mystified that it is not working now. I have not changed my browser, which is Firefox, and I can get to the internet - so all of the proxy settings should be ok.
Any ideas on what this problem might be or at least on how to diagnose it? Or, an alternate URL that will allow me to display my JSP. The startup script is throwing a few exceptions, but indicates at the end of its log that it started successfully after roughly 10000 ms. In the past I was able to run applications on this server properly even with many more exceptions in the log file.
Andrew [ August 08, 2006: Message edited by: Bear Bibeault ]
You didn't move or remove any jar files from the shared/lib or common/lib folders?
P.S. I changed the subject of this topic to better reflect the problem and attract those with knowledge in this area.
Joined: Aug 08, 2006
I didn't remove any libraries from these directories after the download of the latest version of tomcat from their web site.
Looking in $CATALINA_HOME/common/lib now, I see the "usual libraries" : jsp-api.jar, commons-el.jar, and a few home. $CATALINA_HOME/shared/lib, while existing, is empty ... not sure if that is a problem or not.
Originally posted by Andrew Shurak: $CATALINA_HOME/shared/lib, while existing, is empty ... not sure if that is a problem or not.
I don't think so. I don't think there's anything there in a default Tomcat install that the manager app would depend upon. (Btw, shared/lib is where you would place jar files that you want to be shared across all your web apps).
I'm really at a loss at this point as I've never had any issue getting the manager app up and running on a Tomcat instance.
You didn't create a folder in webapps named "manager"? (Just stabbing in the dark).
Muck around in the tomcat_users.xml file?
Boof something up in server.xml?
Joined: Aug 08, 2006
Bear, here are the stack traces that were thrown when the server started up:
SEVERE: End event threw exception java.lang.ClassNotFoundException: org.apache.catalina.Container at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClasLoader.java:1352) [...]
SEVERE: Parse error in application web.xml file at jndi:/localhost/MY_PROJECT/WEB-INF/web.xml java.lang.ClassNotFoundException: org.apache.catalina.Container at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2725) [...]
Aug 7, 2005 3:06:22 PM org.apache.catalina.startup.ContextConfig applicationWebConfig SEVERE: Occurred at line 23 column 19 Aug 7, 2006 3:06:22 PM org.apache.catalina.startup.ContextConfig start SEVERE: Marking this application unavailable due to previous error(s) Aug 7, 2006 3:06:22 PM org.apache.catalina.core.StandardContext start SEVERE: Error getCOnfigured Aug 7, 2006 3:06:22 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/MY_PROJECT] startup failed due to previous errors Aug 7, 2005 3:06:24 PM org.apache.catalina.startup.ContextConfig defaultWebConfig INFO: No default web.xml
Hopefully this will shed some light on the problem.
Are your web apps self-contained enough that starting a fresh new Tomcat install and moving them over would be feasible? You could check the manager app at each step along the way, and if it stops working again, you'd at least know what triggered it.
I did some more experimenting with a co-worker today and it looks like the problem lies with the ports on the server machine (i.e. where I am running startup.sh from). Here is what happened:
One of my co-workers copied my entire tomcat tree to his home directory. When he did so and restarted the tomcat server (after I shut mine down), he received an error message in his log file saying that it couldn't bind to port 8080 because it was already in use. This message did *not* exist in my own log file though, even though everything should be exactly the same (since he copied my directory tree over). Weird!
He then changed the port used in the server.xml file to 8084 and was able to bring up the server (first on his machine, then on mine) and connect to it via his browser. I was then able to connect to his server myself. Success!
BUT ... then he shut his server down and I went to bring it up myself. BZZT! I got the same weird stack trace errors that I posted yesterday, and when I try to access the server from my browser, I get a blank page.
I spoke to one of our Unix admins and we did a fair amount of snooping around my machine. It seems like the ports in question are being used, but we can't figure out what process is using them. Also the stack trace was saying that port 8005 was being used, which is odd because we did not reference that and I am not running any other web apps on my Unix box (except for Netscape so I can read the tomcat doc files which are in html).
Just now I tried port 8082 (in my server.xml) and got the same stack trace messages that I posted yesterday, without any mention of port 8005.
My Unix Admin thinks that it looks like tomcat is somehow starting twice (or thinks it is) and the port gets locked up as a result. I am wondering if somehow my login has an issue with properly accessing ports since my co-worker had no problems while I did.
I just tried port 8082 now, but had no luck with that either - same obscure stack traces in my log file that I posted yesterday.
Rebooting is an option, but (besides having to restart close to 100 xterms, sigh) it seems like there is some deeper issue which would just reoccur. Is there some config variable that affects how Unix apps access a machine's ports?
I am running tomcat under the same username that I installed it in, and the file permissions look ok. There were a few issues with missing files that I fixed (since this was actually the second time I installed tomcat locally).
I did download it on the PC side and then copied it (the gzipped tomcat file) to our Unix network, and unzipped it on Unix. Could there be a dos2unix issue with a gzip file?
Joined: Aug 08, 2006
Regarding the idea of redownloading and reinstalling tomcat, to see where things break - that's basically what I have been doing.
I was using a previous version of tomcat which was working fine until it mysteriously refused to start up cleanly (I never would have brought it down in the first place except that some network work resulted in my Unix box getting rebooted).
So, I downloaded the new version of tomcat. This one would startup, but I couldn't connect to it from Firefox. In other words, I could never get the new installation to a point of it working so I could see where it went wrong - there was no "good baseline" to begin at.
I was also using a version of tomcat whose source code lived in a common area, but that version also mysteriously began not starting up for me, after it was working for a while. If there is a port problem on my machine that would explain it.
At this point my options seem to be: - Always have a co-worker bring up the server, either on their or my machine - Reboot and hope the problem doesn't come back - Redownload tomcat a second time (!) and hope it starts working
I could also ask for a newer (and faster) machine but that's probably not going to happen
Joined: Aug 08, 2006
One more thing I found about this "blank page error" on the Tomcat Msg Boards from April of this year:
List: tomcat-user Subject: Re: Blank page after tomcat install From: David Smith <dns4 () cornell ! edu> Date: 2006-04-27 20:15:15 Message-ID: 44512653.5090107 () cornell ! edu [Download message RAW]
This may or may not be the case, but any time I've ever gotten the dreaded blank page response, it was caused by an exception processing the request. Late enough that an error message couldn't be included in the response. What do the logs show? Are there any errors at the time of the request? Also, have you verified no other process is on 8080 instead of tomcat? Logs will show that to.
Originally posted by Andrew Shurak: ... He then changed the port used in the server.xml file to 8084 and was able to bring up the server (first on his machine, then on mine) and connect to it via his browser. I was then able to connect to his server myself. Success!
BUT ... then he shut his server down and I went to bring it up myself. BZZT! I got the same weird stack trace errors that I posted yesterday, and when I try to access the server from my browser, I get a blank page. Andrew
Got it, I missed this earlier.
Look in your server.xml file (CATALINA_HOME/bin/server.xml).
There are two ports that you need to be concerned with. The one that tomcat listens for HTTP requests over (8080 by default) and 8005 which is the shutdown port. If you want to have multiple copies of tomcat running on the same machine you need to insure that BOTH of these ports get changed on one of the copies.