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

Migration 1.x to 2.0.x fails on Windows : couldn't open sink #21534

Closed
PeggyFree opened this issue May 23, 2021 · 7 comments · Fixed by #21540
Closed

Migration 1.x to 2.0.x fails on Windows : couldn't open sink #21534

PeggyFree opened this issue May 23, 2021 · 7 comments · Fixed by #21540
Assignees
Labels
area/cli area/2.x OSS 2.0 related issues and PRs kind/bug

Comments

@PeggyFree
Copy link

Windows 7 with powershell 7
Migrating from influxdb 1.7.6 to 2.0.6 using command .\influxd.exe upgrade
Working directory is "C:\influxdb"

-> An error occurs : couldn't open sink "C:\Users\MY_CURRENT_USER\upgrade.log": no sink found for scheme "c"

I googled and found that this may need some tweaking in the migration code to make the sink compatible with Windows : uber-go/zap#621

Did someone manage to uprade under windows?

@danxmoran
Copy link
Contributor

@PeggyFree I think I have a fix (absolute path on Windows worked for me with my changes), if you have a free minute would you mind checking too? You can download a build from my branch out of the CircleCI artifact repository: https://191768-13124802-gh.circle-artifacts.com/0/artifacts/influxdb2-client-nightly-windows-amd64.zip

@PeggyFree
Copy link
Author

@danxmoran thank you for your help. Unfortunately your nightly build didn't solve the problem. Same error message.
Your zip file only contains influx.exe , while I'm calling ".\influxd.exe upgrade", maybe it is the cause?

@danxmoran
Copy link
Contributor

@PeggyFree sorry about that, you're right I pasted the wrong link. Try this one: https://191768-13124802-gh.circle-artifacts.com/0/artifacts/influxdb2-nightly-windows-amd64.zip

@PeggyFree
Copy link
Author

PeggyFree commented May 25, 2021

Thank you for your patience @danxmoran . The upgrade process now fails the step after :

←[33mWelcome to InfluxDB 2.0!←[0m
←[36mPlease type your primary username←[0m: MyUser

←[36mPlease type your password←[0m:

←[36mPlease type your password again←[0m:

←[31mPasswords do not match.
←[0m←[36mPlease type your password←[0m:

The script asks for a user : ok
The script asks for a password : ok
The script asks for the password confirmation : unfortunately it immediatly writes "Passwords do not match." before I can type anything and it can loop forever like that.

@danxmoran
Copy link
Contributor

danxmoran commented May 25, 2021

Yes, that's #21838. Our escape sequences need some fixing up...

As a work-around, you can pass the password (and other parameters from that dialog) to influxd upgrade as CLI arguments. You'll also need to pass -f, because the confirmation prompt is broken too 🤦

@PeggyFree
Copy link
Author

I'm sorry to bother you again @danxmoran , It now stops one second later. All seems to be linked...

PS C:\influxdb> .\influxd.exe upgrade --config-file influxdb.conf --username 'influx2' --password 'password' -f {"level":"info","ts":1622010453.9718282,"caller":"upgrade/upgrade.go:378","msg":"Starting InfluxDB 1.x upgrade"} {"level":"info","ts":1622010453.9728045,"caller":"upgrade/upgrade.go:381","msg":"Upgrading config file","file":"influxdb.conf"} {"level":"info","ts":1622010453.9737813,"caller":"upgrade/upgrade.go:385","msg":"Config file upgraded.","1.x config":"influxdb.conf","2.x config":"C:\\Users\\co \\.influxdbv2\\config.toml"} {"level":"info","ts":1622010453.974758,"caller":"upgrade/upgrade.go:395","msg":"Upgrade source paths","meta":"/influxdb/donnees/meta","data":"/influxdb/donnees/ data"} {"level":"info","ts":1622010453.9757342,"caller":"upgrade/upgrade.go:396","msg":"Upgrade target paths","bolt":"C:\\Users\\co\\.influxdbv2\\influxd.bolt","engine ":"C:\\Users\\co\\.influxdbv2\\engine"} {"level":"info","ts":1622010453.983547,"caller":"bolt/bbolt.go:84","msg":"Resources opened","service":"bolt","path":"C:\\Users\\co\\.influxdbv2\\influxd.bolt"} {"level":"info","ts":1622010453.9864767,"caller":"migration/migration.go:154","msg":"Bringing up metadata migrations","service":"migrations","migration_count":1 5} Error: onboarding error: onboard failed, missing value See 'influxd -h' for help

Looks like my parameters still need to be tuned to login for the first time on influxdbV2, I see this ticket :
#15761

@danxmoran
Copy link
Contributor

Based on your example it looks like you're missing the --bucket and --org flags (and --retention if you want to set a retention policy on the auto-created bucket). You'd normally be asked to input those interactively when missing, but that step is skipped when you pass -f. An unfortunate side-effect of the work-around...

The error message you hit is very unhelpful, I'll open a separate issue to track improving it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli area/2.x OSS 2.0 related issues and PRs kind/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants