Ad Widget

Collapse

Zabbix Server always stays offline

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Finstant
    Junior Member
    • Sep 2020
    • 3

    #1

    Zabbix Server always stays offline

    Hey,
    I have installed Zabbix for my Ubuntu 18.04 LTS 64bit V-Server with this installation guide.
    The Dashboard works totally fine but there is one problem.

    Click image for larger version

Name:	2020-09-16 15_22_02-V-Server_ Dashboard.png
Views:	766
Size:	16.1 KB
ID:	409202

    The Zabbix server always stays offline.

    I read this and this forum posts, but nothing helped for me.

    I have executed these commands more than 5 times:

    # systemctl restart zabbix-server zabbix-agent apache2
    # systemctl enable zabbix-server zabbix-agent apache2

    But the server stays offline.

    I checked my Log file in /var/log/zabbix/zabbix_server.log :

    Code:
    135457.885 Cannot connect to the database. Exiting...
    27957:20200916:135457.905 Starting Zabbix Server. Zabbix 5.0.3 (revision 146855bff3).
    27957:20200916:135457.905 ****** Enabled features ******
    27957:20200916:135457.905 SNMP monitoring: YES
    27957:20200916:135457.905 IPMI monitoring: YES
    27957:20200916:135457.905 Web monitoring: YES
    27957:20200916:135457.905 VMware monitoring: YES
    27957:20200916:135457.905 SMTP authentication: YES
    27957:20200916:135457.905 ODBC: YES
    27957:20200916:135457.905 SSH support: YES
    27957:20200916:135457.905 IPv6 support: YES
    27957:20200916:135457.905 TLS support: YES
    27957:20200916:135457.905 ******************************
    27957:20200916:135457.905 using configuration file: /etc/zabbix/zabbix_server.conf
    27957:20200916:135457.908 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
    27957:20200916:135457.908 database is down: reconnecting in 10 seconds
    and my config file /etc/zabbix/web/zabbix.conf.php :

    Code:
    <?php
    // Zabbix GUI configuration file.
    
    $DB['TYPE'] = 'MYSQL';
    $DB['SERVER'] = 'localhost';
    $DB['PORT'] = '0';
    $DB['DATABASE'] = 'zabbix';
    $DB['USER'] = 'zabbix';
    $DB['PASSWORD'] = '****';
    
    // Schema name. Used for PostgreSQL.
    $DB['SCHEMA'] = '';
    
    // Used for TLS connection.
    $DB['ENCRYPTION'] = false;
    $DB['KEY_FILE'] = '';
    $DB['CERT_FILE'] = '';
    $DB['CA_FILE'] = '';
    $DB['VERIFY_HOST'] = false;
    $DB['CIPHER_LIST'] = '';
    
    // Use IEEE754 compatible value range for 64-bit Numeric (float) history values.
    // This option is enabled by default for new Zabbix installations.
    // For upgraded installations, please read database upgrade notes before enabling this option.
    $DB['DOUBLE_IEEE754'] = true;
    
    $ZBX_SERVER = 'localhost';
    $ZBX_SERVER_PORT = '10051';
    $ZBX_SERVER_NAME = 'V-Server';
    
    $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
    
    // Uncomment this block only if you are using Elasticsearch.
    // Elasticsearch url (can be string if same url is used for all types).
    //$HISTORY['url'] = [
    // 'uint' => 'http://localhost:9200',
    // 'text' => 'http://localhost:9200'
    //];
    // Value types stored in Elasticsearch.
    //$HISTORY['types'] = ['uint', 'text'];
    
    // Used for SAML authentication.
    // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings.
    //$SSO['SP_KEY'] = 'conf/certs/sp.key';
    //$SSO['SP_CERT'] = 'conf/certs/sp.crt';
    //$SSO['IDP_CERT'] = 'conf/certs/idp.crt';
    //$SSO['SETTINGS'] = [];
    The password and all these things should be correct.

    I gave the mysql zabbix user all rights.

    I don't know how to solve this problem, so I ask fpr help.

    Thanks
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Originally posted by Finstant
    Hey,
    I have installed Zabbix for my Ubuntu 18.04 LTS 64bit V-Server with this installation guide.
    The Dashboard works totally fine but there is one problem.

    The Zabbix server always stays offline.

    I checked my Log file in /var/log/zabbix/zabbix_server.log :

    Code:
    135457.885 Cannot connect to the database. Exiting...
    27957:20200916:135457.905 Starting Zabbix Server. Zabbix 5.0.3 (revision 146855bff3).
    27957:20200916:135457.905 using configuration file: /etc/zabbix/zabbix_server.conf
    27957:20200916:135457.908 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
    27957:20200916:135457.908 database is down: reconnecting in 10 seconds
    and my config file /etc/zabbix/web/zabbix.conf.php :

    Code:
    <?php
    // Zabbix GUI configuration file.
    
    $DB['TYPE'] = 'MYSQL';
    $DB['SERVER'] = 'localhost';
    $DB['PORT'] = '0';
    $DB['DATABASE'] = 'zabbix';
    $DB['USER'] = 'zabbix';
    $DB['PASSWORD'] = '****';
    The password and all these things should be correct.
    The web front end uses the zabbix.conf.php file for its config, but the Zabbix server uses /etc/zabbix/zabbix_server.conf. Look in that file and find the several settings near the top related to the DB (DBName, DBuser, DBPassword, some others that you probably don't need to worry about). Make sure that the DBPassword setting matches whatever password you're using, and restart the zabbix-server.

    Comment

    • Finstant
      Junior Member
      • Sep 2020
      • 3

      #3
      Everything is right

      Comment

      Working...