Ad Widget

Collapse

sebbix_server cant reconnet to mysql ...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tnt
    Junior Member
    • Jul 2008
    • 15

    #1

    sebbix_server cant reconnet to mysql ...

    hi,
    i have zabbix on one pc and mysql on another pc.
    when i restart mysql, zabbix_server exiting with messages in log:

    Connection to database 'XXXX' failed: [2003] Can't connect to MySQL server on 'IP_ADDRESS' (111)
    20458:20090305:104708 One child process died. Exiting ...

    after restart mysql i can connect to mysql from zabbis_server PC with:
    Code:
     mysql -hIP -uUSER -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 6
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql>
    zabbix 1.6.2 from source

    can anyone help me please ?
    thanks.
  • Calimero
    Senior Member
    • Nov 2006
    • 481

    #2
    What DB* parameters do you use in zabbix_server.conf ?

    Comment

    • tnt
      Junior Member
      • Jul 2008
      • 15

      #3
      hi,
      Originally posted by Calimero
      What DB* parameters do you use in zabbix_server.conf ?
      Code:
      cat zabbix_server.conf  | grep DB
      
      DBHost=IP_address
      # SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
      DBName=db_name
      DBUser=db_user
      DBPassword=db_password
      #DBSocket=/tmp/mysql.sock
      hmm why zabbix_server dont reconnect?
      i read about this problem in forum, but this was in version about 1.1

      Comment

      • Calimero
        Senior Member
        • Nov 2006
        • 481

        #4
        Sorry I missed the fact that you restarted mysql in your first post.

        As far as I know, zabbix doesn't reconnect on database failure. There's a topic regarding zabbix_server' behaviour when "panicking"/crashing:

        Comment

        • nelsonab
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2006
          • 1233

          #5
          Reconnect on DB failure/restore should be expected behavior. Is there a bug for this?
          RHCE, author of zbxapi
          Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
          Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

          Comment

          • Calimero
            Senior Member
            • Nov 2006
            • 481

            #6
            Originally posted by nelsonab
            Reconnect on DB failure/restore should be expected behavior. Is there a bug for this?
            I don't know. See support.zabbix.com.

            As far as I know, the rationale behind this is that you should use an external system (shell script, heartbeat, ...) to check whether zabbix_server is running and respawning it if it's not.

            Comment

            Working...