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

OSecurityAccessException: Invalid authentication info for access to the database #10262

Open
smurskiy opened this issue Jun 27, 2024 · 3 comments
Milestone

Comments

@smurskiy
Copy link

OrientDB Version: 3.2.23

OS: docker image

I use ODatabasePool in Java to connect to OrientDB.

OrientDB orientDB = new OrientDB("remote:localhost:2424", "root", "root", OrientDBConfig.defaultConfig());
OrientDBConfigBuilder poolCfg = OrientDBConfig.builder();
poolCfg.addConfig(OGlobalConfiguration.DB_POOL_MIN, 10);
poolCfg.addConfig(OGlobalConfiguration.DB_POOL_MAX, 50);

ODatabasePool pool = new ODatabasePool(orientDB, "db, "root", "root", poolCfg.build());

Sometimes I get an error while inserting edges and vertices or executing graph operations

com.orientechnologies.orient.core.exception.OSecurityAccessException: Invalid authentication info for access to the database 
com.orientechnologies.orient.core.metadata.security.auth.OTokenAuthInfo@5773aa92 DB name="db" DB name="db"
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleException(OChannelBinaryAsynchClient.java:355)
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient$$Lambda$3836/0x00000000f3085c90.onException(Unknown Source)
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:303)
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:325)
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:209) 
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:167)
com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:2001)
com.orientechnologies.orient.client.remote.OStorageRemote.lambda$networkOperationRetryTimeout$2(OStorageRemote.java:435) 
com.orientechnologies.orient.client.remote.OStorageRemote$$Lambda$3837/0x00000000f3086150.execute(Unknown Source) 
com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:500)
com.orientechnologies.orient.client.remote.OStorageRemote.networkOperationRetryTimeout(OStorageRemote.java:415)
com.orientechnologies.orient.client.remote.OStorageRemote.networkOperationNoRetry(OStorageRemote.java:450)
com.orientechnologies.orient.client.remote.OStorageRemote.execute(OStorageRemote.java:1284)
com.orientechnologies.orient.client.remote.db.document.ODatabaseDocumentRemote.execute(ODatabaseDocumentRemote.java:451)

This error does not reproduce regularly.

Settings in docker-compose:

orientdb:
  image: orientdb:3.2.23
  restart: always
  mem_limit: 2500m
  mem_reservation: 1000m
  environment:
    ORIENTDB_ROOT_PASSWORD: root
    ORIENTDB_OPTS_MEMORY: -Xmx1024m
    JAVA_OPTS_SCRIPT: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
    TZ: ${TIMEZONE:-UTC}
  ports:
    - ${ORIENTDB_HTTP_OUTER_PORT}:2480
    - ${ORIENTDB_OUTER_PORT}:2424
  volumes:
    - orientdb-data:/var/orientdb/databases
  healthcheck:
    test: >
      bash -c "curl http://localhost:2480/listDatabases"
    interval: 10s
    timeout: 2s
    retries: 20
@tglman tglman added this to the 3.2.x milestone Jun 27, 2024
@tglman
Copy link
Member

tglman commented Jun 27, 2024

Hi,

Does this happen if the client is idle for a while ?

@smurskiy
Copy link
Author

No, the client regularly sends requests

@tglman
Copy link
Member

tglman commented Aug 13, 2024

Hi,

Another reason this may happen is if the server is restarted and so reset the token encryption keys, so the client send a token that is not valid anymore, may this be the case ?

Regards

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

2 participants