This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[ BUILD # : 200509151455 ] [ JDK VERSION : 1.5.0_04 ] On previous versions, when IDE stopped detecting Tomcat (which often happens when you do a lot of typing while integrated Tomcat is running and click Run to execute the changes), it gave an error of port already in use, but continued deploying the application. Currently stops, you can't force the IDE detecting Tomcat, not even refreshing, and the only solution is to restart the IDE.
Lluis, do you have some steps to reproduce? I don't understand in which ciurcumstances IDE stops detecting Tomcat instance.
The times occurred to me I did: 1) Run a web application with integrated Tomcat 2) Do a lot of typing in the IDE or Create images for the web or Lunch time (with this I mean IDE+Tomcat were running, Tomcat always on the background) 3) Run the application again. In 4.1 I could see the symptoms on the Runtime window, where Tomcat showed as stopped. In 5.0 I see it on the contextual menu, with 'stop server' greyed. Anyway, what's more tedious now is restarting the IDE just because 'port already in use'
I don't quite understand the description, marking as INCOMPLETE temporarily. Does it mean that NB successfully start Tomcat in the step #1 and then after a while of something else doing (step #2) Tomcat shuts itself down, but does not release its network sockets?
Oh no, Tomcat continues working, but the IDE doesn't reflect it. In 4.1, atfer it happened, I could see in the browser the application changes. But in current release the IDE doesn't deploy the application once founds the error.
Lluis, not depoying is not as bug. The primary bug is that IDE looses Tomcat and detects it as stopped. We haven't seen it before. Could you please give us steps to reproduce such behavior?
I reproduced the steps on my second post. It happens often to me, maybe once a day. I said nothing before because 4.1 continued despite the error. I think the ingredients are: NB + Tomcat + A Memory consuming application. I thought NB 4.1 was giving some time for Tomcat to respond before guessing whether it was up or down and because memory swap, this time was over-passed.
I just get it now. I took a screenshot from the error. In order to get current Tomcat its status I pressed the Refresh button. If I didn't do that, the buttons Stop and Restart still were enabled. The IDE status bar shows project(run) and Deploying project as current tasks, but it freezes. Tomcat is running, and when I do refresh I get: --------------------------------------------------------------------------- HTTP Status 503 - This application is not currently available type Status report message This application is not currently available description The requested service (This application is not currently available) is not currently available. Apache Tomcat/5.5.7 ---------------------------------------------------------------------------
Created attachment 25034 [details] Tomcat port already in use, Tomcat stopped
HTTP Status 503 appears in browser? If yes then it is definitelly Tomcat problem, not NetBeans problem.
Oh, I start doubting my English is good enough, take patience. Yes, it appears in the browser: after an attempt to start Tomcat when Tomcat was already started. Next come the web application not responding. Notice that the application was running before the attempt and will run perfectly after restarting. Also, if I did not stop working on NB it wouldn't happen.
The status code 503 - Service Unavailable indicates a serious problem with the webserver. It looks like this issues is caused by a weird state of your Tomcat installation and not by a bug in NetBeans. It could be caused by server configuration or by some of the deployed applications. Can you try your reproduction step with a clean user dir and a new web project (the simple one the new web application wizard generates for you)?
Ok, I'll try. But notice I filled the issue thinking about a change on IDE's behavior. NB4.1 also failed from time to time checking Tomcat's status, but continued deploying the application. I tried on NetCAT list for other people having this problem, maybe someone would help.
Just now, I started an image editor (creating new skins for the webapp) and when I returned to NB, made some changes and ran the application. It gave me the error, but this time Tomcat continued running the web application. :-/ I'll try with a very simple web-app, as you suggested.
Opps! I stopped the IDE (confirmed by the task admin on W-XPP) and Tomcat continued running!
Can you try to access with the browser some non-existing page on your Tomcat when NB is failing to detect the running state of your Tomcat, lets say http://localhost:8084/response_test for example. Is the response "instant" - is there a visible delay? If yes, this could be probably the reason why NB detect incorrectly the server state.
I'm experiencing the same problem, address already in use: JVM_Bind:8084. When I try to browse to http://localhost:8084, I get a page indicating Tomcat Web Server v3.2 is running (see attached). However, this page only appears after I try to start Tomcat 5.5.7 from w/in NetBeans. That is, if I try to browse to localhost:8084 before trying to start Tomcat 5.5.7, I get the connection refused dialog, as expected. As far as I know, Tomcat 3.3.2 is not installed on my workstation (WinXP). But somehow, NetBeans is starting it before starting 5.5.7, causing the bind exception.
Created attachment 25207 [details] Tomcat 3.2 running at localhost:8084
Could you both please specify hardware configuration of your workstations? Processor and RAM will be fine,thanks.
Cannot reproduce in 200509251930,so decrease priority to P3.
Intel Pentium M 1.80 GHz w/ 2 GM RAM. I will test again on the beta. /Brian
XPP, Pentium III, 384 Mb. On my Linux box I never had this problem. I'm running more memory, 512Mb. Definitely bleonard problem isn't the same problem. FYI, sherold, there is a delay when this problem occurs. The computer seems to freeze when returning to NB. I'm 90% sure the problem is this delay. I'll look further this week.
PP, Pentium III, 384 Mb. NB 5.0 Beta. I got the same error and the application was undeployed (or whatever state it has when incremental deploy fails) Stopping/Restarting Tomcat from within the IDE had no effect, same error. I stopped the IDE and Tomcat kept running. I tried because I noticed the 'Waiting for Tomcat...' screen didn't appear. I started the IDE again and this time NB checked Tomcat as 'Running'!? But couldn't deploy the application. I moved to my Linux box, where I have more memory and never get those errors. To me, this happens only with short memory and large programs (compiler, j2ee server, imaging)
Unfortunately, the Beta did not solve my problem. Since my problem is slightly different, I'm going to open a new bug.
I have the same problem At home I have Tomcat 5.5.9 port 8080 shutdown port 8025 JDK 1.5.0_05 I tried to change the shutdown port on blundled tomcat 5.5.7 to 8030 to see if it solves the problem, but it only allowed me to have both tomcats online at the same time, but netbeans was still missing the blundled status. BTW, it says it is stopped when it is running. Try to access Http://localhost:8084 to see if it is running or not On IE you must change the Internet Options to verify the page for each visit, else it shows the tomcat welcome page even if tomcat is not running. On Firefox it checks if the page is new by default. i dont know why netbeans misses the tomcat status, at work, i have no other tomcat, and it works fine At work, i installed brand new NB50Beta, using JDK1.4.2_07. tomcat runs application runs application debugs tomcat stops everything works just fine. RAM at home: 768 MB RAM at work: 256 MB Both Windows XP SP 2
We aren't still able to reproduce this test case.Could you please find some simplier reproducible test case or attach messages.log,Tomcat and web app output,after this occured?
I thought I'll never see this on my Linux box, but there is. Port already in use exception, NetBeans down and internal Tomcat running the web application as if nothing happened. I'll attach NB and Tomcat logs.
Created attachment 26320 [details] Log file
Created attachment 26321 [details] Catalina log
As in previous occasions, I had several applications running at the same time.
It looks like the problem is caused by slow Tomcat response. You can try to increase the timeout NB uses for checking the Tomcat state. 1. Shutdown NB 2. Go to your NB user dir 3. Open the config/.nbattrs file and add the following line <attr name="J2EE\InstalledServers\Tomcat_instance\runningCheckTimeout" stringvalue="5000"/> 4. start NB and check if it helps
Closing as invalid since there in no more input from the user.
sherold, I reopened the issue not because I have more information, but because didn't occur anymore. Anyway, the fact remains. When NB fails detecting Tomcat the whole thing behaves wrong. NB stops deploying applications and Tomcat runs its own way. That's the point, not increasing timeout, but making the engine to work even after Tomcat detection failure. Excuse me if I'm going to far, but I would suggest: 1) Decrease timeout to a sure-will-fail value. 2) See how NB + Tomcat behave. 3) Try to solve it. Since NB requirements say RAM amount of 384Mb suffice, and really doubt this for web application development, I think this issue is quite important. The only workaround I know is restarting the IDE and stopping Tomcat separately. Ufff!
Closing as worksforme, since it is not possible to reproduce this issue, which is likely caused by some local setup.