Tencent/WeKnora · error
docreader service not connected
Error message
docreader service not connected
What it means
Sentinel error errNotConnected returned when the GRPCDocumentReader has no established gRPC connection (client is nil under the read lock), or when remoteReader in engine_registry gets no remote reader. It indicates the docparser was never connected or Reconnect was not performed.
Source
Thrown at internal/infrastructure/docparser/grpc_parser.go:108
return p.connect(addr)
}
func (p *GRPCDocumentReader) IsConnected() bool {
p.mu.RLock()
defer p.mu.RUnlock()
return p.conn != nil
}
func (p *GRPCDocumentReader) Close() error {
p.mu.Lock()
defer p.mu.Unlock()
if p.conn != nil {
return p.conn.Close()
}
return nil
}
var errNotConnected = fmt.Errorf("docreader service not connected")
func (p *GRPCDocumentReader) Read(ctx context.Context, req *types.ReadRequest) (*types.ReadResult, error) {
p.mu.RLock()
client := p.client
p.mu.RUnlock()
if client == nil {
return nil, errNotConnected
}
protoReq := &proto.ReadRequest{
FileContent: req.FileContent,
FileName: req.FileName,
FileType: req.FileType,
Url: req.URL,
Title: req.Title,
RequestId: req.RequestID,
Config: &proto.ReadConfig{
ParserEngine: req.ParserEngine,View on GitHub (pinned to 988cbb0330)
Solutions
- Call Reconnect/NewGRPCDocumentReader with a valid address before reading
- Check IsConnected() before dispatching document reads
- Verify remote docparser configuration in the engine registry
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at internal/infrastructure/docparser/grpc_parser.go:108 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/3e53c2360db001db.
Report an issue: GitHub.