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

Sync from atlas to local not working. #10

Open
bradjohnsonkink opened this issue Jul 1, 2019 · 0 comments
Open

Sync from atlas to local not working. #10

bradjohnsonkink opened this issue Jul 1, 2019 · 0 comments

Comments

@bradjohnsonkink
Copy link

I saw in your blog post (https://engineering.checkr.com/mongodb-cluster-migration-with-zero-downtime-f4e294c29bef) that you were syncing local mongo instances to Atlas cloud which was why this tool was created. We are doing the opposite to consolidate all of our mongodb's in house. I've got the tool working locally, but when trying to sync from Atlas -> local I get the nil pointer dereference error seen in issue 1 -

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x4a506f]

goroutine 1 [running]:
panic(0x82b880, 0xc4200120a0)
/usr/local/Cellar/go/1.7.4_1/libexec/src/runtime/panic.go:500 +0x1a1
github.com/checkr/go-sync-mongo/db.(*Connection).SyncOplog(0x0, 0x0, 0xc4200e3b88, 0x1)
/Users/saso/Development/go/src/github.com/checkr/go-sync-mongo/db/db.go:132 +0xaf
github.com/checkr/go-sync-mongo/cmd.glob..func2(0xab1800, 0xc4200d6c00, 0x0, 0x10)
/Users/saso/Development/go/src/github.com/checkr/go-sync-mongo/cmd/sync.go:43 +0x38a
github.com/spf13/cobra.(*Command).execute(0xab1800, 0xc4200d6b00, 0x10, 0x10, 0xab1800, 0xc4200d6b00)
/Users/saso/Development/go/src/github.com/spf13/cobra/command.go:636 +0x443
github.com/spf13/cobra.(*Command).ExecuteC(0xab13c0, 0xc420072058, 0x0, 0xc4200e3f18)
/Users/saso/Development/go/src/github.com/spf13/cobra/command.go:722 +0x367
github.com/spf13/cobra.(*Command).Execute(0xab13c0, 0x0, 0x0)
/Users/saso/Development/go/src/github.com/spf13/cobra/command.go:681 +0x2b
github.com/checkr/go-sync-mongo/cmd.Execute()
/Users/saso/Development/go/src/github.com/checkr/go-sync-mongo/cmd/root.go:46 +0x31
main.main()
/Users/saso/Development/go/src/github.com/checkr/go-sync-mongo/main.go:20 +0x14

I've tried various ssl setting combinations, but ultimately cannot get this going. The readme doesn't indicate anything special about an atlas connection, so I'm curious if this is something that should actually work, or if I'm overlooking something in setting this up. I'm using the following connection string.

./go-sync-mongo-linux-amd64 sync --since 1561737600 --src "mongodb+srv://<atlas mongod>.mongodb.net/test:27017" --src-username <user> --src-password <password> --src-ssl=true --dst "mongodb://<internal mongod>:27017" --dst-username <user> --dst-password <password> --dst-ssl=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant