--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either than the input has been truncated or that an embedded message misreported its own length.
Class=class com.google.protobuf.InvalidProtocolBufferException Error=While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either than the input has been truncated or that an embedded message misreported its own length.
com.google.protobuf.InvalidProtocolBufferException : 70 com.google.protobuf.CodedInputStream : 1082 com.google.protobuf.CodedInputStream : 1068 com.google.protobuf.CodedInputStream : 1203 com.google.protobuf.CodedInputStream : 517 net.sf.RecordEditor.ProtoBuf.JRecord.IO.ProtoDelimitedByteReader : 41 net.sf.JRecord.IO.LineReaderWrapper : 69 net.sf.RecordEditor.re.file.FileView : 566 net.sf.RecordEditor.re.file.FileView : 496 net.sf.RecordEditor.edit.open.StartEditor : 51 net.sf.RecordEditor.edit.open.StartEditorBackGround : 29 net.sf.RecordEditor.edit.open.StartEditorBackGround : 8 javax.swing.SwingWorker$1 : 296 java.util.concurrent.FutureTask : 262 javax.swing.SwingWorker : 335 java.util.concurrent.ThreadPoolExecutor : 1145 java.util.concurrent.ThreadPoolExecutor$Worker : 615 java.lang.Thread : 745
Thanks Mike;I tried to open a small Stardog access.log (attached) with protobufeditor (http://sourceforge.net/projects/protobufeditor/) using log.proto definition I get the following Exception:
While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either than the input has been truncated or that an embedded message misreported its own length.Class=class com.google.protobuf.InvalidProtocolBufferException Error=While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either than the input has been truncated or that an embedded message misreported its own length.com.google.protobuf.InvalidProtocolBufferException : 70com.google.protobuf.CodedInputStream : 1082com.google.protobuf.CodedInputStream : 1068com.google.protobuf.CodedInputStream : 1203com.google.protobuf.CodedInputStream : 517net.sf.RecordEditor.ProtoBuf.JRecord.IO.ProtoDelimitedByteReader : 41net.sf.JRecord.IO.LineReaderWrapper : 69net.sf.RecordEditor.re.file.FileView : 566net.sf.RecordEditor.re.file.FileView : 496net.sf.RecordEditor.edit.open.StartEditor : 51net.sf.RecordEditor.edit.open.StartEditorBackGround : 29net.sf.RecordEditor.edit.open.StartEditorBackGround : 8javax.swing.SwingWorker$1 : 296java.util.concurrent.FutureTask : 262javax.swing.SwingWorker : 335java.util.concurrent.ThreadPoolExecutor : 1145java.util.concurrent.ThreadPoolExecutor$Worker : 615java.lang.Thread : 745
The log file was created entirely during a clean server start/stop cycle so I am surprised a truncated message is reported.
I tried both binary and text formats with the same result, also no joy with logs produced in audit logging mode.
Am I doing something wrong?
On Friday, 8 May 2015 15:19:40 UTC+10, Conrad Leonard wrote:Hi;I'm looking to read the audit log files produced by the server; I see they are in protobuf format - is there a .proto definition file available?cheers,Conrad.
--
Hi Mike;I was successful using the reader classes in com.complexible.stardog.logging.protobuf to read both text & binary logs produced by our server instance, so the logging itself seems to be working. I don't mind doing it this way; I have no attachment to Protobufeditor although I may try also the wireshark protobuf editor for interest.A couple of questions remain for me though:1. Is it expected that the text logs have non-text bytes in them? Tailing text log shows there is clearly non-character stuff in there. If that is expected, what is the difference really between the binary & text logging format?
2. Does the 4-byte marker only apply to binary logging format? I was also able to read even the log I attached earlier, using ProtobufTextLogReader, despite as you say the first 4 bytes being not sensible. The log was produced by:i. stardog-admin server stopii. mv $STARDOG_HOME/access.log /tmpiii. stardog-admin server startiv. (some queries)v. stardog-admin server stopvi. use the resulting $STARDOG_HOME/access.log
On Mon, May 11, 2015 at 10:17 PM, Conrad Leonard <conrad....@hotmail.com> wrote:Hi Mike;I was successful using the reader classes in com.complexible.stardog.logging.protobuf to read both text & binary logs produced by our server instance, so the logging itself seems to be working. I don't mind doing it this way; I have no attachment to Protobufeditor although I may try also the wireshark protobuf editor for interest.A couple of questions remain for me though:1. Is it expected that the text logs have non-text bytes in them? Tailing text log shows there is clearly non-character stuff in there. If that is expected, what is the difference really between the binary & text logging format?Yeah, it's not impossible. The text logs just use protobuf's text format, which isn't plain text. Once protobuf 3 is final, we'll migrate to that, and afaik, they'll have JSON based writers, which we'll probably adopt. Mostly the text logs are good for debugging. In production, I'd imagine you'd use the binary format.
2. Does the 4-byte marker only apply to binary logging format? I was also able to read even the log I attached earlier, using ProtobufTextLogReader, despite as you say the first 4 bytes being not sensible. The log was produced by:i. stardog-admin server stopii. mv $STARDOG_HOME/access.log /tmpiii. stardog-admin server startiv. (some queries)v. stardog-admin server stopvi. use the resulting $STARDOG_HOME/access.logDid you just strip the first four bytes?
groovy:000> p = new ProtobufTextLogReader()===> com.complexible.stardog.logging.protobuf.ProtobufTextLogReader@30268da6groovy:000> instr = new FileInputStream(new File('access.log'))===> java.io.FileInputStream@61a7c7e7groovy:000> rdr = p.read(instr)===> com.complexible.stardog.logging.protobuf.ProtobufTextLogReader$1@e1b054cgroovy:000> println rdr.next()KernelEvent[type=Authentication, user=grafli-rw, db=null, value=null]
groovy:000> instr = new FileInputStream(new File('access.log'))===> java.io.FileInputStream@1e68d7agroovy:000> buffer = new byte[4]===> [0, 0, 0, 0]groovy:000> instr.read(buffer)===> 4groovy:000> buffer===> [2, 32, 118, 101]