ronivay / XenOrchestraInstallerUpdater

Xen Orchestra install/update script
GNU General Public License v3.0
1.16k stars 189 forks source link

username and password recovery #145

Closed anndix closed 1 year ago

anndix commented 1 year ago

OS Version: Debian 11 Node.js version: v16.16.0 Yarn version: 1.22.19

Issue It seems I was testing the instance, and after building and configuring the user and its respective password forgot about the same. Now while searching the issues I came across #106 using which tried to recover / create new user. However it keeps giving me errors.

/opt/xo/xo-server/dist/recover-account-cli.mjs xxxxxxxxxxx Password (leave empty for random): ************************* ✖ The client is closed Error: The client is closed at Commander._RedisClient_sendCommand (/opt/xo/xo-builds/xen-orchestra-202208140252/node_modules/@redis/client/dist/lib/client/index.js:409:31) at Commander.commandsExecutor (/opt/xo/xo-builds/xen-orchestra-202208140252/node_modules/@redis/client/dist/lib/client/index.js:170:154) at Commander.BaseClass.<computed> [as sInter] (/opt/xo/xo-builds/xen-orchestra-202208140252/node_modules/@redis/client/dist/lib/commander.js:8:29) at Users._get (file:///opt/xo/xo-builds/xen-orchestra-202208140252/packages/xo-server/dist/collection/redis.mjs:182:18) at Users.get (file:///opt/xo/xo-builds/xen-orchestra-202208140252/packages/xo-server/dist/collection.mjs:40:17) at Users.get (file:///opt/xo/xo-builds/xen-orchestra-202208140252/packages/xo-server/dist/models/user.mjs:42:25) at Users._first (file:///opt/xo/xo-builds/xen-orchestra-202208140252/packages/xo-server/dist/collection.mjs:107:31) at Users.first (file:///opt/xo/xo-builds/xen-orchestra-202208140252/packages/xo-server/dist/collection.mjs:30:23) at default.getUserByName (file:///opt/xo/xo-builds/xen-orchestra-202208140252/packages/xo-server/dist/xo-mixins/subjects.mjs:177:36) at file:///opt/xo/xo-builds/xen-orchestra-202208140252/packages/xo-server/dist/recover-account-cli.mjs:33:25

I even tried to use a random password, and random new user, error remains constant.

Any help would be appreciated.

Thanks

ronivay commented 1 year ago

Hi,

There seems to have been a fix to this password reset script and it's redis connection 3 days ago (https://github.com/vatesfr/xen-orchestra/commit/8c14906a609354ba621f9dd85f974a73abd71258). If your installation is older than this, run update with xo-install.sh first and then try again. If you already did that, then it's something else.

anndix commented 1 year ago

Got it. Trying it now. Will post update shortly.

` [info] Fetching Xen Orchestra source code

[info] Creating install directory: /opt/xo/xo-builds/xen-orchestra-202209052309

[info] Updating Xen Orchestra from 'b89e77a6a' to 'e69ae7b0d' `

Thanks for being here and replying so fast :)

anndix commented 1 year ago

Worked perfectly well. Have the user created, and can login.

Few queries:

  1. I created a new user, can i remove the old one ?
  2. When i do a git pull origin master it shows me repo is up to date, however when you asked me to update, I did and it installed a new version. How to know repo is updated with new code ? Objective is to keep my UI and supporting infra on current versions.

Thanks again.

ronivay commented 1 year ago

Great.

  1. Yeah you can.
  2. You did git pull inside XenOrchestraInstallerUpdater directory, right? Meaning only that this install script was up to date (it also updates itself automatically so no need to worry about that). Actual Xen Orchestra sources are pulled to install directory in /opt/xo and update with the script will make a new installation if there's changes in the Xen Orchestra master branch. There usually is as Xen Orchestra is actively developed and often updates multiple times a day. Just run update with the script periodically to stay up to date.
anndix commented 1 year ago

Awesome, thank you so much. Appreciate the help.