connection form console and SNMP with no IP

Started by Macphisto, February 08, 2010, 09:50:03 PM

Previous topic - Next topic

Macphisto

Hi again

When trying to connect from windows console i get the error: "Unable to connect: Communication failure"

Using telnet, I get this answer:
/ # telnet 10.14.2.128 4701
Trying 10.14.2.128...
telnet: Unable to connect to remote host: Connection refused

When cheking on /log/netxms I saw these errors:

[08-Feb-2010 14:16:26] Listening for client connections on TCP socket 0.0.0.0:4701
[08-Feb-2010 14:16:26] Listening for SNMP traps on UDP socket 0.0.0.0:162

So I suppose netxms doesn't know server's IP address. Where can I configure it?

Macphisto

Hi

Checking more closely I found two things:

1. 0.0.0.0:port means listening all interfaces that port (sorry)

2. When I try to connect from windows console to server, netxms service is dropped:
/ # /opt/bin/netxmsd -d
/ # ps -fea | grep xm
    root  1977     1   1 20:38:37 ?           0:00 /opt/bin/netxmsd -d
    root  1995 17183   0 20:38:46 pts/1       0:00 grep xm

Attempt to connect from windows console: Timed out

/ # ps -fea | grep xm
    root  2099 17183   0 20:39:43 pts/1       0:00 grep xm

/var/log/netxms doesn´t show any message indicating errors or warnings except for
[08-Feb-2010 20:38:53] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (18,1265679533,'0.140000')"): Table 'netxms.idata_12' doesn't exist



Any ideas?

Macphisto

Hello again.

An update about the dropping of netxms service. When running: /opt/bin/netxmsd -d -D 9, /var/log/netxms showed this before stop:

[08-Feb-2010 21:05:35] DEBUG: [CLSN-0] Received message CMD_GET_SERVER_INFO
[08-Feb-2010 21:05:35] DEBUG: [CLSN-0] Server time zone: COT+05COST
[08-Feb-2010 21:05:35] DEBUG: Successful sync query: "SELECT var_value FROM config WHERE var_name='WindowsConsoleUpgradeURL'" [0 ms]
[08-Feb-2010 21:05:35] DEBUG: [CLSN-0] Sending message CMD_REQUEST_COMPLETED
[08-Feb-2010 21:05:35] DEBUG: [CLSN-0] Received message CMD_LOGIN
[08-Feb-2010 21:05:35] DEBUG: [CLSN-0] User [email protected] authenticated




Macphisto

Hello

Looking at: https://www.netxms.org/forum/index.php/topic,40.0.html

I followed the procedure suggested and this is the result:

netxmsd: [09-Feb-2010 11:53:56] Listening for client connections on TCP socket 0.0.0.0:4701
[09-Feb-2010 11:53:58] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (11,1265734438,'0')"): Table 'netxms.idata_12' doesn't exist
[09-Feb-2010 11:53:58] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (13,1265734438,'0.000000')"): Table 'netxms.idata_12' doesn't exist
[09-Feb-2010 11:53:58] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (14,1265734438,'0')"): Table 'netxms.idata_12' doesn't exist
[09-Feb-2010 11:53:58] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (15,1265734438,'0.000000')"): Table 'netxms.idata_12' doesn't exist
[09-Feb-2010 11:53:58] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (16,1265734438,'0.000000')"): Table 'netxms.idata_12' doesn't exist
[09-Feb-2010 11:53:58] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (12,1265734438,'0.000000')"): Table 'netxms.idata_12' doesn't exist
[09-Feb-2010 11:53:58] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (19,1265734438,'2915983360')"): Table 'netxms.idata_12' doesn't exist
[09-Feb-2010 11:53:58] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (18,1265734438,'0.070000')"): Table 'netxms.idata_12' doesn't exist
[09-Feb-2010 11:53:58] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (20,1265734438,'17179869184')"): Table 'netxms.idata_12' doesn't exist
[09-Feb-2010 11:53:58] SQL query failed (Query = "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (17,1265734438,'0.000000')"): Table 'netxms.idata_12' doesn't exist
Fallo de segmentación (core dumped)


I get to a dead end... What can be the options to follow?

Victor Kirhenshtein

Hi!

Did you grant all privileges on netxms database to user 'netxms'?
Try to drop and re-create database. After that, run netxmsd in debug mode and post it's output.

Best regards,
Victor

Macphisto

Hi Victor

