NetXMS Support Forum

Please login or register.

Login with username, password and session length

Author Topic: Cannot loads platform subagent  (Read 4608 times)

ikyb

  • Newbie
  • *
  • Posts: 3
    • View Profile
Cannot loads platform subagent
« on: June 14, 2007, 03:39:30 pm »

Hello, I try to compile 0.2.17 released on Freebsd 7,6.2

host# ./configure --with-server --with-mysql --with-agent --prefix=/usr/local/netxms
host# make
host# make install
host# /usr/local/netxms/bin/nxdbmgr init /home/user/netxms/sql/dbinit_mysql.sql 

Compilation of source code and install is ok, after i start service:
host# /usr/local/bin/nxagentd -D -d
..........
[14-Jun-2007 16:20:41] Log file opened
[14-Jun-2007 16:20:41] Debug: Log file opened
[14-Jun-2007 16:20:41] Debug: Subagent API initialized
[14-Jun-2007 16:20:43] NetXMS Agent started
............

host#  /usr/local/netxms/bin/netxmsd
..............
[14-Jun-2007 16:36:48] Log file opened
[14-Jun-2007 16:36:48] Cannot loads platform subagent "/usr/local/netxms/lib/libnsm_freebsd.so": Subagent doesn't provide any usable parameters
[14-Jun-2007 16:36:48] Database driver "/usr/local/netxms/lib/libnxddr_mysql.so" loaded and initialized successfully
[14-Jun-2007 16:36:48] NetXMS server cannot create node object for itself - probably because platform subagent cannot be loaded (check above error messages, if any)
...............

In what there can be a problem?
Logged

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 916
    • View Profile
Cannot loads platform subagent
« Reply #1 on: June 14, 2007, 05:44:43 pm »

Hello.

Can you show me please output of:
1) ldd /usr/local/netxms/lib/libnsm_freebsd.so
2) file /usr/local/netxms/lib/libnsm_freebsd.so
Logged

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 916
    • View Profile
Cannot loads platform subagent
« Reply #2 on: June 14, 2007, 05:46:33 pm »

Please try to run in that way:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/netxms/lib /usr/local/netxms/bin/netxmsd standalone
Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 6654
    • View Profile
Cannot loads platform subagent
« Reply #3 on: June 14, 2007, 08:42:04 pm »

Hello!

It's a bug in FreeBSD subagent. Try to do the following: add the following lines to the end of src/agent/subagents/freebsd/freebsd.cpp:

extern "C" BOOL __NxSubAgentGetIfList(NETXMS_VALUES_LIST *pValue)
{
  return H_NetIfList("Net.InterfaceList", NULL, pValue) == SYSINFO_RC_SUCCESS;
}
extern "C" BOOL __NxSubAgentGetArpCache(NETXMS_VALUES_LIST *pValue)
{
  return H_NetArpCache("Net.ArpCache", NULL, pValue) == SYSINFO_RC_SUCCESS;
}

(it's a missing entry points caused message Cannot loads platform subagent "/usr/local/netxms/lib/libnsm_freebsd.so": Subagent doesn't provide any usable parameters) and recompile the agent. This should help.

Best regards,
Victor
Logged

ikyb

  • Newbie
  • *
  • Posts: 3
    • View Profile
Cannot loads platform subagent
« Reply #4 on: June 14, 2007, 11:19:49 pm »

host# ldd /usr/local/netxms/lib/libnsm_freebsd.so
/usr/local/netxms/lib/libnsm_freebsd.so:
        libkvm.so.4 => /lib/libkvm.so.4 (0x28187000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28300000)
        libmysqlclient.so.15 => /usr/local/lib/mysql/libmysqlclient.so.15 (0x2818f000)
        libz.so.4 => /lib/libz.so.4 (0x281ed000)
        libreadline.so.6 => /lib/libreadline.so.6 (0x283ed000)
        libncurses.so.6 => /lib/libncurses.so.6 (0x2841f000)
        libcrypto.so.5 => /lib/libcrypto.so.5 (0x2846b000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x285bf000)
        libm.so.5 => /lib/libm.so.5 (0x286a8000)
        libc.so.7 => /lib/libc.so.7 (0x2807f000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x286bd000)
        libcrypt.so.4 => /lib/libcrypt.so.4 (0x286c8000)

host# file /usr/local/netxms/lib/libnsm_freebsd.so
/usr/local/netxms/lib/libnsm_freebsd.so: symbolic link to `libnsm_freebsd.so.0'

host# ls -l /usr/local/netxms/lib/libnsm_freebsd.so*
lrwxr-xr-x  1 root  wheel     19 14 june 17:46 /usr/local/netxms/lib/libnsm_freebsd.so -> libnsm_freebsd.so.0
-rwxr-xr-x  1 root  wheel  80105 14 june 17:46 /usr/local/netxms/lib/libnsm_freebsd.so.0
Logged

ikyb

  • Newbie
  • *
  • Posts: 3
    • View Profile
Cannot loads platform subagent
« Reply #5 on: June 14, 2007, 11:33:32 pm »

It is more than thanks for the help, all was started :)
Logged