-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Database error when adding users from command line #366
Comments
This is still occuring on a regular basis; Eventually, this will have the RDIO instance stop saving configuration changes (users added via command line) to the database, and will require a delete/reinstall of the RDIO scanner with a purge of the database. This is happening with MySQL being used as the backend. |
Suspect it might be due to this being in the config (when exported from console):
|
If I recall correctly, _id: null means a new user when using the cmdline tool, but if it came back from the server with a null value, then that's a problem because it shouldn't. Any strange syslogs about this? I'll look at it in the next few days. |
We figured this out -- this happens after a duplicate access code is attempted to be inserted by the command line tool.
|
I'm starting to get into the creating IDs via the command line too, just using email addresses as the ID and code. And I am getting back but it is still creating the logins. I'm using the default DB that rdio comes with. v6.6.3 |
Let me re-state, the duplicate code is part of the issue; but we are still getting the database error that @renfrewcountyscanner mentioned as well, and that is causing some similar symptoms. |
Here's a clean log entry showing what happens for the database error: Hopefully this makes it clear what is needed? from my script to add the user:
from the RDIO log:
from the exported config after:
|
I don't know if this is directly related, but one thing worth mentioning, is it seems maybe you're trying to use the For instance, running the following two commands does not actually create two users.
What really happens is that the identity tied to existing code of |
Yes -- Agreed here; We are using it because the source of their password has a username, we are just carrying it through to make it easier to find users for troubleshooting/updating passwords, etc. We have recently run into the duplicate password issue and are making some updates to prevent that. In your example, the second command SHOULD generate an error for duplicate key. |
Any chance that the user before the error always has a |
I thought the same, for me +systems does not work, none of my CLI created users have systems assigned to them. |
What I found is that after you try to create someone with a system once, none of your additional users will work until you rebuild. It's like it puts the JSON into the system field with special characters escaped, and then can't properly read it when it attempts to add another user. |
Getting a database error when adding users from command line.
from syslog:
Jul 15 14:30:50 localhost Rdio Scanner[2803]: 2023/07/15 14:30:50 admin.useraddhandler.post: accesses.write: sql: converting argument $7 type: unsupported type []interface {}, a slice of interface
command run:
rdio-scanner -cmd user-add +ident username +url http://10.1.100.79 +code "P@ssword"
Returned:
417 Expectation Failed
The text was updated successfully, but these errors were encountered: