Forum: Managing VoltDB

Post: Start a second database

Start a second database
Sabrina
Oct 16, 2015
Hello,

I want to serve more than one database on a host (because of multi tenancy). How is it possible to start a second database?
I created a second deployment.xml file, but when I try to start the second database
-) the first database says "Host 2 failed. Cluster remains operational"
-) and the second database says "Logging ports that are bound for listening, this doesn't include ports bound by outgoing connections which can also cause a failure to bind"

Where is my fault? Is there a possibility to configure the database path?

Thanks.

Best regards,
Sabrina
pzhao
Oct 19, 2015
Sabrina,
This is definitely not your fault. This does take some configuration but a single host multidatabase is possible.
First, you'll need to create 2 folders which will be your working directories for VoltDB, databaseX and databaseY.
Next, lets plan out the custom ports for each instance:
93
Finally, the startup commands,
In databaseX folder:
VOLTDB_OPTS="-Dvolt.rmi.agent.port=7020" voltdb create -H localhost:7010 --internal=7010 --http=7000 --admin=7001 --client=7002 --zookeeper=7030 --deployment=deployment.xml
In databaseY folder:
VOLTDB_OPTS="-Dvolt.rmi.agent.port=8020" voltdb create -H localhost:8020 --internal=8010 --http=8000 --admin=8001 --client=8002 --zookeeper=8030 --deployment=deployment.xml
Let me know how this works out.

You maybe interested in multi-node single machine configuration, please take a look at this forum post, https://forum.voltdb.com/showthread.php?1403-VoltDB-Installation-on-single-machine
Peter Zhao
Sabrina
Oct 23, 2015
Hello Peter,

thank you, you solved my problem. So I must define unique ports for each (of the 8 processes). From where do you know the parameters? I cannot find a documentation. How can I set the log port, jmx port and replication port? When I don't set the log port, both databases log with the same logger - I'm right?

Thanks.
pzhao
Oct 23, 2015
Sabrina,
We hear you and we'll have an internal conversation regarding future improvements. The documentation is located here.
Here's how to configure JMX:
VOLTDB_OPTS="-Dvolt.rmi.agent.port=7020"
Here's how to configure replication port:
--replication=6666
The logging port is only open when VoltDB Enterprise Manager, which is deprecated. This will not be applicable in your case.
Let me know if you need more help.
Peter Zhao
Sabrina
Oct 28, 2015
Hallo Peter,

thanks for your answer. In the documentation I saw, that the JMX Port is also for the VoltDB Enterprise Manager. I'm right? So I additionally would only need to set the replication port.
I will go and make some tests.

Thanks.
pzhao
Oct 28, 2015
Sabrina,
Correct, JMX port is utilized in VoltDB Enterprise Manager. You can set the JMX/replication port but for simplicity and proof of concept, I would not worry too much about it if you're not using these features. Happy testing.
Peter Zhao