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

Admin Password? #8236

Open
1 of 7 tasks
propbreakerfpv opened this issue Oct 4, 2024 · 14 comments
Open
1 of 7 tasks

Admin Password? #8236

propbreakerfpv opened this issue Oct 4, 2024 · 14 comments
Labels
question This is a question setup Relates to the InvenTree setup / installation process

Comments

@propbreakerfpv
Copy link

Deployment Method

  • Installer
  • Docker Development
  • Docker Production
  • Bare metal Development
  • Bare metal Production
  • Digital Ocean image
  • Other (please provide a link Steps to Reproduce

Describe the problem*

I'm having trouble deploying to digital ocean. everything seems to be working right except I can't seem to figure out the admin pass. I found the pass when you log into ssh, that doesn't work. I've tried inventree and every other default pass I can think of lol.

all I have done is deploy the droplet and login via ssh.

Steps to Reproduce

deploy droplet,
get pass from ssh,
The username and/or password you specified are not correct.

Relevant log output

No response

@propbreakerfpv propbreakerfpv added question This is a question setup Relates to the InvenTree setup / installation process triage:not-checked Item was not checked by the core team labels Oct 4, 2024
@JosephFanous
Copy link

Same issue for me as well

@SchrodingersGat
Copy link
Member

If you do not have the admin credentials (or no admin account has been created yet) you can create a new superuser account:

https://docs.inventree.org/en/stable/start/intro/?h=superuser#invoke

@SchrodingersGat SchrodingersGat removed the triage:not-checked Item was not checked by the core team label Oct 18, 2024
@Sovda
Copy link

Sovda commented Oct 26, 2024

I am facing the same issue with the DO image. My droplet is a 1vcpu-1gb-25gb config. I've also added 1gb of swap after first logging in.

When logging in via SSH, the admin account credentials do not work. When checking the password at /etc/inventree/admin_password.txt, this matches the reported admin password upon login (still doesn't work).

Inspecting the database, there seem to be no default user accounts. Is there supposed to be or is that what the first login of this admin account is supposed to do?

The invoke package is not installed on the image. After installing it and running invoke --list, I get the message "Can't find any collection named 'tasks'!"

I'm excited to start piloting Inventree. Please help.

@JosephFanous
Copy link

If you do not have the admin credentials (or no admin account has been created yet) you can create a new superuser account:

https://docs.inventree.org/en/stable/start/intro/?h=superuser#invoke

Running the invoke --list or any invoke command returns this:
"Can't find any collection named 'tasks'!"

I'm not sure how to proceed past this blocker, please help!

@SchrodingersGat
Copy link
Member

I have just added some more information about using the "invoke" tool which should address the issues that you guys are facing here:

https://docs.inventree.org/en/latest/start/invoke/

Please let me know if the docs are insufficient here...

@JosephFanous
Copy link

I have just added some more information about using the "invoke" tool which should address the issues that you guys are facing here:

https://docs.inventree.org/en/latest/start/invoke/

Please let me know if the docs are insufficient here...

Still no luck - I am running version 2.2.0 of invoke.
I still get the same "Can't find any collection named 'tasks'!".

@Sovda
Copy link

Sovda commented Oct 28, 2024

I was able to get invoke to list available tasks (need to be in the correct folder, in my case /opt/inventree).

However running invoke superuser errors saying that the python version too old (needs to be >3.9, the VM has 3.8). I tried installing a newer version but looking at the code it seems like it's checking the OS's python version. It seems like it's not recommended to updated this, so I decided to upgrade the OS from 20.04 -> 22.04, which has python 3.10.

After the OS upgrade, I had to reinstall all of the application's dependencies and set up the config file, db user, etc..

I was finally able to successfully run the invoke superuser command, but now I'm facing an nginx 502 error.

@SchrodingersGat
Copy link
Member

I was able to get invoke to list available tasks (need to be in the correct folder, in my case /opt/inventree).

As per the docs here - https://docs.inventree.org/en/latest/start/invoke/#running-in-installer-mode - if you have installed InvenTree using the installer, you have to prefix with inventree run e.g. inventree run invoke superuser

@SchrodingersGat
Copy link
Member

@JosephFanous you have to provide some more information here.

  • Are you running via docker? Installer? Bare metal?
  • What exact issues / error messages are you seeing?

@Sovda
Copy link

Sovda commented Oct 29, 2024

@SchrodingersGat I think you misunderstand, I'm using the Digital Ocean

I was able to get invoke to list available tasks (need to be in the correct folder, in my case /opt/inventree).

As per the docs here - https://docs.inventree.org/en/latest/start/invoke/#running-in-installer-mode - if you have installed InvenTree using the installer, you have to prefix with inventree run e.g. inventree run invoke superuser

I instantiated a new VM with the DO image and tried this. It worked. Thank you for your help.

It is extremely unintuitive because a user of the DO image is not going to think to do any of this, much less know that the image was created with the installer and know where to look in the docs to do this.

If anyone faces this problem in the future, here is what worked for me:

  1. Create an Inventree droplet
  2. SSH into your droplet and `cd /opt/inventree'
  3. Install invoke: pip install -U invoke
  4. Add a superuser to your inventree instance by running: inventree run invoke superuser
  5. Create your admin account with the CLI tool. After that you can login to the application like normal.

@JosephFanous
Copy link

I was able to get invoke to list available tasks (need to be in the correct folder, in my case /opt/inventree).

As per the docs here - https://docs.inventree.org/en/latest/start/invoke/#running-in-installer-mode - if you have installed InvenTree using the installer, you have to prefix with inventree run e.g. inventree run invoke superuser

This worked, thank you - I must have missed this line when going over it o.o

I ran inventree run invoke superuser inside the /opt/inventree folder and it let me create a superuser; logging in worked as well.
Thanks again!

@SchrodingersGat
Copy link
Member

@matmair can we add some documentation to the droplet pointing to the relevant installer documentation?

@matmair
Copy link
Member

matmair commented Oct 30, 2024

@SchrodingersGat there are no docs for the droplet and admin accounts are automatically issued. I do not plan to support ppl that do not use the listed contact adress.

@Sovda
Copy link

Sovda commented Oct 30, 2024

@matmair I'll send you an email that links back to this issue if that's what you need. All of the info is here and it shows that multiple people are having the same problem: the admin account is not being automatically created.

This is a super cool app. Thanks for all the work you've done on it. I'm excited to trial this with my company. Fixing this problem with the DO image will make it so much easier for future users to deploy and use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is a question setup Relates to the InvenTree setup / installation process
Projects
None yet
Development

No branches or pull requests

5 participants