Timeout last 10 min in Tomcat 7 - java

I have deployed a webapp in Tomcat 7, and I'm not using Eclipse, but when I run application last 10 min appear a timeout exception, exactly: Read timed out.
I've tried to change:
In web.xml:
session-timeout 30
In server.xml I added:
connectionTimeout="20000"
keepAliveTimeout="90"
Also I addes in startup.bin before #echo off:
CATALINA_OPTS=
-Dsun.net.client.defaultConnectTimeout=900000;
-Dsun.net.client.defaultReadTimeout=900000
I don't know what other parameter to configure, because always stop to 10 min.
Someone can I help me?

If you are using eclipse. Then goto server explorer and double click on your tomcat server.
It'll open a new tab inside your eclipse. There is Timeout section on the right side.
you can increase your session timeout time of tomcat server. without changing the server.xml
if it doesn't work follow below link
Tomcat request timeout

Related

What's XAMPP? Can anyone help me with its mySQL error?

I am developing a Java program and I was recommended to install XAMPP. Still, I am not sure if it is secure or not to my home computer. Is it dangerous or should I keep it? Sorry, I do not know anything about XAMPP.
Also, I started running it because I am doing a tutorial, and I came across the following error: http://prntscr.com/drwra6
Can anyone help me? Please, do not use difficult concepts :)
Thank you very much.
Short Answer
Uninstall Sype
Long Answer
Open Skype.
Tools -> Options -> Advanced -> Connection.
Disable the "Use port 80 and 443 for alternatives for incoming connections"
Sign Out and Close all Skype windows. Try restarting your Apache.
VERY LONG ANSWER
As I am working in a corporate environment where developers faces firewall issues, none of the other answers resolved my issue.
As the port is not used by Skype, but by some other internal applications, I followed the below steps to resolve the issue:
Step 1 - From the XAMPP Control Panel, under Apache, click the Config button, and select the Apache (httpd.conf).
Inside the httpd.conf file, somehow I found a line that says:
Listen 80
And change the 80 into any number / port you want. In my scenario I’m using port 8080.
Listen 8080
Still from the httpd.conf file, I found another line that says:
ServerName localhost:80
And change 80 to 8080.
ServerName localhost:8080
Step 2 - From the XAMPP Control Panel, under Apache, click the Config button again, but this time select the Apache (httpd-ssl.conf). Inside the httpd-ssl.conf file, find line that says
Listen 443
And change the 443 into any number / port you want. I’ll using 4433 as the new port number.
Listen 4433
Still from the httpd-ssl.conf file, find another line that says
ServerName localhost:443
And change 443 to 4433.
ServerName localhost:4433
Remember to save the httpd.conf and httpd-ssl.conf files after performing some changes. Then restart the Apache service.
SOURCE XAMPP, Apache - Error: Apache shutdown unexpectedly
CONCLUSION
Google first

Eclipse Java EE + Bitnami Tomcat Stack

This is my situation:
Eclipse ide that i use to develop java web apps.
Tomcat from apache.
Tomcat stack from bitnami.
OS Windows 8
If i deploy and debug to the apache tomcat all work without problem.
If i try the same thing with the bitnami stack, i see the exact same output from the console, like it is starting well, but actually it doesn't and it gets to the timeout saying it was unable to start withing 45 seconds.
I tried to increase the timeout but that's not the problem.
In both cases the Server Location is set to Use Tomcat installation, and i added my project to the source, everything else in the server config is default.
I'm not an expert of tomcat and java webapp deploying, and i need to get it working with the bitnami stack.
Any hint will be appreciated.
Ok i solved it, seems more a problem from eclipse.
In the server configuration i noticed the HTTP port was not listed and it was commented in server.xml
Could this be because the bitnami stack uses port 80 instead of 8080?
Anyway setting the port 80 in server.xml solved the problem.

GlassFish Server: Administrator port is occupied by null

I tried to start glassfish server via the Netbeans IDE but it showed this error:
Could not start GlassFish Server: Administrator port is occupied by null
C:\Users\Ateeq Khaliq\Documents\NetBeansProjects\WebApplication1\nbproject\build-impl.xml:1045: Deployment error: Could not start GlassFish Server: Administrator port is occupied by null
See the server log for details.
BUILD FAILED (total time: 2 seconds)
I have changed the port also to 9999 in C:\Users\Ateeq Khaliq\GlassFish_Server\glassfish\domains\domain1\config file.
How can I fix this?
Change this
the solution is change the host configuration
netstat -aon | find ":4848" | find "LISTENING"
Kill the process that is using your Administrator port
Its seem to be a Bug in Netbeans
if you have alraidy found a solution please let me know.
I had the exact same problem and the way I solved it was to delete the glassfish, tomcat7 and tomcat 8 servers from my IDE. I then deleted their folders on my hard disk and reinstalled the glassfish alone. Everything worked fine after that.
If Netbeans is blocked by Firewall this happens. Make sure your Antivirus firewall is not blocking NetBeans. Grant NetBeans full access to act as a server (This is also asked when you start NetBeans).
Then you should be able to start your server through NetBeans
remove glassfish server from Netbeans and added another one click Tools-servers
select your server and click remove servers and click add servers change the domain name and change port from 8080 to 8090 as you like. restart Netbeans
It has a really simple solution, just restart the Java process in your machine and you should be good to go..

Tomcat 6 is in starting synchronised mode and shutsdown after timeout in eclipse juno

Tomcat logs INFO: Server startup in 181667 ms but never in started state as it is in starting and synchronised state. I'm using eclipse Juno. I have gone through related posts but the issue is not resolved.
I get the following error:
Server Liferay v6.0 CE Server (Tomcat 6) at localhost was unable to start within 900 seconds.
If the server requires more time, try increasing the timeout in the server editor.
Please let know the cause for this scenario.
You can increase your tomcat start time.
Click on double click on on your server find timeout option and increase your start time (in seconds)
Let me know if you have problem

Having trouble with starting tomcat server in eclipse

I have a problem when starting TOmcat 6 server from eclipse, it pops up with the following message:
Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
It could be that it just takes too long to start-up. You can check that from your logs to see whether it was midway through when the default 45 secs cutt-off time occurred. If so, on the Servers view double-click on the tomcat instance you are deploying and in the Overview tab, click on the Timeouts section on the right column and give your tomcat a bit more time to startup.

Categories

Resources