NetXMS Support Forum

English Support => General Support => Topic started by: yos on February 06, 2013, 11:43:29 AM

Title: problem with runing netxms agent
Post by: yos on February 06, 2013, 11:43:29 AM
i have problem whene i run the netxms agent

/usr/local/bin/nxagentd –d
FATAL ERROR: Cannot open log file
Agent initialization failed
Title: Re: problem with runing netxms agent
Post by: Victor Kirhenshtein on February 06, 2013, 12:07:51 PM
Hi!

Check that user you are running agent under has access to log file specified in nxagentd.conf, and that path to the file exists.

Best regards,
Victor
Title: Re: problem with runing netxms agent
Post by: yos on February 07, 2013, 11:46:01 AM
hey
thank i fix it
now when i run this cmd:
/usr/local/bin/netxmsd -d
i get no output is that nrml ?

and thanks for ur help :)
Title: Re: problem with runing netxms agent
Post by: Alex Kirhenshtein on February 07, 2013, 12:13:51 PM
Yes, there should be no output with '-d', it's daemon mode - it should silently detach and go to background.
Before running it as daemon, you can check that config files are good and agent is working properly by running it with '-D3' (3 - debug level, can be from 0 to 9)
Title: Re: problem with runing netxms agent
Post by: yos on February 07, 2013, 12:41:50 PM
i run it :
/usr/local/bin/netxmsd -D3


and this is the result:
Using configuration file "/etc/netxmsd.conf"
wht does it mean ?
thnks in advance
Title: Re: problem with runing netxms agent
Post by: Alex Kirhenshtein on February 11, 2013, 07:20:11 PM
Check that you have "LogFile" parameter in file /etc/netxmsd.conf
Title: Re: problem with runing netxms agent
Post by: yos on February 11, 2013, 09:06:03 PM
yup i have  LogFile = /var/log/netxmsd i n /etc/netxmsd.conf
Title: Re: problem with runing netxms agent
Post by: Alex Kirhenshtein on February 13, 2013, 09:59:21 AM
Just realized – you running "netxmsd", but topic is about agent.

netxmsd - server binary
nxagentd - agent binary

There should be much more output with debug (-D) enabled, please post complete output and attach configuration files.
Title: Re: problem with runing netxms agent
Post by: yos on February 14, 2013, 12:05:05 AM
hi
i fix it thank you  for your help :)
Title: Re: problem with runing netxms agent
Post by: Nikk on July 23, 2013, 03:37:11 PM
I had the same issue, but after following your instructions i managed to get agent running, but then i got 2 fail lines:

[23-Jul-2013 15:33:34.847] Failed to load agent's registry from file /usr/local/var/netxms/registry.dat
[23-Jul-2013 15:33:34.847] Failed to save agent's registry to file /usr/local/var/netxms/registry.dat: No such file or directory

Is that okey? Or how should i fix them?
Title: Re: problem with runing netxms agent
Post by: Victor Kirhenshtein on July 23, 2013, 05:23:34 PM
Hi!

It's not a big problem. Anyway, you can just create directory /usr/local/var/netxms to fix it.

Best regards,
Victor
Title: Re: problem with runing netxms agent
Post by: Nikk on July 24, 2013, 11:08:08 AM
Okey, thanks for respond!  :)
Title: Re: problem with runing netxms agent
Post by: Nikk on July 24, 2013, 01:02:19 PM
And one more question,
how can I get access to write logs into those netxmsd and nxagentd files?
I got them written only in syslog file!
Title: Re: problem with runing netxms agent
Post by: Victor Kirhenshtein on July 24, 2013, 01:08:28 PM
You should add parameter

LogFile = /path/to/log/file

to netxmsd.conf and nxagentd.conf respectively.

Best regards,
Victor