Poller can't connect to Database

Hello everyone,

We have a Main server in the USA and want to set up a poller in Europe.
I have run into some issues. Therewith I was not able to connect to the database in the USA.
So I made a lab environment in Europe. With the main server and a poller.
Here I run again in the same issue. Started over multiple times.

This is the output on the poller:

librenms@librenmspollereu:~$ ./validate.php

Component Version
LibreNMS 21.7.0-70-ge9c89b377
DB Schema Not Connected (0)
PHP 7.4.3
Python 3.8.10
MySQL ?
RRDTool 1.7.2
SNMP NET-SNMP 5.8

====================================

[OK] Composer Version: 2.1.5
[OK] Dependencies up-to-date.
Could not connect to database, check logs/librenms.log.

The thing is there are no logs to see in the mentioned directory.

.env=
PP_KEY=base64:****

DB_HOST=172.31.20.16
DB_DATABASE=librenms
DB_USERNAME=librenms
DB_PASSWORD=*********
DB_PORT=3306

REDIS_HOST=172.31.20.16
REDIS_DB=0

#APP_URL=
INSTALL=true
NODE_ID=**

SQL user-made like this, try’s different things with this until now just using % =

CREATE DATABASE librenms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER ‘librenms’@’%’ IDENTIFIED BY ‘********’;
GRANT ALL PRIVILEGES ON librenms.* TO ‘librenms’@’%’;
FLUSH PRIVILEGES;
exit

There was a moment I had issues cos the timezone on the main server and DB was not the same this has been resolved.

Main server config:

APP_KEY=********

DB_HOST=localhost
DB_DATABASE=librenms
DB_USERNAME=librenms
DB_PASSWORD=*********

Have a look in misc/config_definitions.json for examples of settings you can set here. DO NOT EDIT misc/config_defi>

// This is the user LibreNMS will run as
//Please ensure this user is created and has the correct permissions to your install
$config[‘user’] = ‘librenms’;

This should only be set if you want to force a particular hostname/port

It will prevent the web interface being usable form any other hostname

#$config[‘base_url’] = “/”;

Enable this to use rrdcached. Be sure rrd_dir is within the rrdcached dir

and that your web server has permission to talk to rrdcached.

#$config[‘rrdcached’] = “unix:/var/run/rrdcached.sock”;

$config[‘snmp’][‘community’] = array(‘public’);

Authentication Model

$config[‘auth_mechanism’] = “mysql”; # default, other options: ldap, http-auth
#$config[‘http_auth_guest’] = “guest”; # remember to configure this user if you use http-auth

List of RFC1918 networks to allow scanning-based discovery

#$config[‘nets’][] = “10.0.0.0/8”;
#$config[‘nets’][] = “172.16.0.0/12”;
#$config[‘nets’][] = “192.168.0.0/16”;

Uncomment the next line to disable daily updates

#$config[‘update’] = 0;

Number in days of how long to keep old rrd files. 0 disables this feature

$config[‘rrd_purge’] = 0;

Uncomment to submit callback stats via proxy

#$config[‘callback_proxy’] = “hostname:port”;

Set default port association mode for new devices (default: ifIndex)

#$config[‘default_port_association_mode’] = ‘ifIndex’;

Enable the in-built billing extension

$config[‘enable_billing’] = 1;

Enable the in-built services support (Nagios plugins)

$config[‘show_services’] = 1;

Enable distributed polling

$config[‘distributed_poller’] = true;
$config[‘distributed_poller_group’] = 0;
$config[‘distributed_poller_name’] = php_uname(‘n’);

Thanks in advance.
Steven

this has been solved

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.