# Opennebula.service won't start, uninitialized sqlite DB

**URL:** <https://forum.opennebula.io/t/opennebula-service-wont-start-uninitialized-sqlite-db/7211>\
**Category:** Installation & Configuration\
**Created:** [May 10, 2019, 11:36am UTC](https://forum.opennebula.io/t/opennebula-service-wont-start-uninitialized-sqlite-db/7211 "2019-05-10T11:36:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pimplek](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@Pimplek](https://forum.opennebula.io/u/Pimplek)\
**Post date:** [May 10, 2019, 11:36am UTC](https://forum.opennebula.io/t/opennebula-service-wont-start-uninitialized-sqlite-db/7211/1 "2019-05-10T11:36:30Z")

</div>

Hi,

I have a 3 node setup with sunstnoe HA. Those three nodes are working fine. I want to add a fourth node to the cluster, but I don’t want sunstone there. That new fourth node would just run the VMs.  
So I installed everything as described [here](http://docs.opennebula.org/5.8/deployment/node_installation/kvm_node_installation.html). From what I see it’s basically just “install packages and add the node on frontend”, but I can’t start the opennebula service once the packages are installed.  
On the frontend nodes I use mysql. I don’t see a reason for using it on the fourth node, so I’d prefer to just use sqlite. When I start the opennebula service on the new node, the service fails with this in the logs:

> ```
> Fri May 10 13:22:47 2019 [Z0][ONE][I]: sqlite has enabled: SQLITE_ENABLE_UPDATE_DELETE_LIMIT
> Fri May 10 13:22:47 2019 [Z0][ONE][I]: Checking database version.
> Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT version FROM local_db_versioning WHERE oid=(SELECT MAX(oid) FROM local_db_versioning), error: no such table: local_db_versioning
> Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT version FROM db_versioning WHERE oid=(SELECT MAX(oid) FROM db_versioning), error: no such table: db_versioning
> Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT c.log_index, c.term, c.sqlcmd, c.timestamp, c.fed_index, p.log_index, p.term FROM logdb c, logdb p WHERE c.log_index = 0 AND p.log_index = 0, error: no such table: logdb
> Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: INSERT INTO logdb (log_index, term, sqlcmd, timestamp, fed_index, applied) VALUES (0,0,'eJwzNDU1N7EwNzYzBwALYgIW',1557487367,-1,1), error: no such table: logdb
> Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT c.log_index, c.term, c.sqlcmd, c.timestamp, c.fed_index, p.log_index, p.term FROM logdb c, logdb p WHERE c.log_index = 0 AND p.log_index = 0, error: no such table: logdb
> Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT MAX(log_index) FROM logdb, error: no such table: logdb
> Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT MAX(log_index) FROM logdb WHERE applied = 1, error: no such table: logdb
> Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT c.log_index, c.term, c.sqlcmd, c.timestamp, c.fed_index, p.log_index, p.term FROM logdb c, logdb p WHERE c.log_index = 4294967295 AND p.log_index = 4294967294, error: no such table: logdb
> Fri May 10 13:22:47 2019 [Z0][ONE][E]: SQL command was: SELECT fed_index FROM logdb WHERE fed_index != -1 , error: no such table: logdb
> 
> ```

So it looks like that oned does not initialize the sqlite db on startup. I tried switching to mysql and importing a db backup from a frontend node, but that just wrecks the HA (forces elections).

Is there any way to clean/initialize an empty sqlite db just for the opennebula service to start? Or am I missing something? Do I even need to enable/start these services on the node if I don’t want a frontend there?

---

<div class="post-metadata">

**Author:** ![cgonzalez](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cgonzalez/32/7096_2.png) [@cgonzalez](https://forum.opennebula.io/u/cgonzalez)\
**Post date:** [May 10, 2019, 12:58pm UTC](https://forum.opennebula.io/t/opennebula-service-wont-start-uninitialized-sqlite-db/7211/2 "2019-05-10T12:58:09Z")

</div>

Hello @Pimplek,

OpenNebula daemon must run only in frontend nodes, in hypervisors nodes you just need to install opennebula-node-kvm package and add this node as a host in OpenNebula ([http://docs.opennebula.org/5.8/deployment/node\_installation/kvm\_node\_installation.html#step-7-adding-a-host-to-opennebula](http://docs.opennebula.org/5.8/deployment/node_installation/kvm_node_installation.html#step-7-adding-a-host-to-opennebula)).

Maybe you can take a look here for clarifying concepts: [http://docs.opennebula.org/5.8/deployment/cloud\_design/open\_cloud\_architecture.html#architectural-overview](http://docs.opennebula.org/5.8/deployment/cloud_design/open_cloud_architecture.html#architectural-overview)

---

<div class="post-metadata">

**Author:** ![Pimplek](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@Pimplek](https://forum.opennebula.io/u/Pimplek)\
**Post date:** [May 10, 2019, 1:03pm UTC](https://forum.opennebula.io/t/opennebula-service-wont-start-uninitialized-sqlite-db/7211/3 "2019-05-10T13:03:03Z")

</div>

Hi @cgonzalez,

You are right. Initially when I added the new host I had a “INIT” or “ERROR” state on sunstone and in “onehost list” output for that host. I guess thats why I assumed that the service needs to run.  
After a host reboot I see a successful “ON” state for the new node. Opennebula service is disabled on that host. Not sure what my exact issue was, but neverheless thank you very much for clarifying.

Br
