Install problem on Ubuntu 16.04 - Fails at installation of MySQL driver

Started by efiniste, August 25, 2016, 07:08:50 PM

Previous topic - Next topic

efiniste

I get the following error when trying to install the mysql driver:

root@myserver:/home/myuser# apt-get install netxms-dbdrv-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
netxms-dbdrv-mysql : Depends: libmysqlclient18 (>= 5.5.24+dfsg-1) but it is not installable
E: Unable to correct problems, you have held broken packages.


I've tried installing libmysqlclient -dev (no change in the error message)
I've tried installing libmysqlclient20 (already installed)

Can anyone help please?


Thanks,

Steve

Victor Kirhenshtein

Hi,

Ubuntu 16 packages are broken - we will fix them in next few days.

Best regards,
Victor

efiniste


ricktendo

Don't know if this is related but I keep getting conflicts with sqlite and mysql, I specified mysql.ddr as the DBDriver in netxmsd.conf and I also ran "nxdbmgr init /usr/share/netxms/sql/dbinit_mysql.sql"

# tail /var/log/nxagentd.log
[11-Oct-2016 14:36:12.501] Log file opened (rotation policy 2, max size 4194304)
[11-Oct-2016 14:36:12.501] [DEBUG] Log rotation policy set to 2 (size=16777216, count=4)
[11-Oct-2016 14:36:12.501] [INFO ] Additional configs was loaded from /etc/nxagentd.conf.d
[11-Oct-2016 14:36:12.501] [INFO ] Debug level set to 0
[11-Oct-2016 14:36:12.504] [INFO ] DB Library: Database driver "sqlite.ddr" loaded and initialized successfully
[11-Oct-2016 14:36:13.523] [INFO ] Subagent "linux.nsm" loaded successfully
[11-Oct-2016 14:36:14.524] [INFO ] Listening on socket 0.0.0.0:4700
[11-Oct-2016 14:36:14.524] [INFO ] Listening on socket [::]:4700
[11-Oct-2016 14:36:15.525] [INFO ] NetXMS Agent started
[11-Oct-2016 14:47:21.642] [INFO ] NetXMS Agent stopped


# netxmsd
Using configuration file "/etc/netxmsd.conf"
[11-Oct-2016 14:53:56.859] [INFO ] Platform subagent "/usr/lib/x86_64-linux-gnu/netxms/linux.nsm" successfully loaded
[11-Oct-2016 14:53:56.860] [INFO ] Database driver "mysql.ddr" loaded and initialized successfully
[11-Oct-2016 14:53:56.903] [ERROR] Database is already locked by another NetXMS server instance (IP address: 2000:200:860f:a8c0:7bb4:8225:627f::, machine info: ubuntu Linux Release 4.4.0-42-generic)


I run the 'nxdbmgr check' command to unlock but after reboot it will lock up again

Victor Kirhenshtein

Hi,

it seems that on shutdown your database stopped faster than NetXMS server. If it is possible to make netxmsd service depends on mysqld service that should solve this issue.

Best regards,
Victor

ricktendo

Quote from: Victor Kirhenshtein on October 12, 2016, 10:04:20 AM
Hi,

it seems that on shutdown your database stopped faster than NetXMS server. If it is possible to make netxmsd service depends on mysqld service that should solve this issue.

Best regards,
Victor
How best to do this?

Alex Kirhenshtein

Looks like startup script is a bit incorrect.

Try to do following changes:

1) in stop section add "--retry 60" to start-stop-daemon:

stop)
        log_daemon_msg "Stopping NetXMS server" "netxmsd"
        start-stop-daemon --stop --quiet --pidfile $PIDFILE --retry 60
        log_end_msg $?


2) Add following section into /etc/init.d/netxmsd (just after #!/bin/sh):

### BEGIN INIT INFO
# Provides:          netxmsd
# Required-Start:    $remote_fs network nxagentd mysql
# Required-Stop:     $remote_fs mysql
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: NetXMS server initscript
# Description:       NetXMS server startup script
### END INIT INFO


After change is made - run "update-rc.d netxmsd defaults"