NetXMS Agent on Odroid-HC2, level zero

Started by aeonaura, February 13, 2020, 04:38:31 PM

Previous topic - Next topic

aeonaura

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.

Filipp Sudanov

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.

aeonaura

#2
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?

aeonaura

#3
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

Filipp Sudanov

#4
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


aeonaura

Once I get home I'll try this out! Thanks so much.

aeonaura

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?




Filipp Sudanov

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?

aeonaura

#8
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/



Borgso

You have the netxms dir in wrong path, move it from /root to /opt

mv /root/opt/netxms /opt/

aeonaura

#10
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/ 


aeonaura

Really close! Any help over the weekend?

Borgso

Are you using Ubuntu or other apt distro?


Quoteapt-get update
apt-get install libc6


Borgso

Did you try install libc6?

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