NetXMS Support Forum

English Support => General Support => Topic started by: aeonaura on February 13, 2020, 04:38:31 PM

Title: NetXMS Agent on Odroid-HC2, level zero
Post by: aeonaura on February 13, 2020, 04:38:31 PM
Not a big Linux guy, struggling to even get started with this.

I would believe it's like 4 commands and its off to the races. Running Ubuntu 18.04.1 LTS (GNU/Linux 4.14.85-152 armv7l) on an Odroid-HC2.

As far as where I am, let's call it level zero.

Will this OS support the NetXMS Agent?


Have the server setup and working, don't need much help from that side.
Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: Filipp Sudanov on February 13, 2020, 05:00:01 PM
The first thing to try is generic ARM agent that's available among downloads:

https://www.netxms.org/download/releases/3.1/nxagent-3.1.343-linux-arm.tar.gz

Extract it to the root of the filesystem - the files will get to /opt/netxms - and try running
/opt/netxms/bin/nxagentd -D 6

If we are lucky, it will start - and will blame that there is no config file - you could create one in /etc/nxagentd.conf. Or it will not start, then you'd have to compile it from sources.
Please report the results.
Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: aeonaura on February 13, 2020, 05:04:38 PM
Steps so far:

wget https://www.netxms.org/download/releases/3.1/nxagent-3.1.343-linux-arm.tar.gz

No sure how and where to extract this. Looking up the commands. "tar xvzf file.tar.gz -C /path/to/somedirectory"  but not sure what to enter

tar xvzf nxagent-3.1.343-linux-arm.tar.gz

is this correct?
Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: aeonaura on February 13, 2020, 05:22:09 PM
root@odroid:~# opt/netxms/bin/nx
nxagentd     nxapush      nxdevcfg     nxgenguid    nxmibc       nxsnmpset
nxappget     nxcsum       nxencpasswd  nxlptest     nxsnmpget    nxsnmpwalk
root@odroid:~# opt/netxms/bin/nx
nxagentd     nxapush      nxdevcfg     nxgenguid    nxmibc       nxsnmpset
nxappget     nxcsum       nxencpasswd  nxlptest     nxsnmpget    nxsnmpwalk
root@odroid:~# opt/netxms/bin/nxa
nxagentd  nxappget  nxapush
root@odroid:~# opt/netxms/bin/nxagentd -D 6
opt/netxms/bin/nxagentd: error while loading shared libraries: libappagent.so.31: cannot open shared object file: No such file or directory
root@odroid:~#

error I'm getting

Imagine this is the missing config file?

BTW once this is working will write all the steps to help others in OP
Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: Filipp Sudanov on February 13, 2020, 05:39:48 PM
config file absence is not an issue yet - it's not able to find a .so library.

Try to create a file /etc/ld.so.conf.d/netxms.conf with the following contents:
/opt/netxms/lib/

Then run
ldconfig

This should add /opt/netxms/lib/ to the list of places where system searches for shared libraries.

Then attempt to launch nxagentd -D 6 should give something like this:
Configuration loading error: Could not process "/etc/nxagentd.conf"!
Error loading configuration from "/etc/nxagentd.conf" section CORE
Error loading configuration file


The next step is to create agent config file /etc/nxagentd.conf. The minimal config could be like this (replace the address in MasterServers to actual address of your NetXMS server):

LogFile = /var/log/nxagentd
DebugLevel = 2
MasterServers = 192.168.1.2

Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: aeonaura on February 13, 2020, 07:17:43 PM
Once I get home I'll try this out! Thanks so much.
Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: aeonaura on February 14, 2020, 01:27:55 AM
What I did:
touch /etc/ld.so.conf.d/netxms.conf
nano /etc/ld.so.conf.d/netxms.conf (added in /opt/netxms/lib/)
ldconfig

--here is the results--

/sbin/ldconfig.real: /usr/lib/arm-linux-gnueabihf/libavahi-common.so.3 is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/lib/arm-linux-gnueabihf/libavahi-common.so.3.5.3.dpkg-tmp is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/lib/arm-linux-gnueabihf/libavahi-common.so.3.5.3 is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/lib/arm-linux-gnueabihf/libavahi-common.so.3 is not a symbolic link

root@odroid:~/opt/netxms/lib#


What did I miss?



Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: Filipp Sudanov on February 14, 2020, 08:14:08 AM
ldconfig says that there's something wrong with files in /usr/lib/arm-linux-gnueabihf/ - but that's not related to netxms.
What about nxagentd - what happens if you try to start it?
Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: aeonaura on February 14, 2020, 09:12:22 AM
root@odroid:~# /opt/netxms/bin/nxagentd -D 6
-bash: /opt/netxms/bin/nxagentd: No such file or directory

then tried this

root@odroid:~# opt/netxms/bin/nxagentd -D 6
opt/netxms/bin/nxagentd: error while loading shared libraries: libappagent.so.31             : cannot open shared object file: No such file or directory
root@odroid:~#


see this in the folder
root@odroid:~# opt/netxms/bin/nx
nxagentd     nxapush      nxdevcfg     nxgenguid    nxmibc       nxsnmpset
nxappget     nxcsum       nxencpasswd  nxlptest     nxsnmpget    nxsnmpwalk



when Nano into: /etc/ld.so.conf.d/netxms.conf

  **GNU nano 2.9.3 /etc/ld.so.conf.d/netxms.conf**

/opt/netxms/lib/


Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: Borgso on February 14, 2020, 09:29:09 AM
You have the netxms dir in wrong path, move it from /root to /opt

mv /root/opt/netxms /opt/
Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: aeonaura on February 14, 2020, 04:16:11 PM
Thanks for pointing that out Borgso!

What do I need to change with this code. I believe this was my problem.
tar xvzf nxagent-3.1.343-linux-arm.tar.gz

Issue I see now
root@odroid:~# /opt/netxms/bin/nxagentd -D 6
/opt/netxms/bin/nxagentd: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by /opt/netxms/bin/nxagentd)
/opt/netxms/bin/nxagentd: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by /opt/netxms/lib/libnetxms.so.31)
root@odroid:~#

Added
touch /etc/ld.so.conf.d/netxms.conf
nano /etc/ld.so.conf.d/netxms.conf
entered:/opt/netxms/lib/ 

Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: aeonaura on February 15, 2020, 08:44:36 AM
Really close! Any help over the weekend?
Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: Borgso on February 15, 2020, 11:49:20 AM
Are you using Ubuntu or other apt distro?


Quoteapt-get update
apt-get install libc6
Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: aeonaura on February 15, 2020, 08:54:02 PM
Ubuntu

https://wiki.odroid.com/odroid-xu4/os_images/linux/ubuntu_4.14/ubuntu_4.14

Was using a minimal OS, maybe need to try the full one
Title: Re: NetXMS Agent on Odroid-HC2, level zero
Post by: Borgso on February 16, 2020, 01:29:32 AM
Did you try install libc6?

Should work with minimal, just need to install the missing library