Ubuntu 14.04 / sqLite - Your database has format version -1, ...

Started by osvaldotcf, July 03, 2014, 11:45:52 PM

Previous topic - Next topic

osvaldotcf

Hi,
my environment is:
Ubuntu 64 14.04

After install, on init netxmsd, i receve this on log:

tail -f /var/log/netxmsd
[03-Jul-2014 17:39:20.382] Log file opened
[03-Jul-2014 17:39:20.382] [DEBUG] Code page set to ASCII
[03-Jul-2014 17:39:20.393] [INFO ] Platform subagent "/usr/lib/netxms/linux.nsm" successfully loaded
[03-Jul-2014 17:39:20.393] [DEBUG] Debug callback set for DB library
[03-Jul-2014 17:39:20.459] [INFO ] Database driver "/usr/local/lib/libnxddr_sqlite.so" loaded and initialized successfully
[03-Jul-2014 17:39:20.466] [DEBUG] New DB connection opened: handle=0x2339eb0
[03-Jul-2014 17:39:20.466] [DEBUG] Successfully connected to database netxms@localhost
[03-Jul-2014 17:39:20.467] [ERROR] SQL query failed (Query = "SELECT var_value FROM metadata WHERE var_name='SchemaVersion'"): no such table: metadata
[03-Jul-2014 17:39:20.467] [ERROR] SQL query failed (Query = "SELECT var_value FROM config WHERE var_name='DBFormatVersion'"): no such table: config
[03-Jul-2014 17:39:20.467] [ERROR] Your database has format version -1, but server is compiled for version 318

Alex Kirhenshtein

You need to create all required tables and load initial configuration. This can be done with "nxdbmgr init path_to_sql_file" command, for example:

nxdbmgr init /opt/netxms/share/netxms/sql/dbinit_pgsql.sql


You need to change path (/opt/netxms/share/netxms/sql/) to conform your installation, and please note, that file name is different for different database types:

AirAlk:~() $ ls -l /opt/netxms/share/netxms/sql/dbinit_*.sql
-rw-r--r--  1 alk  admin  120673 Jun 22 22:17 /opt/netxms/share/netxms/sql/dbinit_db2.sql
-rw-r--r--  1 alk  admin  119910 Jun 22 22:17 /opt/netxms/share/netxms/sql/dbinit_mssql.sql
-rw-r--r--  1 alk  admin  112856 Jun 22 22:17 /opt/netxms/share/netxms/sql/dbinit_mysql.sql
-rw-r--r--  1 alk  admin  120498 Jun 22 22:17 /opt/netxms/share/netxms/sql/dbinit_oracle.sql
-rw-r--r--  1 alk  admin  117540 Jun 22 22:17 /opt/netxms/share/netxms/sql/dbinit_pgsql.sql
-rw-r--r--  1 alk  admin  118248 Jun 22 22:17 /opt/netxms/share/netxms/sql/dbinit_sqlite.sql


In your case, most likely command will be

nxdbmgr init /usr/share/netxms/sql/dbinit_sqlite.sql



NB! We strongly suggest not to use SQLite for anything than testing or development