Start KVLite

Perform the following steps to start a KVLite instance:

To start KVLite in secure mode:

  1. Open a terminal and cd into the kv-24.1.11 directory to start the NoSQL Database server.

    $ cd kv-24.1.11
    $ java -Xmx64m -Xms64m -jar lib/kvstore.jar kvlite
                                 [-storagedirsizegb N]

    The storagedirsizegb is an optional parameter. This parameter can be used to control the size of the storage directory for a new instance. The value of N is in GB and must be >= 1. By default the store created has a size of 10GB and this flag must be used to override that. The size cannot be changed after the instance has been created and use of the flag on an existing instance is ignored.

    Expected Output:

    Generated password for user admin: <password>
    User login file: ./kvroot/security/user.security
    Created new kvlite store with args:
    -root ./kvroot -store kvstore -host localhost -port 5000 
    -storagedirsizegb 15 -secure-config enable

    Where kvstore is the name of the store, localhost is the name of the local host, and kvroot is the directory where Oracle NoSQL Database data is placed. It takes about 10 - 60 seconds before this message is issued, depending on the speed of your system.

    Note that you will not get the command line prompt back until you stop the KVLite.

  2. In a second shell, cd into the kv-24.1.11 directory and ping your KVLite instance to test that it is active. The details of the output will vary but you must see a running store.

    $ cd kv-24.1.11
    $ java -Xmx64m -Xms64m -jar lib/kvstore.jar ping -host localhost -port 5000 -security kvroot/security/user.security

    Expected output:

    Pinging components of store kvstore based upon topology sequence #14
    10 partitions and 1 storage nodes
    Time: 2024-04-05 06:15:34 UTC   Version: 24.1.11
    Shard Status: healthy: 1 writable-degraded: 0 read-only: 0 offline: 0 total: 1
    Admin Status: healthy
    Zone [name=KVLite id=zn1 type=PRIMARY allowArbiters=false masterAffinity=false]   RN Status: online: 1 read-only: 0 offline: 0
    Storage Node [sn1] on phoenix126166: 5000    Zone: [name=KVLite id=zn1 type=PRIMARY allowArbiters=false masterAffinity=false]    Status: RUNNING   Ver: 24.1.11 2024-04-05 01:31:46 UTC  Build id: 477e7f102ab4 Edition: Community    isMasterBalanced: true	serviceStartTime: 2024-04-05 06:13:24 UTC
    	Admin [admin1]		Status: RUNNING,MASTER	serviceStartTime: 2024-04-05 06:13:29 UTC	stateChangeTime: 2024-04-05 06:13:29 UTC	availableStorageSize: 2 GB
    	Rep Node [rg1-rn1]	Status: RUNNING,MASTER sequenceNumber: 322 haPort: 5003 availableStorageSize: 9 GB storageType: HD	serviceStartTime: 2024-04-05 06:13:32 UTC	stateChangeTime: 2024-04-05 06:13:32 UTC
    

    The status indicates that the KVLite is up and running.

To start KVLite in unsecure mode:

  1. Open a terminal and cd into the kv-24.1.11 directory.

    $ cd kv-24.1.11
  2. Execute the kvstore.jar file using the -enable-secure disable flag to disable security and start KVLite in unsecure mode.

    $   java -jar lib/kvstore.jar kvlite 
    [-storagedirsizegb N ] -secure-config disable

    The storagedirsizegb is an optional parameter. This parameter can be used to control the size of the storage directory for a new instance. The value of N is in GB and must be >= 1. By default the store created has a size of 10GB and this flag must be used to override that. The size cannot be changed after the instance has been created and use of the flag on an existing instance is ignored.

  3. In a second shell, cd into the kv-24.1.11 directory and ping your KVLite instance to test that it is active. You must see a running store.

    $ cd kv-24.1.11
    $ java -jar lib/kvstore.jar ping -host localhost -port 5000 

    Expected output:

    Pinging components of store kvstore based upon topology sequence #14
    10 partitions and 1 storage nodes
    Time: 2024-04-05 08:30:00 UTC   Version: 24.1.11
    Shard Status: healthy: 1 writable-degraded: 0 read-only: 0 offline: 0 total: 1
    Admin Status: healthy
    Zone [name=KVLite id=zn1 type=PRIMARY allowArbiters=false masterAffinity=false]   RN Status: online: 1 read-only: 0 offline: 0
    Storage Node [sn1] on phoenix126166: 5000    Zone: [name=KVLite id=zn1 type=PRIMARY allowArbiters=false masterAffinity=false]    Status: RUNNING   Ver: 24.1.11 2024-04-05 01:31:46 UTC  Build id: 477e7f102ab4 Edition: Community    isMasterBalanced: true	serviceStartTime: 2024-04-05 08:29:14 UTC
    	Admin [admin1]		Status: RUNNING,MASTER	serviceStartTime: 2024-04-05 08:29:17 UTC	stateChangeTime: 2024-04-05 08:29:17 UTC	availableStorageSize: 2 GB
    	Rep Node [rg1-rn1]	Status: RUNNING,MASTER sequenceNumber: 51 haPort: 5003 availableStorageSize: 9 GB storageType: HD	serviceStartTime: 2024-04-05 08:29:19 UTC	stateChangeTime: 2024-04-05 08:29:19 UTC
    

    The status indicates that the KVLite is up and running.