zilliztech / milvus-backup

Backup and restore tool for Milvus
Apache License 2.0
111 stars 38 forks source link

[Bug]: milvus-backup 备份失败 #361

Closed 4-Struggle closed 1 week ago

4-Struggle commented 2 weeks ago

Current Behavior

sanjin@SanjindeMacBook-Pro Desktop % ./milvus-backup create -n my_back

Expected Behavior

I carried out the operation according to the corresponding milvus official website, downloaded the corresponding buckup to the corresponding directory, and started the buckup for backup. All the configuration files I used here were default configuration files

Steps To Reproduce

sanjin@SanjindeMacBook-Pro Desktop % ./milvus-backup create -n my_back
config:backup.yaml
[2024/06/13 20:29:42.741 +08:00] [INFO] [logutil/logutil.go:165] ["Log directory"] [configDir=]
[2024/06/13 20:29:42.742 +08:00] [INFO] [logutil/logutil.go:166] ["Set log file to "] [path=logs/backup.log]
[2024/06/13 20:29:42.753 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:29:42.955 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:29:43.358 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:29:44.160 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:29:45.762 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:29:48.767 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:29:51.770 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:29:54.772 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:29:57.775 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:00.778 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:03.781 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:06.784 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:09.786 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:12.788 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:15.790 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:18.792 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:21.794 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:24.797 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:27.801 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:30.804 +08:00] [WARN] [storage/minio_chunk_manager.go:85] ["failed to check blob bucket exist"] [bucket=a-bucket] [error="Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused"]
[2024/06/13 20:30:33.805 +08:00] [ERROR] [core/backup_context.go:119] ["failed to initial storage client"] [error="All attempts results:\nattempt #1:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\nattempt #2:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\nattempt #3:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\nattempt #4:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\nattempt #5:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\nattempt #6:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\nattempt #7:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\nattempt #8:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\nattempt #9:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\nattempt #10:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\nattempt #11:Get \"http://localhost:9000/a-bucket/?location=\": dial tcp [::1]:9000: connect: connection refused\n"] [stack="github.com/zilliztech/milvus-backup/core.(*BackupContext).Start\n\t/home/runner/work/milvus-backup/milvus-backup/core/backup_context.go:119\ngithub.com/zilliztech/milvus-backup/core.NewServer\n\t/home/runner/work/milvus-backup/milvus-backup/core/backup_server.go:42\ngithub.com/zilliztech/milvus-backup/cmd.glob..func7\n\t/home/runner/work/milvus-backup/milvus-backup/cmd/server.go:27\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918\ngithub.com/zilliztech/milvus-backup/cmd.Execute\n\t/home/runner/work/milvus-backup/milvus-backup/cmd/root.go:24\nmain.main\n\t/home/runner/work/milvus-backup/milvus-backup/main.go:17\nruntime.main\n\t/opt/hostedtoolcache/go/1.18.10/x64/src/runtime/proc.go:250"]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x104eca5b0]

goroutine 1 [running]:
github.com/zilliztech/milvus-backup/core.(*Server).registerHTTPServer(0x0)
    /home/runner/work/milvus-backup/milvus-backup/core/backup_server.go:64 +0x20
github.com/zilliztech/milvus-backup/core.(*Server).Init(...)
    /home/runner/work/milvus-backup/milvus-backup/core/backup_server.go:53
github.com/zilliztech/milvus-backup/cmd.glob..func7(0x1060f0280?, {0x104ecfd0c?, 0x0?, 0x0?})
    /home/runner/work/milvus-backup/milvus-backup/cmd/server.go:31 +0x1a8
github.com/spf13/cobra.(*Command).execute(0x1060f0280, {0x10612f308, 0x0, 0x0})
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 +0x4b8
github.com/spf13/cobra.(*Command).ExecuteC(0x1060f0000)
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x354
github.com/spf13/cobra.(*Command).Execute(...)
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
github.com/zilliztech/milvus-backup/cmd.Execute()
    /home/runner/work/milvus-backup/milvus-backup/cmd/root.go:24 +0x74
main.main()
    /home/runner/work/milvus-backup/milvus-backup/main.go:17 +0x20

Environment

milvus:v2.216
backUp:v0.2.1-Darwin
etcd:v3.5.5
minio:RELEASE.2023-03-20T20-16-18Z
Mac:Apple M1 12.3.1

Anything else?

No response

4-Struggle commented 1 week ago

My solution was to open docker's container ports directly

wayblink commented 1 week ago

yes, it can't connect to minio. Probably because the port is not exposed in docker config

4-Struggle commented 1 week ago

The corresponding port is released and the corresponding permission is raised