I have a somewhat baffling issue running a webapp in Apache Tomcat.
After deploying the page works fine, but sometime during the day, a page inevitably fails to compile.
The issue is not with the page itself, the page changes daily, which page seems to be determined by the order/frequency of access.
If nobody has accessed the log page during the day, that's the page that will break down.
If the log page has been accessed, it will keep on working until the next deploy, but another page page will break down.
By break down i mean:
http://codepad.org/V1yosH8k (jsp, more prevailant)
Stacktrace: http://codepad.org/P9VpXBRW (java)
ClassNotFoundException/NoClassDefFoundError: Obviously the class does exist, it works fine if accessed early after deploy.
It happens on the live server, but am unable to reproduce it on my dev machine.
Running apache tomcat 6 with JAVA_OPTS "-Xms1024m -Xmx1900m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=768m -XX:MaxPermSize=768m"
Anyone able to give me a push in the right direction?
Related
I manage a few Tomcat 9 applications that are run on a remote server that also use IIS 8.5. Each site has three environments (DEV, TEST, and PROD). All of the environments are the same but on different servers. Their databases (Oracle DB) are also on separate remote servers. I do not use any other third party frameworks for the sites (such as Maven or Gradle).
One of my applications had an issue where an attacker could access the web.xml through a Multiple Directory Traversal Vulnerability. Some brief information can be found here: https://www.securityfocus.com/bid/63052/exploit
However, I discovered on the DEV and TEST (I thought PROD as well) that the filter we put in place was actually causing the site to not work correctly. You'd put in your user and password and click login and nothing would happen. I seemed to have fixed it on the DEV and TEST environment by fixing the regular expression that my code was testing the URI against. Code:
final String REGEX_INCLUDED = ".*\\/WEB-INF\\/web.xml.jsf.*";
...
if (Pattern.matches(REGEX_INCLUDED, URI)) {
log.debug("SecurityFilter redirect");
resp.sendRedirect("/errors/403.html"); // /login.jsf OR /index.html
} else
chain.doFilter(request, response);
I deployed the new war onto PROD, entered my user and password and it would load. The site redirects to the homepage after login, BUT it doesn't actually load if that makes sense. The response is a generic 502 error (shown below) but the URL does, in fact, say /home.jsp where it should respond with the homepage.
502 Error
I've checked the catalina log and I've not found a stack trace or any sign of an error being output. No other logs are useful either in showing what the issue is. I've tried just clearing my cache and retrying, using a different browser, restarting the tomcat service, restarting the site in IIS and nothing.
If there is something I'm missing that you wish to see let me know. BTW, I've tried removing the filter that blocks access to the web.xml just to make sure it wasn't the issue and both with and without the filter, it results in the 502 error.
Thanks in advance for any help.
Answering my own question: I had looked around everywhere and only after posting I found a related post:
502 proxy error on deployment
Their answer helped. The difference between my PROD environment and my DEV/TEST environments is that PROD is on a Proxy. I went to IIS on the server and found the server farm that the site used. I then clicked on the Proxy option and changed my timeout from 30 seconds to 60 seconds. Looks like my proxy was timing out. Hope this helps someone in the future.
Sorry if this question was asked before, if it was, I didn't find it.
I'm using GlassFish 4.
When I need to redeploy an application (for fixing a bug for exemple), its URL will return temporarily a 404 NOT FOUND error until the application is fully redeployed.
My question is: do you know a way to redirect the URL to another application or a web page ("Application not available for the moment...") during the time the URL is inaccessible?
I heard of load balancer but it's between 2 servers (which I don't have).
Thank you.
You can use rolling updates to update an application without any downtime, by using the :version suffix. For full information on how to do it, see the blog post at http://blog.payara.fish/payara-server-rolling-upgrades.
At particular page in the project, I get output on the page.
When I refresh the page then also I get the same output. This is absolutely correct.
But when I refresh the page third time it shows busy browser and never return anything on the page. I am using tomcat server, hibernate, spring.
Due to busy browser and it never show anything ever, I have to restart the tomcat server.
Now history repeats. Third refresh make browser busy which doesn't fetch anything.
Is there any problem in hibernate ?
You first question would be like, what logs you are getting?
I see nothing in the log.
we have a GWT application running fine in production environment, but we're noticing a strange behaviour in some rare, random cases.
The problem is that our home page (the GWT entry point) is stuck with a loading message.
Looking throw the generated network traffic, from the login attempt, to the loading message, we can see that the *.nocache.js is correctly loaded from the server (http 200) but the js file declared inside the *.gwt.xml file are not loaded (no server request at all).
It seems that the nocache.js file is loaded correctly, but not executed, thus the absence of the server requests.
Any help would be greatly appreciated.
I'm working on an assignment. An online order system using EJB 3.0. im using jDeveloper 10 and oracle 10g for the database. i have coded around 20%, now i need to check the system that i have developed so far. so when i run the web client it does not show me any error and it runs successfully. but when the browser tries to open the page it says. HTTP 500 internal error on the browser. My jsp page is under web directory anyway. output pic is attached.
how could solve this issue?
Are there any log files on your web server ?
Put in your code some statement to log to file what is doing.
Use a browser with developer support, like Firefox with Firebug, and watch the HTTP transactions.
Which other conditions change between web client and browser mode ?
how could solve this issue?
Look at the log files in your EJB server. There will probably be an entry or entries corresponding to your browser's attempting to fetch the page that resulted in the 500 error. They should give some information about what is happening, and may even give you a stack trace. Also check the SEVERE / ERROR / WARNING entries prior to the event.
If that doesn't give you an answer, you need to investigate what is different about the requests when they come from your web client versus from your browser. If your EJB implementation has a way to capture the incoming request headers, use that. Otherwise, you could use wireshark or tcpdump to capture them.
Thanks for your contributions.
I guess it was something wrong with my jdeveloper 10. i installed the jdeveloper 11 n i started running on it. the project started to run successfully.