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.

Bug 196874 - not able to see glassfish logs after the log file is rotated
Summary: not able to see glassfish logs after the log file is rotated
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: PC All
: P3 normal with 1 vote (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-19 13:41 UTC by pradyutb
Modified: 2011-10-26 20:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
a jsp file containing a for loop to output large logs (522 bytes, application/octet-stream)
2011-03-26 10:58 UTC, pradyutb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pradyutb 2011-03-19 13:41:04 UTC
the ide shows glassfish server logs...
but stops after the server log file gets rotated
no new lines are displayed of the new file...
have to restart the ide...

also there should be a option of reading old server log files where the user can specify if to read the older server log files or not

I have been seeing this issue for the last 5 releases...

http://forums.netbeans.org/ptopic24057.html

are you guys not interested in glassfish???
Comment 1 Vince Kraemer 2011-03-19 14:39:16 UTC
I will take a look at this.  Reclassify to better product/subcomponent.
Comment 2 Vince Kraemer 2011-03-19 14:51:06 UTC
(In reply to comment #0)
> [snip]
> 
> also there should be a option of reading old server log files where the user
> can specify if to read the older server log files or not

I usually find the older logs in the Favorites explorer and open them by double-clicking. The editor can also open these static files quickly.

> 
> I have been seeing this issue for the last 5 releases...
> 
> http://forums.netbeans.org/ptopic24057.html
> 
> are you guys not interested in glassfish???

This issue looks like it was reported about 6:41 am PDT on Saturday and I have started to look at it at 7:39 am PDT the same day.  Interested in glassfish -- guess so.
Comment 3 pradyutb 2011-03-19 16:01:38 UTC
Hope to get the resolution soon...
Comment 4 Vince Kraemer 2011-03-22 17:31:41 UTC
A fix for this may be a bit tricky and late to the party for inclusion in NB 7.0
Comment 5 Quality Engineering 2011-03-24 09:48:42 UTC
Integrated into 'main-golden', will be available in build *201103240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2a2cab9656c6
User: vince kraemer <vkraemer@netbeans.org>
Log: #196874 : follow log rotations when the log viewer is started from the View Server Log menu item
Comment 6 Vince Kraemer 2011-03-24 14:06:07 UTC
please verify whether this is resolved in the dev build... reopen with more info if it is not.
Comment 7 pradyutb 2011-03-25 03:26:13 UTC
will check it out.. sorry but just give me some time... around 24 hrs...

and please see to the option of specifying the amount of older log data to be loaded...

i have never done this before so i guess i have to download the java ee rebuild (157mb) 

or can i download any smaller update and update my current netbeans??

and i have to go about generating chunks of log data for testing...
that i can do... should not be a problem... i guess...

thanks

Pradyut
Comment 8 Vince Kraemer 2011-03-25 04:57:34 UTC
Take the time that you need.  This issue is not critical enough to get considered as a stopper for 7.0.

A timely verification will let me nominate it as a fix for an early patch/update release to 7.0, though.

What to download.... I would recommend going with the Java EE bundle of the latest nightly build... follow the link in comment 5 (http://netbeans.org/bugzilla/show_bug.cgi?id=196874#c5) of this issue to get to the and choose latest...

You can alter how quickly the log is rotated by changing the size limit of the log file....

Start the server. 
open the admin web app... http://localhost:4848
Select Configurations->server-config->Logging Settings from the navigation tree on the left hand side of the screen.  
Edit the value of 'File Rotation Limit' to be a value that is 1000's large, not 1000000000's large and restart your server.
Use the admin cli to stop and start your server a few times while the log view window is open in the IDE.
Comment 9 pradyutb 2011-03-25 19:58:55 UTC
yup its working fine... 
but the log file i was having(1.9M) took around 20secs to open in my triple core 2.1GHZ machine...
i can understand the ide is removing the timestamps before each line... no problems...

although its working fine 
but after i generated around 4-5 log files using the code(in a jsp file)....

for (int i=0; i<10000; i++) 
{
   System.out.println("cool testing");
}

when i removed the above code
it failed to show further logs 

again without restarting the ide or the server i re-inserted the code

for (int i=0; i<10000; i++) 
{
   System.out.println("another testing");
}

and it flushed all the logs...

i guess the issue has to be reopened for further evaluations...
Comment 10 pradyutb 2011-03-25 20:07:22 UTC
yup after removing the loop i could not see further changes in the log...

i think the problem persists....
Comment 11 Vince Kraemer 2011-03-25 20:10:16 UTC
I guess I do not understand what you did for your test....

Please explain your test process, step-by-step, so I can attempt to replicate
your results.
Comment 12 pradyutb 2011-03-26 03:09:58 UTC
this is what i tested:-

1. wrote this code in a jsp:-

	for (int i=0; i<10000; i++) 
	   System.out.println("cool testing");
	

2. called the jsp from the browser

3. refreshed the page 4-5 times

4. saw the logs ok in the ide output as this generated 4-5 log files.

5. removed the loop in the jsp and changed "cool testing" to "another testing"

      System.out.println("another testing");

6. called/refreshed the jsp in a browser again

7. could not see the log with "another testing" in the ide output.

hope now its clear...
Comment 13 Vince Kraemer 2011-03-26 06:54:15 UTC
please attach the jsp file to this issue.
Comment 14 pradyutb 2011-03-26 10:58:43 UTC
Created attachment 107294 [details]
a jsp file containing a for loop to output large logs

please see the attached jsp file...

comment the loop as if required...
Comment 15 johanvos 2011-10-21 07:04:34 UTC
I filed a similar issue in the Glassfish JIRA:

http://java.net/jira/browse/GLASSFISH-17428
Comment 16 Vince Kraemer 2011-10-26 20:06:20 UTC
it looks like the log view issue is related to the server issue.

The plugin reads the data from the process or the log file.... if the server stops writing the log file... NB cannot create data to replace it.