Accessing the OrientDB Console

What is the OrientDB Console

Nexus 3 uses several OrientDB databases. In very specific circumstances, these databases can be manipulated as advised by Sonatype support.

This article describes how to open a special command-line interface for connecting to and working with the databases used by Nexus. This interface is known as the OrientDB Console.

Caution: Using the console incorrectly can cause irreparable harm to the databases.

Launching the OrientDB Console on Nexus 3.2.1 and Newer

Nexus 3.2.1+ includes a single jar executable which can launch the OrientDB console.

  1. As the operating system user account that typically owns the Nexus Repository Manager process, start a terminal session on the host where Nexus is installed.

  2. Change directories to your application directory.

  3. Launch the console using the same version of Java executable that Nexus is using :

    Unix

    java -jar ./lib/support/nexus-orient-console.jar

    Windows

    java -jar lib\support\nexus-orient-console.jar

    Mac

    .install4j/jre.bundle/Contents/Home/jre/bin/java -jar ./lib/support/nexus-orient-console.jar

    You should be presented with a command-line interface such as this, ready to accept your commands:

    OrientDB console v.2.2.16 www.orientdb.com
    Type 'help' to display all the supported commands.
    orientdb> 
  4. When you are done your commands, type exit to quit the console.

The nexus-orient-console.jar sets up the correct classpath to successfully launch the console. Launching the jar from another location is not supported.

Accessing the OrientDB Console in a Docker Container

If you normally run Nexus in a Docker container with something like the following:

docker run -d -p 8081:8081 --name nexus -v /some/dir/nexus-data:/nexus-data sonatype/nexus3

Then you should be able to get access to the shell as follows:

docker run -it -p 8081:8081 --name nexus -v /some/dir/nexus-data:/nexus-data sonatype/nexus3 /bin/bash

This is basically just running the same container with the same volume arguments but in interactive mode and telling it to start the shell instead of Nexus. Once in the shell, then follow the regular instructions to run the OrientDB console.

Have more questions? Submit a request

0 Comments

Article is closed for comments.