Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log File Parsing Fails When Last Logging Event is an Exception #5

Closed
jujoramos opened this issue Nov 5, 2018 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@jujoramos
Copy link
Owner

Method readLastLine from AbstractLogParser doesn't take into consideration the actual log message format. If the last line of a log file belongs to a stack-trace, the subsequent parsing of the interval covered by the file will fail with java.lang.IllegalArgumentException: Parsing failed, no data available.
As an example, a file ending with the following logging event will always fail:

[warning 2016/12/12 10:00:00.000 BST server <ServerConnection on port 40404 Thread 10308> tid=0x6061] Server connection from [identity(XXXXXXX(XXXX:27260:loner):3:XXXXXX,connection=1; port=60917]: Unexpected IOException: 
java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:209)
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
	at com.gemstone.gemfire.internal.cache.tier.sockets.Message.fetchHeader(Message.java:678)
	at com.gemstone.gemfire.internal.cache.tier.sockets.Message.readHeaderAndPayload(Message.java:702)
	at com.gemstone.gemfire.internal.cache.tier.sockets.Message.read(Message.java:645)
	at com.gemstone.gemfire.internal.cache.tier.sockets.Message.recv(Message.java:1142)
	at com.gemstone.gemfire.internal.cache.tier.sockets.Message.recv(Message.java:1156)
	at com.gemstone.gemfire.internal.cache.tier.sockets.BaseCommand.readRequest(BaseCommand.java:934)
	at com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection.doNormalMsg(ServerConnection.java:753)
	at com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection.doOneMessage(ServerConnection.java:930)
	at com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection.run(ServerConnection.java:1179)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl$1$1.run(AcceptorImpl.java:555)
	at java.lang.Thread.run(Thread.java:745)
@jujoramos jujoramos added the bug Something isn't working label Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant