psi-probe / psi-probe

Advanced manager and monitor for Apache Tomcat, forked from Lambda Probe
GNU General Public License v2.0
1.31k stars 387 forks source link

Can't follow multiple logs in separate tabs/windows #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open the Logs tab.
2. Clicked on one of the application logs.
3. I had an older version of Probe (2.0.1) running on the same server, but I'm 
not sure if/how that contributed.

What is the expected result?
No stack trace.

What happens instead?
I'm having trouble reproducing it, but I briefly saw a stack trace in place of 
the log output.  This was in the "localhost" log:

java.lang.IndexOutOfBoundsException: Index: 251, Size: 0
    at java.util.ArrayList.add(ArrayList.java:367)
    at com.googlecode.psiprobe.controllers.logs.FollowController.handleRequestInternal(FollowController.java:86)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

What version of Probe are you using?  In what environment (browser, server,
JVM, OS)?
2.2-SNAPSHOT, Tomcat 6.0.20, Sun JVM, Windows Server 2008 R2

Please provide any additional information below.
This may be related to issue 91.

Original issue reported on code.google.com by MALfunct...@gmail.com on 6 Oct 2010 at 10:17

GoogleCodeExporter commented 9 years ago
Probe keeps track of the currently followed file with a Session attribute.  If 
you open multiple tabs which follow two different logs, this can cause a race 
condition.  It also means that the contents of each tab will always be the 
contents of the most recently opened log.

This is separate from issue 91, so I'm not adding any dependency.  It also 
means this has been a problem for a while.

Old summary: Exception when displaying log file

Original comment by MALfunct...@gmail.com on 6 Oct 2010 at 10:37

GoogleCodeExporter commented 9 years ago
Targeting 2.1.1 patch.

Original comment by MALfunct...@gmail.com on 22 Oct 2010 at 10:10

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r326.

- Ensuring consistent references to "followed_file" session attribute.

Original comment by MALfunct...@gmail.com on 22 Oct 2010 at 10:13

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r327.

Removing reliance on HTTP session for followed file info AJAX.

Original comment by MALfunct...@gmail.com on 25 Oct 2010 at 3:25

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r328.

- Removing reliance on HTTP session for followed file setup, clear, and AJAX.
- Removed ClearBufferController since the buffer is all handled client-side.
- Changed file line storage from ArrayList to LinkedList.

Original comment by MALfunct...@gmail.com on 25 Oct 2010 at 9:52

GoogleCodeExporter commented 9 years ago
Tested opening two log files in separate tabs, tailing, and clearing the 
buffer.  All work as expected.

Original comment by MALfunct...@gmail.com on 25 Oct 2010 at 9:53

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r329.

- Fixing implementations of initial and max lines settings since buffer is now 
client-side.
- Fixing issue where log content could be displayed incorrectly if log changed 
between the info and content AJAX requests.
- Fixing potential array index out-of-bounds exception when detecting log size 
changes.

Original comment by MALfunct...@gmail.com on 26 Oct 2010 at 4:14

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r330.

Code cleanup.  Fixing indentation and scope.

Original comment by MALfunct...@gmail.com on 26 Oct 2010 at 4:31

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r344.

Merging trunk:326-330 into branches/2.1.

Original comment by MALfunct...@gmail.com on 5 Dec 2010 at 12:24

GoogleCodeExporter commented 9 years ago
2.1.1 released.

Original comment by MALfunct...@gmail.com on 5 Dec 2010 at 2:39