Ad Widget

Collapse

Frontend error 404

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #16
    2880:20160525:112849.671 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
    Perhaps, You must set password into /etc/zabbix/zabbix_server.conf for MySQL access.
    Please check value of DBPassword.

    Comment

    • Xyue
      Member
      • Jan 2016
      • 93

      #17
      Hi Atsushi,

      I tried to change zabbix-server.conf DBHost from 'localhost' to '10.4.2.239' and based on the zabbix log file, it seems works.

      zabbix-server log
      3712:20160525:130438.877 using configuration file: /etc/zabbix/zabbix_server.conf
      3712:20160525:130438.886 current database version (mandatory/optional): 03000000/03000000
      3712:20160525:130438.886 required mandatory version: 03000000
      3712:20160525:130438.905 server #0 started [main process]
      3714:20160525:130438.905 server #1 started [configuration syncer #1]
      3715:20160525:130438.906 server #2 started [db watchdog #1]
      3716:20160525:130438.906 server #3 started [poller #1]
      3717:20160525:130438.906 server #4 started [poller #2]
      3718:20160525:130438.907 server #5 started [poller #3]
      3723:20160525:130438.914 server #10 started [trapper #2]
      3722:20160525:130438.915 server #9 started [trapper #1]
      3724:20160525:130438.916 server #11 started [trapper #3]
      3727:20160525:130438.919 server #14 started [icmp pinger #1]
      3719:20160525:130438.919 server #6 started [poller #4]
      3726:20160525:130438.920 server #13 started [trapper #5]
      3730:20160525:130438.923 server #17 started [timer #1]
      3721:20160525:130438.923 server #8 started [unreachable poller #1]
      3725:20160525:130438.928 server #12 started [trapper #4]
      3729:20160525:130438.932 server #16 started [housekeeper #1]
      3733:20160525:130438.932 server #20 started [history syncer #1]
      3737:20160525:130438.932 server #24 started [escalator #1]
      3720:20160525:130438.932 server #7 started [poller #5]
      3731:20160525:130438.933 server #18 started [http poller #1]
      3734:20160525:130438.933 server #21 started [history syncer #2]
      3736:20160525:130438.933 server #23 started [history syncer #4]
      3738:20160525:130438.934 server #25 started [proxy poller #1]
      3735:20160525:130438.934 server #22 started [history syncer #3]
      3728:20160525:130438.934 server #15 started [alerter #1]
      3739:20160525:130438.935 server #26 started [self-monitoring #1]
      3732:20160525:130439.015 server #19 started [discoverer #1]

      I also tried remote login to database server and it works too.

      [root@localhost ~]# mysql -u zabbix -p -h 10.4.2.239 zabbix
      Enter password:
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      mysql>


      From database side, I have open port 3306 for incoming and outgoing packet.

      Based on the tcpdump, i can see packet coming in and going out.

      tcpdump on port 3306
      [root@localhost ~]# tcpdump port 3306
      tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
      listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
      13:25:26.253783 IP 10.4.2.238.48276 > 10.4.2.239.mysql: Flags [P.], seq 1306007774:1306007961, ack 2890230312, win 501, options [nop,nop,TS val 12704905 ecr 76133306], length 187
      13:25:26.254216 IP 10.4.2.239.mysql > 10.4.2.238.48276: Flags [P.], seq 1:658, ack 187, win 997, options [nop,nop,TS val 76136308 ecr 12704905], length 657
      13:25:26.254606 IP 10.4.2.238.48276 > 10.4.2.239.mysql: Flags [.], ack 658, win 501, options [nop,nop,TS val 12704907 ecr 76136308], length 0
      13:25:26.254650 IP 10.4.2.238.48276 > 10.4.2.239.mysql: Flags [P.], seq 187:371, ack 658, win 501, options [nop,nop,TS val 12704907 ecr 76136308], length 184
      13:25:26.254957 IP 10.4.2.239.mysql > 10.4.2.238.48276: Flags [P.], seq 658:1315, ack 371, win 997, options [nop,nop,TS val 76136308 ecr 12704907], length 657
      13:25:26.255232 IP 10.4.2.238.48276 > 10.4.2.239.mysql: Flags [P.], seq 371:573, ack 1315, win 501, options [nop,nop,TS val 12704907 ecr 76136308], length 202
      13:25:26.255469 IP 10.4.2.239.mysql > 10.4.2.238.48276: Flags [P.], seq 1315:1972, ack 573, win 997, options [nop,nop,TS val 76136309 ecr 12704907], length 657
      13:25:26.295759 IP 10.4.2.238.48276 > 10.4.2.239.mysql: Flags [.], ack 1972, win 501, options [nop,nop,TS val 12704948 ecr 76136309], length 0

      However, from the frontend, it stil shows server not running. I go through mysql.log and it shows me ip address could not resolve. Possible this is the one which cause the server not running ? If not, do you have any idea what else steps i might missed ?

      mysqld log
      2016-05-25 13:02:55 2750 [Note] InnoDB: Completed initialization of buffer pool
      2016-05-25 13:02:55 2750 [Note] InnoDB: Highest supported file format is Barracuda.
      2016-05-25 13:02:55 2750 [Note] InnoDB: 128 rollback segment(s) are active.
      2016-05-25 13:02:55 2750 [Note] InnoDB: Waiting for purge to start
      2016-05-25 13:02:55 2750 [Note] InnoDB: 5.6.30 started; log sequence number 10468682
      2016-05-25 13:02:55 2750 [Note] Server hostname (bind-address): '*'; port: 3306
      2016-05-25 13:02:55 2750 [Note] IPv6 is available.
      2016-05-25 13:02:55 2750 [Note] - '::' resolves to '::';
      2016-05-25 13:02:55 2750 [Note] Server socket created on IP: '::'.
      2016-05-25 13:02:55 2750 [Note] Event Scheduler: Loaded 0 events
      2016-05-25 13:02:55 2750 [Note] /usr/sbin/mysqld: ready for connections.
      Version: '5.6.30' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
      2016-05-25 13:02:55 2750 [Warning] IP address '10.4.2.238' could not be resolved: Name or service not known

      Appreciate your help and thank you very much.

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #18
        However, from the frontend, it stil shows server not running.
        If you are SELinux disabled already, Please check iptables settings.

        Comment

        • Xyue
          Member
          • Jan 2016
          • 93

          #19
          Hi Atsushi,

          Already checked iptables. Port 10051 and 10050 has been allowed

          [root@localhost sysconfig]# iptables -S
          -P INPUT ACCEPT
          -P FORWARD ACCEPT
          -P OUTPUT ACCEPT
          -A INPUT -p tcp -m state --state NEW -m tcp --dport 10051 -j ACCEPT
          -A INPUT -p tcp -m state --state NEW -m tcp --dport 3389 -j ACCEPT
          -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
          -A INPUT -s 10.0.0.0/8 -p tcp -m tcp --dport 22 -j ACCEPT
          -A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
          -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
          -A INPUT -p icmp -j ACCEPT
          -A INPUT -i lo -j ACCEPT
          -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
          -A INPUT -j REJECT --reject-with icmp-host-prohibited
          -A INPUT -p tcp -m state --state NEW -m tcp --dport 10050 -j ACCEPT
          -A FORWARD -j REJECT --reject-with icmp-host-prohibited
          -A OUTPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
          [root@localhost sysconfig]#

          Also tried restart iptables and zabbix-server few times but from frontend shows still not running.

          [root@localhost sysconfig]# service zabbix-server status
          zabbix_server (pid 4832) is running...

          [root@localhost sysconfig]# cat /etc/services | grep 10051
          zabbix-trapper 10051/tcp # Zabbix Trapper
          zabbix-trapper 10051/udp # Zabbix Trapper

          [root@localhost sysconfig]# cat /etc/services | grep 1005
          zabbix-agent 10050/tcp # Zabbix Agent
          zabbix-agent 10050/udp # Zabbix Agent
          zabbix-trapper 10051/tcp # Zabbix Trapper
          zabbix-trapper 10051/udp # Zabbix Trapper

          [root@localhost sysconfig]# netstat -tulpn | grep zabbix
          tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 4832/zabbix_server
          tcp 0 0 :::10051 :::* LISTEN 4832/zabbix_server

          [root@localhost sysconfig]# netstat -tulpn | grep zab
          tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 4832/zabbix_server
          tcp 0 0 :::10051 :::* LISTEN 4832/zabbix_server

          [root@localhost sysconfig]# cat /etc/sysconfig/iptables | grep 10051
          -A INPUT -p tcp -m state --state NEW -m tcp --dport 10051 -j ACCEPT
          Last edited by Xyue; 25-05-2016, 08:21.

          Comment

          • Atsushi
            Senior Member
            • Aug 2013
            • 2028

            #20
            What is the value of the $ZBX_SERVER in /etc/zabbix/web/zabbix.conf.php?

            If you were not set localhost, please try to set as follows.

            Code:
            $ZBX_SERVER      = 'localhost';
            You need set $ZBX_SERVER to specify the IP or host name that you want to use to access the zabbix_server process from httpd process.
            There is a case where the global IP is not available.
            You can use specify the IP which can be listed by ifconfig.

            Comment

            • Xyue
              Member
              • Jan 2016
              • 93

              #21
              Hi Atsushi,

              Yeah, you are right. I set it to the server's hostname and it seems unable to resolve. After i change it back to 'localhost' and restart the service, it is working fine now.

              Thank you very much for your help on these two days. Really appreciate you help and guidance.

              Comment

              • mohd.S.H
                Junior Member
                • Jul 2020
                • 2

                #22
                i have same issue that you have it.

                Comment

                • blackiytos
                  Junior Member
                  • Jul 2020
                  • 2

                  #23
                  Are you installed packages for Web frontend?
                  snaptube vidmate word to pdf
                  Last edited by blackiytos; 14-07-2020, 22:20.

                  Comment

                  Working...