Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix/minio missing file error message (#19918)

adws7f1f9af11957
diff --git a/docs/guides/dataset/notes_and_faqs.md b/docs/guides/dataset/notes_and_faqs.md
index 4c52eefd5b..f09fcb457c 100644
--- a/docs/guides/dataset/notes_and_faqs.md
+++ b/docs/guides/dataset/notes_and_faqs.md
@@ -22,6 +22,19 @@ After metadata is manually modified, interface filters can usually use the new v
It is recommended to troubleshoot in the order of **document status -> configuration -> Logs**. First confirm whether the document is still parsing or has failed, then check the parsing method, model, and data source configuration, and finally open document log details to view the error cause.
+## Why Does the Log Show "File not found in object storage."?
+
+This message means the source file could not be found in object storage when RAGFlow tried to read it for parsing. The original storage error remains available in the document log.
+
+Possible causes include:
+
+- The disk holding MinIO's data directory ran low on free space, preventing an earlier upload from being written successfully.
+- The file was deleted from object storage after it was uploaded.
+
+The message alone does not establish that disk space is the cause. Check the free space on the machine or volume hosting MinIO's data directory and review MinIO's logs from the time of the upload for write failures. In the default Docker Compose deployment, MinIO stores its data in the `minio_data` volume mounted at `/data`.
+
+After resolving any storage issues, upload the missing file again and retry parsing. Retrying parsing alone does not restore a missing file.
+
## What Should I Do If Retrieval Testing Cannot Retrieve Content?
It is recommended to troubleshoot in the order of **document status -> chunk -> metadata -> retrieval parameters**. First confirm that the document has been parsed successfully and generated usable chunks. Then check whether metadata has filter conditions that exclude related chunks. Finally, check retrieval parameters such as **Similarity threshold**, **Vector similarity weight**, and **Top K**.
diff --git a/internal/storage/minio.go b/internal/storage/minio.go
index c58f08a3c1..141d170b60 100644
--- a/internal/storage/minio.go
+++ b/internal/storage/minio.go
@@ -128,33 +128,34 @@ func (m *MinioStorage) Health(ctx context.Context) bool {
func (m *MinioStorage) Put(ctx context.Context, bucket, fnm string, binary []byte, tenantID ...string) error {
bucket, fnm = m.resolveBucketAndPath(bucket, fnm)
- var err error
+ var lastErr error
for i := 0; i < 3; i++ {
- var exists bool
// Ensure bucket exists
if m.bucket == "" {
- exists, err = m.client.BucketExists(ctx, bucket)
+ exists, err := m.client.BucketExists(ctx, bucket)
if err != nil {
+ lastErr = err
if ctxErr := ctx.Err(); ctxErr != nil {
return ctxErr
}
common.Warn("Failed to check bucket existence", zap.String("bucket", bucket), zap.Error(err))
m.reconnect()
- if err = sleepOrAbort(ctx, time.Second); err != nil {
- return err
+ if sleepErr := sleepOrAbort(ctx, time.Second); sleepErr != nil {
+ return sleepErr
}
continue
}
if !exists {
- if err = m.client.MakeBucket(ctx, bucket, minio.MakeBucketOptions{}); err != nil {
+ if err := m.client.MakeBucket(ctx, bucket, minio.MakeBucketOptions{}); err != nil {
+ lastErr = err
if ctxErr := ctx.Err(); ctxErr != nil {
return ctxErr
}
common.Warn("Failed to create bucket", zap.String("bucket", bucket), zap.Error(err))
m.reconnect()
- if err = sleepOrAbort(ctx, time.Second); err != nil {
- return err
+ if sleepErr := sleepOrAbort(ctx, time.Second); sleepErr != nil {
+ return sleepErr
}
continue
}
@@ -162,15 +163,17 @@ func (m *MinioStorage) Put(ctx context.Context, bucket, fnm string, binary []byt
}
reader := bytes.NewReader(binary)
- _, err = m.client.PutObject(ctx, bucket, fnm, reader, int64(len(binary)), minio.PutObjectOptions{})
+ _, err := m.client.PutObject(ctx, bucket, fnm, reader, int64(len(binary)), minio.PutObjectOptions{})
if err != nil {
+ const warnMessage = "Failed to put object"
+ lastErr = fmt.Errorf("%s: %w", warnMessage, err)
if ctxErr := ctx.Err(); ctxErr != nil {
return ctxErr
}
- common.Warn("Failed to put object", zap.String("bucket", bucket), zap.String("key", fnm), zap.Error(err))
+ common.Warn(warnMessage, zap.String("bucket", bucket), zap.String("key", fnm), zap.Error(err))
m.reconnect()
- if err = sleepOrAbort(ctx, time.Second); err != nil {
- return err
+ if sleepErr := sleepOrAbort(ctx, time.Second); sleepErr != nil {
+ return sleepErr
}
continue
}
@@ -178,7 +181,7 @@ func (m *MinioStorage) Put(ctx context.Context, bucket, fnm string, binary []byt
return nil
}
- return err
+ return lastErr
}
// Get retrieves an object from MinIO
diff --git a/web/src/pages/dataset/process-log-modal.test.tsx b/web/src/pages/dataset/process-log-modal.test.tsx
index c517821836..c93dcc03e9 100644
--- a/web/src/pages/dataset/process-log-modal.test.tsx
+++ b/web/src/pages/dataset/process-log-modal.test.tsx
@@ -14,6 +14,9 @@ import { TooltipProvider } from '@/components/ui/tooltip';
import { formatTime } from '@/utils/date';
const eventTs = '2026-09-18T10:20:30+08:00';
+const MissingFileMessage =
+ 'Parser: storage.Get("source-bucket", "source-file.txt"): The specified key does not exist.';
+const MissingFileHint = 'File not found in object storage.';
type LogEvent = {
id: number;
@@ -24,7 +27,7 @@ type LogEvent = {
message: string;
};
-function renderModal(events: LogEvent[]) {
+function renderModal(events: LogEvent[] = [], details = '') {
return render(
React.createElement(
TooltipProvider,
@@ -35,7 +38,7 @@ function renderModal(events: LogEvent[]) {
title: 'log',
logInfo: {
fileName: 'doc.pdf',
- details: '',
+ details,
events,
},
}),
@@ -87,4 +90,40 @@ describe('ProcessLogModal ingestion events', () => {
).not.toBeInTheDocument();
expect(screen.getByText('Tokenizer Started')).toBeInTheDocument();
});
+
+ it('shows one missing-file hint inside either log source', () => {
+ const messages = [MissingFileMessage, `Task failed: ${MissingFileMessage}`];
+ const eventsView = renderModal(
+ messages.map((message, index) => ({
+ id: index,
+ ts: eventTs,
+ event_type: index === 0 ? 0 : 2,
+ component: 'Parser',
+ phase: 2,
+ message,
+ })),
+ );
+
+ const hint = screen.getByText(MissingFileHint);
+ messages.forEach((message) => {
+ expect(screen.getByText(message)).toBeInTheDocument();
+ });
+ expect(
+ screen.getByText(MissingFileMessage).closest('.overflow-y-auto')
+ ?.lastElementChild,
+ ).toBe(hint);
+
+ eventsView.unmount();
+ const detailsView = renderModal([], MissingFileMessage);
+ expect(screen.getByText(MissingFileHint).parentElement).toHaveClass(
+ 'overflow-y-auto',
+ );
+
+ detailsView.unmount();
+ renderModal(
+ [],
+ 'Parser: storage.Get("source-bucket", "source-file.txt"): Access Denied.',
+ );
+ expect(screen.queryByText(MissingFileHint)).not.toBeInTheDocument();
+ });
});
diff --git a/web/src/pages/dataset/process-log-modal.tsx b/web/src/pages/dataset/process-log-modal.tsx
index 93216ac140..c85ab46353 100644
--- a/web/src/pages/dataset/process-log-modal.tsx
+++ b/web/src/pages/dataset/process-log-modal.tsx
@@ -45,6 +45,9 @@ interface ProcessLogModalProps {
translateKey?: string;
}
+const MissingStorageFilePattern =
+ /storage\.Get\("(?:[^"\\]|\\.)*",\s*"(?:[^"\\]|\\.)*"\):\s*The specified key does not exist\./;
+
const InfoItem: React.FC<{
overflowTip?: boolean;
label: string;
@@ -105,9 +108,19 @@ const ProcessLogModal: React.FC<ProcessLogModalProps> = ({
const logInfo = useMemo(() => {
return initData;
}, [initData]);
+ const hasMissingStorageFile =
+ MissingStorageFilePattern.test(logInfo.details) ||
+ logInfo.events?.some((event) =>
+ MissingStorageFilePattern.test(event.message),
+ );
const eventListRef = useRef<HTMLDivElement>(null);
const prependHeightRef = useRef<number | null>(null);
const eventCount = logInfo.events?.length ?? 0;
+ const missingStorageFileHint = hasMissingStorageFile && (
+ <div className="text-state-error font-medium">
+ File not found in object storage.
+ </div>
+ );
useEffect(() => {
const list = eventListRef.current;
const previousHeight = prependHeightRef.current;
@@ -190,6 +203,7 @@ const ProcessLogModal: React.FC<ProcessLogModalProps> = ({
</div>
);
})}
+ {eventCount > 0 && missingStorageFileHint}
</div>
}
/>
@@ -204,6 +218,7 @@ const ProcessLogModal: React.FC<ProcessLogModalProps> = ({
value={
<div className="w-full whitespace-pre-line text-wrap bg-bg-card rounded-lg h-fit max-h-[350px] overflow-y-auto scrollbar-auto p-2.5">
{replaceText(logInfo.details)}
+ {eventCount === 0 && missingStorageFileHint}
</div>
}
/>