NetXMS Support Forum

English Support => General Support => Topic started by: radw on May 23, 2016, 04:32:51 AM

Title: DCI and Authentication disabled (after OS reboot)
Post by: radw on May 23, 2016, 04:32:51 AM
Hello NETXMS team, I continue working with NETXMS and it start give me the required SNMP monitoring that I was looking for. Thanks you for this tool.

However I just find out that, for two nodes, even if I leave all their DCI activated, after a reboot of the Debian8 (where I installled NETXMS), their DCIs appear as "disabled" again:

1) Before Debian reboot: Their DCIs are activated (in fact, I activated again since they appeared disabled in the last reboot)

(http://s33.postimg.org/918zfjah7/Capture_NETXMS_May222016_P1.jpg) (http://postimg.org/image/918zfjah7/)

(http://s33.postimg.org/iidjnmkwb/Capture_NETXMS_May222016_P2.jpg) (http://postimg.org/image/iidjnmkwb/)

2) After Debian rebbot: The DCIs appear disabled again:

(http://s33.postimg.org/q5dxslhl7/Capture_NETXMS_May222016_P3.jpg) (http://postimg.org/image/q5dxslhl7/)

(http://s33.postimg.org/jc09ah3kb/Capture_NETXMS_May222016_P4.jpg) (http://postimg.org/image/jc09ah3kb/)

In addition , every time the OS is restarted, I have to reload the netxms service for enable access through the Management Console (on the contrary, a message "conection refused" appear). I found the netxms service status different after I restart it:



NETXMS-TEST:~$ sudo service netxmsd status
[sudo] password for admtelcisco:
â netxmsd.service - LSB: NetXMS server
   Loaded: loaded (/etc/init.d/netxmsd)
   Active: active (exited) since Sun 2016-05-22 19:12:52 COT; 5min ago
  Process: 613 ExecStart=/etc/init.d/netxmsd start (code=exited, status=0/SUCCESS)
NETXMS-TEST:~$
NETXMS-TEST:~$ sudo service netxmsd restart
NETXMS-TEST:~$
NETXMS-TEST:~$ sudo service netxmsd status
â netxmsd.service - LSB: NetXMS server
   Loaded: loaded (/etc/init.d/netxmsd)
   Active: active (running) since Sun 2016-05-22 19:18:21 COT; 3s ago
  Process: 1787 ExecStop=/etc/init.d/netxmsd stop (code=exited, status=0/SUCCESS)
  Process: 1796 ExecStart=/etc/init.d/netxmsd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/netxmsd.service
           ââ1802 /usr/bin/netxmsd -d




How those two issues could be fixed??


Regards.
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: radw on May 25, 2016, 12:04:08 AM
Hello, I solved the DCI disabled, by copy them to an unmanaged node, then deleting it in the original node, and finally copy the DCI from the unmanaged node, activating and rediscover the instances again, reboot the system, and the DCIs keep activated.

The autentication issue persists after reboot.

Regards.
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: Victor Kirhenshtein on May 27, 2016, 09:47:23 AM
Hi,

it seems that server is started on OS boot and then stopped. One possible reason could be that it started before database is ready, so it cannot access database and exits. Can you please set debug level to 9 (by adding DebugLevel=9 to netxmsd.conf), restart the system, and post server's log file?

Best regards,
Victor
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: radw on May 31, 2016, 07:13:22 PM
Hello, here is the netxmsd log file requested: https://www.dropbox.com/s/t3uont26zsu72vs/netxmsd?dl=0

Regards.
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: Victor Kirhenshtein on June 01, 2016, 09:59:35 AM
It seems that netxmsd starts before MySQL is ready:

[31-May-2016 10:50:17.311] [ERROR] Unable to establish connection with database (Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2))

try to add dependency on mysqld and/or startup delay to netxmsd startup script.

Best regards,
Victor
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: radw on June 01, 2016, 07:27:20 PM
Hello, thanks for your answer. In those cases, which is the best practice ??. Also, is there any procedure in the documentation to perform that action ??

Regards.
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: radw on June 03, 2016, 12:03:37 AM
Hello Victor, can you explain me how to perform those steps. Thanks.
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: Alex Kirhenshtein on June 07, 2016, 07:22:22 PM
Modify /etc/init.d/netxmsd, add "mysqld" to "Required-Start" section.
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: radw on June 08, 2016, 08:37:58 PM
Hello, I modify the file and restart the netxmsd service, however the issue persists after I reboot the Debian system:



NETXMS-TEST:~$ sudo vi /etc/init.d/netxmsd
#!/bin/sh
# vim: syntax=sh
### BEGIN INIT INFO
# Provides:          netxms-server
# Required-Start:    $network $local_fs nxagentd mysqld
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: NetXMS server
# Description:       Network monitoring daemon, which collect and process metrics
#                    from native and SNMP agents.
### END INIT INFO

# Author: Alex Kirhenshtein <[email protected]>




Regards.
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: radw on August 13, 2016, 04:15:48 AM
Hello, I still have the authentication issue after rebooting or shutdown the OS.

The netxmsd service appears active, but is necessary to restart it for allow login.

Regards.
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: Victor Kirhenshtein on August 16, 2016, 04:11:44 PM
What is in the netxmsd log when you try to connect after OS restart?

Best regards,
Victor
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: radw on August 19, 2016, 06:11:06 PM
Hello Victor, here is the log (at debug level9): http://jmp.sh/iZAh5EK

Regards.
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: Victor Kirhenshtein on August 25, 2016, 06:09:08 PM
Hi,

still there is an issue with database not being ready:

[19-Aug-2016 09:55:11.539] [ERROR] Unable to establish connection with database (Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2))

If there is dependency on mysqld in netxmsd startup script, then you need to add some code to wait while mysql becomes available in netxmsd startup script, or just add delay big enough to allow mysqld to initialize.

Best regards,
Victor
Title: Re: DCI and Authentication disabled (after OS reboot)
Post by: radw on August 25, 2016, 07:12:42 PM
Hello Victor, thanks for your answer and analysis.

In this case, ¿¿can you guide me on on how to ingress the code you mentioned for fixing the issue ??

Regards.