Ad Widget

Collapse

Zabbix is not running on FrontEnd

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SwitchZabbix
    Junior Member
    • Dec 2015
    • 17

    #1

    Zabbix is not running on FrontEnd

    Hi,
    I have what seems a common problem but cannot find a solution.

    My setup is:
    Zabbix frontend server Ubuntu 18.04 Server - Zabbix 4.0.2
    Database is a Windows Server with MySQL
    Code:
    Server version: 8.0.11 - MySQL Community Server - GPL[LIST][*]Protocol version: 10[*]User: ZabbixDB@localhost[*]Server charset:  UTF-8 Unicode (utf8)[*]PHP version: 7.2.7[/LIST]
    I had followed this: https://www.zabbix.com/download?zabb...ionic&db=MySQL

    but with some changes: MySQL is on a remote server. So I did this command instead the one in the "standard setup"
    sudo zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uMyDBUser -p'<MyPass>' -h MySQL.MyDomain.My -P 3306 Zabbix

    The Zabbix database was created and schema populated.

    I was able to login to the Zabbix frontend with the admin user but I have the message "Zabbix is not running....".

    I then checked the Zabbix service status:

    Code:
    zabbix-server.service - Zabbix Server
       Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor preset: enabled)
       Active: active (running) since Thu 2018-11-29 14:55:42 UTC; 2s ago
      Process: 2324 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=0/SUCCESS)
      Process: 2325 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
     Main PID: 2337 (zabbix_server)
        Tasks: 1 (limit: 898)
       CGroup: /system.slice/zabbix-server.service
               ΓööΓöÇ2337 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
    
    Nov 29 14:55:42 lzabbix101 systemd[1]: zabbix-server.service: Main process exited, code=exited, status=1/FAILURE
    Nov 29 14:55:42 lzabbix101 systemd[1]: zabbix-server.service: Failed with result 'exit-code'.
    Nov 29 14:55:42 lzabbix101 systemd[1]: Stopped Zabbix Server.
    Nov 29 14:55:42 lzabbix101 systemd[1]: Starting Zabbix Server...
    Nov 29 14:55:42 lzabbix101 systemd[1]: zabbix-server.service: Can't open PID file /run/zabbix/zabbix_server.pid (yet?) after start: No such file or directory
    Nov 29 14:55:42 lzabbix101 systemd[1]: Started Zabbix Server.
    Checked the file
    Code:
    /run/zabbix/zabbix_server.pid
    2337
    The PID is the good PID and successfully change after a service restart

    Checked the rights: -rw-rw-rw- 1 zabbix zabbix 4 Nov 29 15:33 /run/zabbix/zabbix_server.pid

    Checked Telnet:
    telnet MyFrontend.MyDomain.My 10051
    Trying 999.999.999.999...
    telnet: Unable to connect to remote host: Connection refused


    DNS is well resolved.


    Code:
    /etc/zabbix/web/zabbix.conf.php
       global $DB;
    
    $DB['TYPE']     = 'MYSQL';
    $DB['SERVER']   = 'MySQL.MyDomain.My';
    $DB['PORT']     = '3306';
    $DB['DATABASE'] = 'zabbix';
    $DB['USER']     = 'MyDBUser';
    $DB['PASSWORD'] = 'MyPass';
    
    $ZBX_SERVER      = 'MyFrontend.MyDomain.My';
    $ZBX_SERVER_PORT = '10051';
    $ZBX_SERVER_NAME = 'Zabbix for My';
    And finally

    Code:
    /etc/zabbix/zabbix_server.conf
    
    DBHost=[COLOR=#252C2F][FONT=Open Sans][SIZE=13px]MySQL.MyDomain.My[/SIZE][/FONT][/COLOR]
    DBUser=MyDBUser
    DBPassword=MyPass
    DBPort=3306
    I am running out of idea... Do you see where I am wrong?

    Last edited by SwitchZabbix; 29-11-2018, 18:07.
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    Do you have some security enhancer enabled, e. g. SELinux? In that case you might need to add it's rules to allow Zabbix communication.

    Comment

    • SwitchZabbix
      Junior Member
      • Dec 2015
      • 17

      #3
      SELinux is not installed on Ubuntu server. But AppArmor is active. I was not able to find an AppArmor profile for Zabbix server. I tried to disable AppArmor and test the frontend without success. I tried to restart the service with AppArmor disabled and test frontend without success. I did not test to disable AppArmor then reboot.

      Comment

      • SwitchZabbix
        Junior Member
        • Dec 2015
        • 17

        #4
        Just tried to disable AppArmor and restart:
        service --status-all
        [ - ] apparmor
        ...
        [ + ] zabbix-agent
        [ + ] zabbix-server

        Same result. Unfortunately

        Comment

        • SwitchZabbix
          Junior Member
          • Dec 2015
          • 17

          #5
          Resolved, seems to be a corrupted Zabbix_server.conf file. I took a virgin conf file, changed parameters and start services then all run like a charm... Thank for your help

          Comment


          • amonroe
            amonroe commented
            Editing a comment
            How did you know that it was corrupt? I'm experiencing the same issue.

          • acatic1
            acatic1 commented
            Editing a comment
            I might have the same issue. Fresh build of v5 with mysql/apache on centos8. Went through the whole setup guide, everything looked good, zabbix service running. I can't get the homepage to load! Server connectivity fine otherwise.
        • dimir
          Zabbix developer
          • Apr 2011
          • 1080

          #6
          No problem! Good luck!

          Comment

          Working...