After drop and recreate db this is the last part of the debug output:
.
.
.
[09-Feb-2010 18:55:45] DEBUG: Node(nocserver)->GetItemFromAgent(System.Memory.Physical.Used): dwError=0 dwResult=0
[09-Feb-2010 18:55:45] DEBUG: Successful sync query: "UPDATE raw_dci_values SET raw_value='0.000000',last_poll_time=1265759745 WHERE item_id=17" [0 ms]
[09-Feb-2010 18:55:45] DEBUG: Successful sync query: "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (17,1265759745,'0.000000')" [0 ms]
[09-Feb-2010 18:55:45] DEBUG: Node(nocserver)->GetItemFromAgent(System.Memory.Physical.Total): dwError=0 dwResult=0
[09-Feb-2010 18:55:45] DEBUG: Successful sync query: "UPDATE raw_dci_values SET raw_value='0.000000',last_poll_time=1265759745 WHERE item_id=11" [0 ms]
[09-Feb-2010 18:55:45] DEBUG: Successful sync query: "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (11,1265759745,'0.000000')" [0 ms]
[09-Feb-2010 18:55:45] DEBUG: Successful sync query: "UPDATE raw_dci_values SET raw_value='2931802112',last_poll_time=1265759745 WHERE item_id=13" [0 ms]
[09-Feb-2010 18:55:45] DEBUG: Successful sync query: "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (13,1265759745,'2931802112')" [0 ms]
[09-Feb-2010 18:55:45] DEBUG: Successful sync query: "UPDATE raw_dci_values SET raw_value='17179869184',last_poll_time=1265759745 WHERE item_id=14" [0 ms]
[09-Feb-2010 18:55:45] DEBUG: Successful sync query: "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (14,1265759745,'17179869184')" [0 ms]
[09-Feb-2010 18:55:45] DEBUG: Node(nocserver)->GetItemFromAgent(System.CPU.LoadAvg): dwError=0 dwResult=0
[09-Feb-2010 18:55:45] DEBUG: Successful sync query: "UPDATE raw_dci_values SET raw_value='0.140000',last_poll_time=1265759745 WHERE item_id=12" [0 ms]
[09-Feb-2010 18:55:45] DEBUG: Successful sync query: "INSERT INTO idata_12 (item_id,idata_timestamp,idata_value) VALUES (12,1265759745,'0.140000')" [0 ms]
[09-Feb-2010 18:55:47] DEBUG: ItemPoller: wakeup
[09-Feb-2010 18:55:47] DEBUG: ItemPoller: object index lock acquired (index size 8)
[09-Feb-2010 18:55:47] DEBUG: ItemPoller: (5) calling QueueItemsForPolling for node nocserver [12]
[09-Feb-2010 18:55:47] DEBUG: ItemPoller: object index lock released
[09-Feb-2010 18:55:48] DEBUG: Starting status poll for node nocserver (ID: 12)
[09-Feb-2010 18:55:48] DEBUG: Successful sync query: "SELECT var_value FROM config WHERE var_name='CapabilityExpirationTime'" [0 ms]
[09-Feb-2010 18:55:48] DEBUG: StatusPoll(nocserver): checking agent
[09-Feb-2010 18:55:48] DEBUG: StatusPoll(nocserver): connected to agent
[09-Feb-2010 18:55:48] DEBUG: AgentConnection::ReceiverThread(): RecvNXCPMessage() failed: error=0, socket_error=0
[09-Feb-2010 18:55:48] DEBUG: StatusPoll(nocserver): disconnected from agent
[09-Feb-2010 18:55:48] DEBUG: StatusPoll(nocserver): deleting agent connection
[09-Feb-2010 18:55:48] DEBUG: StatusPoll(nocserver): agent connection deleted
[09-Feb-2010 18:55:48] DEBUG: StatusPoll(nocserver): starting child object poll
[09-Feb-2010 18:55:48] DEBUG: StatusPoll(nocserver): polling interface 14 [eri0]
[09-Feb-2010 18:55:48] DEBUG: Node(nocserver)->GetItemFromAgent(Net.Interface.AdminStatus(2)): dwError=0 dwResult=0
[09-Feb-2010 18:55:48] DEBUG: Node(nocserver)->GetItemFromAgent(Net.Interface.Link(2)): dwError=0 dwResult=0
[09-Feb-2010 18:55:48] DEBUG: Interface::StatusPoll(14,eri0): new status from NetXMS agent 0
[09-Feb-2010 18:55:48] DEBUG: Interface::StatusPoll(14,eri0): newStatus=0 oldStatus=5 pollCount=1 requiredPolls=1
[09-Feb-2010 18:55:48] DEBUG: Interface::StatusPoll(14,eri0): status changed from 5 to 0
[09-Feb-2010 18:55:48] DEBUG: StatusPoll(nocserver): finished child object poll
[09-Feb-2010 18:55:48] DEBUG: Finished status poll for node nocserver (ID: 12)
[09-Feb-2010 18:55:48] DEBUG: EVENT 4 (F:0x0001 S:0) FROM nocserver: Interface "eri0" changed state to UP (IP Addr: 10.14.2.128/255.255.255.0, IfIndex: 2)
[09-Feb-2010 18:55:48] DEBUG: EVENT 6 (F:0x0001 S:0) FROM nocserver: Node status changed to NORMAL
[09-Feb-2010 18:55:48] DEBUG: Successful sync query: "INSERT INTO event_log (event_id,event_code,event_timestamp,event_source,event_severity,event_message,root_event_id,user_tag) VALUES (11,4,1265759748,12,0,'Interface "eri0" changed state to UP (IP Addr: 10.14.2.128/255.255.255.0, IfIndex: 2)',0,'')" [0 ms]
[09-Feb-2010 18:55:48] DEBUG: Successful sync query: "INSERT INTO event_log (event_id,event_code,event_timestamp,event_source,event_severity,event_message,root_event_id,user_tag) VALUES (12,6,1265759748,12,0,'Node status changed to NORMAL',0,'')" [0 ms]
[09-Feb-2010 18:55:49] DEBUG: ItemPoller: wakeup
[09-Feb-2010 18:55:49] DEBUG: ItemPoller: object index lock acquired (index size 8)
[09-Feb-2010 18:55:49] DEBUG: ItemPoller: (5) calling QueueItemsForPolling for node nocserver [12]
[09-Feb-2010 18:55:49] DEBUG: ItemPoller: object index lock released
[09-Feb-2010 18:55:50] DEBUG: [CLSN-0] Received message CMD_GET_SERVER_INFO
[09-Feb-2010 18:55:50] DEBUG: [CLSN-0] Server time zone: COT+05COST
[09-Feb-2010 18:55:50] DEBUG: Successful sync query: "SELECT var_value FROM config WHERE var_name='WindowsConsoleUpgradeURL'" [0 ms]
[09-Feb-2010 18:55:50] DEBUG: [CLSN-0] Sending message CMD_REQUEST_COMPLETED
[09-Feb-2010 18:55:50] DEBUG: [CLSN-0] Received message CMD_LOGIN
[09-Feb-2010 18:55:50] DEBUG: [CLSN-0] User [email protected] authenticated
Fallo de segmentación (core dumped)


Service is dropped once I try to login from console or call Alarm Viewer.

Best regards.

Victor Kirhenshtein

Very strange. Could you please run netxmsd under gdb, like this:


debian:~# gdb /opt/netxms/bin/netxmsd
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run -D 5


and when it crashes, enter gdb command bt and post it's output?

Thank you for patience!

Best regards,
Victor

Macphisto

Hi

Very strange, specially for the behaviour observed in this test, take a look:

/ # /opt/sfw/bin/gdb /opt/bin/netxmsd
GNU gdb 6.2.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10"...
(gdb) run -D 5
Starting program: /opt/bin/netxmsd -D 5
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000094
Using configuration file "/etc/netxmsd.conf"
Configuration file OK
[10-Feb-2010 08:52:27] DEBUG: Code page set to ISO-8859-1
[10-Feb-2010 08:52:27] Platform subagent "/opt/lib/libnsm_sunos.so" successfully loaded
[10-Feb-2010 08:52:27] Database driver "/opt/lib/libnxddr_mysql.so" loaded and initialized successfully
[10-Feb-2010 08:52:27] DEBUG: New DB connection opened: handle=28600
[10-Feb-2010 08:52:27] DEBUG: Successfully connected to database netxms@localhost
[10-Feb-2010 08:52:27] DEBUG: New DB connection opened: handle=28628
[10-Feb-2010 08:52:27] DEBUG: New DB connection opened: handle=28650
[10-Feb-2010 08:52:27] DEBUG: New DB connection opened: handle=28678
[10-Feb-2010 08:52:27] DEBUG: New DB connection opened: handle=286a0
[10-Feb-2010 08:52:27] DEBUG: New DB connection opened: handle=286c8
[10-Feb-2010 08:52:27] DEBUG: Database Connection Pool initialized
[10-Feb-2010 08:52:27] Stalled database lock removed
[10-Feb-2010 08:52:27] DEBUG: Data directory set to /opt/share/netxms
[10-Feb-2010 08:52:27] DEBUG: Global configuration loaded
[10-Feb-2010 08:52:27] DEBUG: ID table created
[New LWP 1]
[New LWP 2]
[10-Feb-2010 08:52:27] DEBUG: User accounts loaded
[10-Feb-2010 08:52:27] DEBUG: Built-in objects created
[New LWP 3]
[10-Feb-2010 08:52:27] DEBUG: Loading container categories...
[10-Feb-2010 08:52:27] DEBUG: Loading built-in object properties...
[10-Feb-2010 08:52:27] DEBUG: Loading conditions...
[10-Feb-2010 08:52:27] DEBUG: Loading subnets...
[10-Feb-2010 08:52:27] DEBUG: Loading nodes...
[New LWP 4]
[10-Feb-2010 08:52:27] DEBUG: Loading interfaces...
[10-Feb-2010 08:52:27] DEBUG: Started caching of DCI values
[10-Feb-2010 08:52:27] DEBUG: Finished caching of DCI values
[10-Feb-2010 08:52:27] DEBUG: Loading network services...
[LWP 4 exited]
[New LWP 4]
[10-Feb-2010 08:52:27] DEBUG: Loading VPN connectors...
[10-Feb-2010 08:52:27] DEBUG: Loading clusters...
[10-Feb-2010 08:52:27] DEBUG: Loading templates...
[10-Feb-2010 08:52:27] DEBUG: Loading containers...
[10-Feb-2010 08:52:27] DEBUG: Loading template groups...
[10-Feb-2010 08:52:27] DEBUG: Linking objects...
[10-Feb-2010 08:52:27] DEBUG: Validating system templates...
[10-Feb-2010 08:52:27] DEBUG: Objects loaded and initialized
[10-Feb-2010 08:52:27] DEBUG: Situations loaded and initialized
[New LWP 5]
[New LWP 6]
[New LWP 7]
[New LWP 8]
[New LWP 9]
[New LWP 10]
[New LWP 11]
[New LWP 12]
[New LWP 13]
[New LWP 14]
[New LWP 15]
[New LWP 16]
[New LWP 17]
[New LWP 18]
[New LWP 19]
[New LWP 20]
[New LWP 21]
[New LWP 22]
[New LWP 23]
[New LWP 24]
[New LWP 25]
[New LWP 26]
[New LWP 27]
[New LWP 28]
[New LWP 29]
[New LWP 30]
[New LWP 31]
[New LWP 32]
[10-Feb-2010 08:52:27] SQL query failed (Query = "CREATE TABLE idata_12 (item_id integer not null,idata_timestamp integer not null,idata_value varchar(255) not null)"): Table 'idata_12' already exists
[10-Feb-2010 08:52:27] SQL query failed (Query = "CREATE INDEX idx_idata_12_item_id ON idata_12(item_id)"): Duplicate key name 'idx_idata_12_item_id'
[10-Feb-2010 08:52:27] SQL query failed (Query = "CREATE INDEX idx_idata_12_id_timestamp ON idata_12(item_id,idata_timestamp)"): Duplicate key name 'idx_idata_12_id_timestamp'
[10-Feb-2010 08:52:27] DEBUG: Starting configuration poll for node 10.14.2.128 (ID: 12)
[10-Feb-2010 08:52:27] DEBUG: ConfPoll(10.14.2.128): checking for NetXMS agent Flags={00000010} DynamicFlags={00000000}
[New LWP 33]
[10-Feb-2010 08:52:27] DEBUG: ConfPoll(10.14.2.128): checking for NetXMS agent - connecting
[New LWP 34]
[10-Feb-2010 08:52:27] DEBUG: ConfPoll(10.14.2.128): checking for NetXMS agent - connected

[1]+  Stopped                 /opt/sfw/bin/gdb /opt/bin/netxmsd


But when looking at ps, gdb appears still active:

/ # ps -fea | grep net
    root  8292     1   0  feb  01 ?           1:19 /usr/lib/inet/xntpd
    root  6848  5842   0 08:55:02 pts/5       0:00 grep net
    root  6722  5726   0 08:52:17 pts/4       0:02 /opt/sfw/bin/gdb /opt/bin/netxmsd
    root  6743  6722   0 08:52:25 pts/4       0:00 /opt/bin/netxmsd -D 5


Macphisto

I will try from the beginning so i´m unstalling and then reinstall to see if it works.

Macphisto

Ok. I re-install from scratch changing some options in configure. After finally correct somo make and install errors I get at the same place:

This GDB was configured as "sparc-sun-solaris2.10"...
(gdb) run -D 7
Starting program: /opt/netxms/bin/netxmsd -D 7
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000094
Using configuration file "/etc/netxmsd.conf"
Configuration file OK
[22-Feb-2010 18:05:05] DEBUG: Code page set to ISO-8859-1
[22-Feb-2010 18:05:05] Platform subagent "/opt/netxms/lib/libnsm_sunos.so" successfully loaded
[22-Feb-2010 18:05:05] Database driver "/opt/lib/libnxddr_mysql.so" loaded and initialized successfully
[22-Feb-2010 18:05:05] DEBUG: New DB connection opened: handle=28608
[22-Feb-2010 18:05:05] DEBUG: Successfully connected to database netxms@localhost
[22-Feb-2010 18:05:05] DEBUG: New DB connection opened: handle=28630
[22-Feb-2010 18:05:05] DEBUG: New DB connection opened: handle=28658
[22-Feb-2010 18:05:05] DEBUG: New DB connection opened: handle=28680
[22-Feb-2010 18:05:05] DEBUG: New DB connection opened: handle=286a8
[22-Feb-2010 18:05:05] DEBUG: New DB connection opened: handle=286d0
[22-Feb-2010 18:05:05] DEBUG: Database Connection Pool initialized
[22-Feb-2010 18:05:05] Stalled database lock removed
[22-Feb-2010 18:05:05] DEBUG: Data directory set to /opt/netxms/share/netxms
[22-Feb-2010 18:05:05] DEBUG: Global configuration loaded
[22-Feb-2010 18:05:05] DEBUG: ID table created
[New LWP 1]
[New LWP 2]
[22-Feb-2010 18:05:05] DEBUG: User accounts loaded
[22-Feb-2010 18:05:05] DEBUG: Built-in objects created
[New LWP 3]
[22-Feb-2010 18:05:05] DEBUG: Loading container categories...
[22-Feb-2010 18:05:05] DEBUG: Loading built-in object properties...
[22-Feb-2010 18:05:05] DEBUG: Loading conditions...
[22-Feb-2010 18:05:05] DEBUG: Loading subnets...
[22-Feb-2010 18:05:05] DEBUG: Loading nodes...
[New LWP 4]
[22-Feb-2010 18:05:05] DEBUG: Loading interfaces...
[22-Feb-2010 18:05:05] DEBUG: Started caching of DCI values
[22-Feb-2010 18:05:05] DEBUG: Loading network services...
[22-Feb-2010 18:05:05] DEBUG: Loading VPN connectors...
[22-Feb-2010 18:05:05] DEBUG: Loading clusters...
[22-Feb-2010 18:05:05] DEBUG: Loading templates...
[22-Feb-2010 18:05:05] DEBUG: Loading containers...
[22-Feb-2010 18:05:05] DEBUG: Loading template groups...
[22-Feb-2010 18:05:05] DEBUG: Linking objects...
[22-Feb-2010 18:05:05] DEBUG: Validating system templates...
[22-Feb-2010 18:05:05] DEBUG: Objects loaded and initialized
[22-Feb-2010 18:05:05] DEBUG: Situations loaded and initialized
[New LWP 5]
[New LWP 6]
[New LWP 7]
[New LWP 8]
[New LWP 9]
[New LWP 10]
[New LWP 11]
[New LWP 12]
[New LWP 13]
[New LWP 14]
[New LWP 15]
[New LWP 16]
[New LWP 17]
[New LWP 18]
[New LWP 19]
[New LWP 20]
[New LWP 21]
[New LWP 22]

[1]+  Stopped                 /opt/sfw/bin/gdb /opt/netxms/bin/netxmsd

This happened when trying to connect from windows console

So I don´t know what else to do.  ???


Victor Kirhenshtein

I suspect this issue is related to Solaris on SPARC - at least I was unable to reproduce it on Solaris x86, and I don't have any SPARC machine at my disposal. Does anybody uses NetXMS server on Solaris SPARC? Or maybe somebody could provide me shell access to some Solaris SPARC machine with dev environment?

Best regards,
Victor