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

Weird exception during opening db by reader #7944

Closed
PhantomYdn opened this issue Dec 17, 2017 · 3 comments
Closed

Weird exception during opening db by reader #7944

PhantomYdn opened this issue Dec 17, 2017 · 3 comments
Assignees
Milestone

Comments

@PhantomYdn
Copy link
Contributor

OrientDB Version: 2.2.30

Java Version: Oracle JDK 8

OS: ubuntu/docker

Do you have ideas why from time to time the following exception might happen?
It was attempt to open db with valid, btw, login/password.

demo         | com.orientechnologies.orient.core.exception.OSecurityAccessException: User 'reader' does not have permission to execute the operation 'Read' against the resource: ResourceGeneric [name=CLASS, legacyName=database.class].ouser
demo         | 	DB name="Orienteer"
demo         | 	at com.orientechnologies.orient.core.metadata.security.OImmutableUser.allow(OImmutableUser.java:53)
demo         | 	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkSecurity(ODatabaseDocumentTx.java:905)
demo         | 	at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchForIndexes(OCommandExecutorSQLSelect.java:2089)
demo         | 	at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchInClasses(OCommandExecutorSQLSelect.java:1019)
demo         | 	at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignTarget(OCommandExecutorSQLResultsetAbstract.java:211)
demo         | 	at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:527)
demo         | 	at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:509)
demo         | 	at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:485)
demo         | 	at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:70)
demo         | 	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3421)
demo         | 	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3339)
demo         | 	at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78)
demo         | 	at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74)
demo         | 	at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:99)
demo         | 	at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
demo         | 	at com.orientechnologies.orient.core.metadata.security.OSecurityShared.getUser(OSecurityShared.java:607)
demo         | 	at com.orientechnologies.orient.core.metadata.security.OSecurityExternal.getUser(OSecurityExternal.java:92)
demo         | 	at com.orientechnologies.orient.core.metadata.security.OSecurityShared.authenticate(OSecurityShared.java:235)
demo         | 	at com.orientechnologies.orient.core.metadata.security.OSecurityExternal.authenticate(OSecurityExternal.java:62)
demo         | 	at com.orientechnologies.orient.core.metadata.security.OSecurityProxy.authenticate(OSecurityProxy.java:107)
demo         | 	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:276)
demo         | 	at com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPooled.internalOpen(OPartitionedDatabasePool.java:450)
demo         | 	at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.openDatabase(OPartitionedDatabasePool.java:314)
demo         | 	at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.acquire(OPartitionedDatabasePool.java:269)
@sboucard
Copy link

I seem to have the same issue with OrientDB 3.0.0 RC1.
Opening the database with a 'reader' user fails when ODatabaseDocumentRemote reads the system level information (the OSequence information in my case).

Storage 'plocal:D:\Data\resources\secollab' is opened under OrientDB distribution : 3.0.0RC1 (build c5d4dee2d069d270f25a585e976a7fc3b21260be, branch develop)com.orientechnologies.orient.core.exception.OSecurityAccessException: User 'reader' does not have permission to execute the operation 'Read' against the resource: ResourceGeneric [name=SYSTEM_CLUSTER, legacyName=database.systemclusters].null
	DB name="secollab"
	DB name="secollab"
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:318)
	at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:275)
	at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:191)
	at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:153)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1693)
	at com.orientechnologies.orient.client.remote.OStorageRemote.lambda$networkOperationRetryTimeout$2(OStorageRemote.java:226)
	at com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:279)
	at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperationRetryTimeout(OStorageRemote.java:214)
	at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperation(OStorageRemote.java:243)
	at com.orientechnologies.orient.client.remote.OStorageRemote.command(OStorageRemote.java:835)
	at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78)
	at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74)
	at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:86)
	at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentAbstract.query(ODatabaseDocumentAbstract.java:322)
	at com.orientechnologies.orient.core.metadata.sequence.OSequenceLibraryImpl.load(OSequenceLibraryImpl.java:52)
	at com.orientechnologies.orient.core.db.document.OSharedContextRemote.load(OSharedContextRemote.java:34)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentRemote.loadMetadata(ODatabaseDocumentRemote.java:240)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentRemote.initAtFirstOpen(ODatabaseDocumentRemote.java:225)
	at com.orientechnologies.orient.core.db.document.ODatabaseDocumentRemote.internalOpen(ODatabaseDocumentRemote.java:193)
	at com.orientechnologies.orient.core.db.OrientDBRemote.open(OrientDBRemote.java:84)
	at com.orientechnologies.orient.core.db.OrientDB.open(OrientDB.java:205)
	at com.orientechnologies.orient.core.db.OrientDB.open(OrientDB.java:190)
	...
	Suppressed: com.orientechnologies.orient.core.exception.OSecurityAccessException: User 'reader' does not have permission to execute the operation 'Read' against the resource: ResourceGeneric [name=SYSTEM_CLUSTER, legacyName=database.systemclusters].null
		DB name="secollab"
			at com.orientechnologies.orient.core.metadata.security.OImmutableUser.allow(OImmutableUser.java:53)
			at com.orientechnologies.orient.core.iterator.OIdentifiableIterator.checkForSystemClusters(OIdentifiableIterator.java:413)
			at com.orientechnologies.orient.core.iterator.ORecordIteratorClass.<init>(ORecordIteratorClass.java:79)
			at com.orientechnologies.orient.core.iterator.ORecordIteratorClass.<init>(ORecordIteratorClass.java:60)
			at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.searchInClasses(OCommandExecutorSQLResultsetAbstract.java:470)
			at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.searchInClasses(OCommandExecutorSQLResultsetAbstract.java:459)
			at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchInClasses(OCommandExecutorSQLSelect.java:993)
			at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignTarget(OCommandExecutorSQLResultsetAbstract.java:198)
			at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:515)
			at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:497)
			at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:473)
			at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:74)
			at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3658)
			at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3595)
			at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78)
			at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74)
			at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:86)
			at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
			at com.orientechnologies.orient.server.OConnectionBinaryExecutor.executeCommand(OConnectionBinaryExecutor.java:583)
			at com.orientechnologies.orient.client.remote.message.OCommandRequest.execute(OCommandRequest.java:103)
			at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sessionRequest(ONetworkProtocolBinary.java:276)
			at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:182)
			at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:82)

@tglman
Copy link
Member

tglman commented Mar 13, 2018

Hi,

This issue was fixed in 2.2.33 and will be fixed in 3.0 final.

Regards

@tglman
Copy link
Member

tglman commented Apr 17, 2018

Hi,

fixed a while ago, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants