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

Is there a way to reset the password for admin/writer/reader? #3514

Closed
popduke opened this issue Feb 2, 2015 · 4 comments
Closed

Is there a way to reset the password for admin/writer/reader? #3514

popduke opened this issue Feb 2, 2015 · 4 comments
Assignees
Labels

Comments

@popduke
Copy link

popduke commented Feb 2, 2015

I cannot login to my database after import it from 1.7 to 2.0.0 then to 2.0.1 via either console or studio. I didn't change the password for them, how come it always prompts me the authentication dialog after importing. Didn't find any clue in the log. can someone help? thanks.

@vitorenesduarte
Copy link
Contributor

Try to log in with root + root_password

@vitorenesduarte
Copy link
Contributor

If you don't know it either, see this file
ODB_HOME/config/orientdb-server-config.xml

@popduke
Copy link
Author

popduke commented Feb 3, 2015

Thank you, login with root works. But I figured the default users were gone, they did appear in studio security tab after import, but still failed to use them, after I created another user, they didn't show up in security tab anymore. I tried to add the admin user back manually, and do the export-import process again, and got following output in console:

Importing indexes ...
- Index 'OUser.name'...{db=JIKE_PI} Exception during index OUser.name creation.
com.orientechnologies.orient.core.index.OIndexException: Error on rebuilding the index for clusters: [ouser]
        at com.orientechnologies.orient.core.index.OIndexAbstract.rebuild(OIndexAbstract.java:410)
        at com.orientechnologies.orient.core.index.OIndexAbstract.create(OIndexAbstract.java:225)
        at com.orientechnologies.orient.core.index.OIndexOneValue.create(OIndexOneValue.java:108)
        at com.orientechnologies.orient.core.index.OIndexOneValue.create(OIndexOneValue.java:45)
        at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:169)
        at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:97)
        at com.orientechnologies.orient.core.index.OIndexManagerProxy.createIndex(OIndexManagerProxy.java:73)
        at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importIndexes(ODatabaseImport.java:1380)
        at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importDatabase(ODatabaseImport.java:427)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.importDatabase(OConsoleDatabaseApp.java:1538)
        at com.orientechnologies.orient.graph.console.OGremlinConsole.importDatabase(OGremlinConsole.java:124)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:381)
        at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:246)
        at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:135)
        at com.orientechnologies.orient.graph.console.OGremlinConsole.main(OGremlinConsole.java:62)
Caused by: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record #5:4: found duplicated key 'admin' in index 'OUser.name' previously assigned to the record #5:0 RID=#5:0
        at com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:75)
        at com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:39)
        at com.orientechnologies.orient.core.index.OIndexAbstract.populateIndex(OIndexAbstract.java:853)
        at com.orientechnologies.orient.core.index.OIndexAbstract.indexCluster(OIndexAbstract.java:920)
        at com.orientechnologies.orient.core.index.OIndexAbstract.rebuild(OIndexAbstract.java:392)
        ... 18 more
Error on database import happened just before line 0, column 90041
com.orientechnologies.orient.core.index.OIndexException: Error on rebuilding the index for clusters: [ouser]
        at com.orientechnologies.orient.core.index.OIndexAbstract.rebuild(OIndexAbstract.java:410)
        at com.orientechnologies.orient.core.index.OIndexAbstract.create(OIndexAbstract.java:225)
        at com.orientechnologies.orient.core.index.OIndexOneValue.create(OIndexOneValue.java:108)
        at com.orientechnologies.orient.core.index.OIndexOneValue.create(OIndexOneValue.java:45)
        at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:169)
        at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:97)
        at com.orientechnologies.orient.core.index.OIndexManagerProxy.createIndex(OIndexManagerProxy.java:73)
        at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importIndexes(ODatabaseImport.java:1380)
        at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importDatabase(ODatabaseImport.java:427)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.importDatabase(OConsoleDatabaseApp.java:1538)
        at com.orientechnologies.orient.graph.console.OGremlinConsole.importDatabase(OGremlinConsole.java:124)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:381)
        at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:246)
        at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:135)
        at com.orientechnologies.orient.graph.console.OGremlinConsole.main(OGremlinConsole.java:62)
Caused by: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record #5:4: found duplicated key 'admin' in index 'OUser.name' previously assigned to the record #5:0 RID=#5:0
        at com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:75)
        at com.orientechnologies.orient.core.index.OIndexUnique.put(OIndexUnique.java:39)
        at com.orientechnologies.orient.core.index.OIndexAbstract.populateIndex(OIndexAbstract.java:853)
        at com.orientechnologies.orient.core.index.OIndexAbstract.indexCluster(OIndexAbstract.java:920)
        at com.orientechnologies.orient.core.index.OIndexAbstract.rebuild(OIndexAbstract.java:392)
        ... 18 more

Error: com.orientechnologies.orient.core.db.tool.ODatabaseExportException: Error on importing database 'JIKE_PI' from file: /opt/orientdb-community-2.0.1/databases/JIKE_PI.json.gz

Error: com.orientechnologies.orient.core.index.OIndexException: Error on rebuilding the index for clusters: [ouser]

Error: com.orientechnologies.orient.core.storage.ORecordDuplicatedException: Cannot index record #5:4: found duplicated key 'admin' in index 'OUser.name' previously assigned to the record #5:0 RID=#5:0

and snapshot in studio
image
image

@vitorenesduarte
Copy link
Contributor

Hi @popduke
Try to import, log with root and

delete from OUser
insert into OUser set name = 'admin', password = 'admin', status = 'ACTIVE', roles = [#4:0]

I didn't export/import, but this worked for me.

@lvca lvca closed this as completed Aug 20, 2015
@lvca lvca added the question label Aug 20, 2015
@lvca lvca self-assigned this Aug 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants