Database export error
-
Hello,
did you use the nxdbmgr export command?
If this doesn't work you can dump the database (pg_dump, mysqldump, exp, etc.).
You can dump database while netxmsd is running.
Here is the documentation for PostgreSQL.
https://www.postgresql.org/docs/current/backup-dump.htmlBest regards
Woody -
Hi,
Yes, I used nxdbmgr export command, giving the specified error.
I know pg_dump, used this and have a dump of my database, but the problem is still the missing table.
I'd like to work with nxdbmgr instead of using pgsql for export/dump.
Maybe it will be created after updating netxms? -
-
Hi,
what exact version you are using? Please show content of table "metadata".
Best regards,
Victor -
@woody said in Database export error:
Hello,
netxms has fixed many bugs with the latest version.
I think you can just upgrade it.
I never had problems oder data loss while upgrading.Best regards
WoodyUpgrade works but error is still there
-
@victor said in Database export error:
Hi,
what exact version you are using? Please show content of table "metadata".
Best regards,
VictorHi Victor,
now I'm on version 3.2.400.
I played along a little bit with excluding tables until the export worked.
Following tables needed to be skipped:idata_sc_default
idata_sc_7
idata_sc_30
idata_sc_90
idata_sc_180
idata_sc_other
tdata_sc_default
tdata_sc_7
tdata_sc_30
tdata_sc_90
tdata_sc_180
tdata_sc_other
idata_83292And here is the metadata-table:
var_name | var_value
-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SchemaVersion | 700
Syntax | PGSQL
IDataIndexCreationCommand_0 | CREATE INDEX idx_idata_%d_id_timestamp ON idata_%d(item_id,idata_timestamp DESC)
TDataTableCreationCommand_0 | CREATE TABLE tdata_%d (item_id integer not null,tdata_timestamp integer not null,tdata_value text null)
TDataIndexCreationCommand_0 | CREATE INDEX idx_tdata_%d ON tdata_%d(item_id,tdata_timestamp)
LocationHistory | CREATE TABLE gps_history_%d (latitude varchar(20), longitude varchar(20), accuracy integer not null, start_timest var_name | var_value
-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SchemaVersion | 700
Syntax | PGSQL
IDataIndexCreationCommand_0 | CREATE INDEX idx_idata_%d_id_timestamp ON idata_%d(item_id,idata_timestamp DESC)
TDataTableCreationCommand_0 | CREATE TABLE tdata_%d (item_id integer not null,tdata_timestamp integer not null,tdata_value text null)
TDataIndexCreationCommand_0 | CREATE INDEX idx_tdata_%d ON tdata_%d(item_id,tdata_timestamp)
LocationHistory | CREATE TABLE gps_history_%d (latitude varchar(20), longitude varchar(20), accuracy integer not null, start_timestamp integer not null, end_timestamp integer not null, PRIMARY KEY(start_timestamp))
ServerID | 2E2D7FC5BAC725ED
SingeTablePerfData | 0
SchemaVersionLevel.30 | 102
SchemaVersionLevel.22 | 59
SchemaVersionLevel.31 | 10
SchemaVersionMajor | 32
IDataTableCreationCommand | CREATE TABLE idata_%d (item_id integer not null,idata_timestamp integer not null,idata_value varchar(255) null,raw_value varchar(255) null)
SchemaVersionMinor | 12
(14 rows)(END)
Edit: Now there is another problem, maybe it depends on the "missing-table-problem" an would have appeared befor updating netxms:
We put 4 new devices into our network, which are found via active network discovery. After a while, they disappear in netxms and get found within the next network discovery. This kept repeading.Kind regards
Sebastian -
idata_sc* tables are only needed for TimescaleDB deployment, so it definitely is export bug.
As for disappearing nodes - do you have any SQL errors in server log?
Best regards,
Victor -
Hi Victor,
there are no errors in the log-file, if I checked the right one. (which is set in netxmxd.conf?).
netxmsd.conf is:"DBDriver = pgsql.ddr
DBServer = localhost
DBName = netxms
DBLogin = xxxxx
DBPassword = xxxxxx
LogFailedSQLQueries = yes
LogFile = /var/log/netxmsd"In server configuration, "DeleteUnreachableNodesPeriod" is set to 0.
Edit: I added one oft the new nodes manually and after a while this one also disappears.
Kind regards,
Sebastian -
It could also be bug in deduplication (when server decides that two nodes are in fact represent same device and deletes one of them). You can try to turn deduplication off by setting configuration parameter NetworkDiscovery.MergeDuplicateNodes to false. Also, try to set debug level to 6, create node, wait for it to disappear, and show log file filtered by that node name.
Also, try to execute command on debug consoleshow object namereplacing nme with actual name of disappeared node.
Best regards,
Victor -
Hi Victor,
I was a little busy last week.
Here's what debug lvl 6 shows:
2020.03.30 02:48:51.256 *D* [poll.conf ] Primary IP address 1xx.xxx.xxx.21 of node server08.domain.de [279] found on interface Microsoft Network Adapter Multiplexor Driver of node ilo-server08.domain.de [106297]
2020.03.30 02:48:51.256 *D* [poll.conf ] Node server08.domain.de [279] is a duplicate of node ilo-server08.domain.de [106297]
2020.03.30 02:48:51.256 *D* [poll.conf ] Removing node ilo-server08.domain.de [106297] as duplicate
2020.03.30 02:48:51.256 *D* [ ] Deleting object 106297 [ilo-server08.domain.de]The problem is appearing at all of our ILOs after we decided to monitor their network.
The servers are in a different network than their ILOs. The ILOs get found and then get deleted.
e.g.: server08.domain.de has primary IP 192.111.222.21 an ILO-server08.domain.de has IP 192.111.100.8.Best regards
Sebastian
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login