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

mongodump/monogorestore/monoimport not works for ferretdb #4287

Closed
peintune opened this issue May 17, 2024 · 3 comments
Closed

mongodump/monogorestore/monoimport not works for ferretdb #4287

peintune opened this issue May 17, 2024 · 3 comments
Assignees
Labels
code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI

Comments

@peintune
Copy link

FerretDB version

Starting FerretDB v1.21.0... {"version": "v1.21.0", "commit": "a3fb274d25bac13aea594ec34d603338bc00bfc3", "branch": "unknown", "dirty": true, "package": "docker", "debugBuild": false, "buildEnvironment": {"-buildmode":"exe","-compiler":"gc","CGO_ENABLED":"0","GOAMD64":"v1","GOARCH":"amd64","GOOS":"linux","go.version":"go1.22.1","vcs":"git","vcs.time":"2024-03-20T06:51:32Z"}, "uuid": "9e87c620-5030-4eae-ae5f-72513027d594"}

Backend

PostgreSQL : 14

Environment

  • OS: centos 7.9 x86_64
  • Deployment: Docker using ghcr.io/ferretdb/ferretdb:v1.21.0 image
  • Deployment details: Docker version 26.0.1,

What did you do?

I exported source data from mongodb and stored as *.json。 I was tring to use mongoimport tool import *.json to postgresql through FerretDB , but mongoimport tool give me an error with "Failed: error connecting to db server: EOF", at the same time , FerretDB shows an error。

The import command is :
./tools/mongoimport --mode=upsert --uri="mongodb://polaruser:123456789@172.16.0.183:27017/teambition?authMechanism=PLAIN" --collection=projects /root/offline/teambition/database-bak/database/mongodump-json/teambition/projects.json

What did you expect to see?

use mongoimport/mongorestore tool to restore source data successfully

What did you see instead?

mongoimport log:
[root@iZuf6hcv5xn2rlf0fj1dhdZ offline]# ./tools/mongoimport --mode=upsert --uri="mongodb://polaruser:123456789@172.16.0.183:27017/teambition?authMechanism=PLAIN" --collection=projects /root/offline/teambition/database-bak/database/mongodump-json/teambition/projects.json
2024-05-17T15:20:20.551+0800 Failed: error connecting to db server: EOF
2024-05-17T15:20:20.551+0800 imported 0 documents

FerretDB log:

github.com/FerretDB/FerretDB/internal/clientconn.(*conn).logResponse
/src/internal/clientconn/conn.go:616
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run
/src/internal/clientconn/conn.go:317
github.com/FerretDB/FerretDB/internal/clientconn.acceptLoop.func1
/src/internal/clientconn/listener.go:305
2024-05-17T07:20:20.551Z DPANIC // 172.16.64.1:33464 -> 192.168.16.3:27017 clientconn/conn.go:170 no response to send to client
(err = )
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run.func3
/src/internal/clientconn/conn.go:170
runtime.gopanic
/usr/local/go/src/runtime/panic.go:770
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run
/src/internal/clientconn/conn.go:376
github.com/FerretDB/FerretDB/internal/clientconn.acceptLoop.func1
/src/internal/clientconn/listener.go:305
2024-05-17T07:20:20.551Z WARN listener clientconn/listener.go:310 Connection stopped {"conn": "172.16.64.1:33464 -> 192.168.16.3:27017", "error": "panic"}

@peintune peintune added code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI labels May 17, 2024
@chilagrow
Copy link
Contributor

@peintune thanks for reporting this.

Could you share more log from FerretDB please? I see that there is an error and I would like to see the stacktrace.

@peintune
Copy link
Author

@peintune thanks for reporting this.

Could you share more log from FerretDB please? I see that there is an error and I would like to see the stacktrace.

@chilagrow Thanks for your reply, I have solved this problem by upgrading mongorestore tool to the latested version。

@peintune
Copy link
Author

closed

@AlekSi AlekSi closed this as completed May 27, 2024
@AlekSi AlekSi closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI
Projects
None yet
Development

No branches or pull requests

4 participants