Mysql and Ispconfig 3 bakend can't login and connect

Discussion in 'Installation/Configuration' started by anthonywang, Sep 28, 2015.

  1. anthonywang

    anthonywang Member

    Hi there,
    since last week i install ispconfig3,
    Mysql sometimes suddenly stop approximately every 10 minutes,
    and when mysql stop running,i cann't login to isp bakend,password is correct but system show it's incorrect,
    I already tried find any solution over than 8 days for fix this,but no luck,
    please help,many thanks!

    here is hosts
    =========================================================================================
    127.0.0.1 127.0.0.1 localhost
    127.0.1.1 server.example.com example

    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    =========================================================================================
     
  2. anthonywang

    anthonywang Member

    here is my.cnf
    ==========================================================================================
    #
    # The MySQL database server configuration file.
    #
    # You can copy this to one of:
    # - "/etc/mysql/my.cnf" to set global options,
    # - "~/.my.cnf" to set user-specific options.
    #
    # One can use all long options that the program supports.
    # Run program with --help to get a list of available options and with
    # --print-defaults to see which it would actually understand and use.
    #
    # For explanations see
    # http://dev.mysql.com/doc/mysql/en/server-system-variables.html

    # This will be passed to all mysql clients
    # It has been reported that passwords should be enclosed with ticks/quotes
    # escpecially if they contain "#" chars...
    # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
    [client]
    port = 3306
    socket = /var/run/mysqld/mysqld.sock

    # Here is entries for some specific programs
    # The following values assume you have at least 32M ram

    # This was formally known as [safe_mysqld]. Both versions are currently parsed.
    [mysqld_safe]
    socket = /var/run/mysqld/mysqld.sock
    nice = 0

    [mysqld]
    #
    # * Basic Settings
    #
    user = mysql
    pid-file = /var/run/mysqld/mysqld.pid
    socket = /var/run/mysqld/mysqld.sock
    port = 3306
    basedir = /usr
    datadir = /var/lib/mysql
    tmpdir = /tmp
    lc-messages-dir = /usr/share/mysql
    skip-external-locking
    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.

    # bind-address = 127.0.0.1

    #
    # * Fine Tuning
    #
    key_buffer = 16M
    max_allowed_packet = 16M
    thread_stack = 192K
    thread_cache_size = 8
    # This replaces the startup script and checks MyISAM tables if needed
    # the first time they are touched
    myisam-recover-options = BACKUP
    #max_connections = 100
    #table_cache = 64
    #thread_concurrency = 10
    #
    # * Query Cache Configuration
    #
    query_cache_limit = 1M
    query_cache_size = 16M

    ==========================================================================================
     
  3. anthonywang

    anthonywang Member

    Here is my error.log
    ==========================================================================================

    2015-09-28 10:24:02 13230 [Note] Plugin 'FEDERATED' is disabled.
    2015-09-28 10:24:02 13230 [ERROR] Function 'innodb' already exists
    2015-09-28 10:24:02 13230 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'.
    2015-09-28 10:24:02 13230 [ERROR] Function 'federated' already exists
    2015-09-28 10:24:02 13230 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'.
    2015-09-28 10:24:02 13230 [ERROR] Function 'blackhole' already exists
    2015-09-28 10:24:02 13230 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'.
    2015-09-28 10:24:02 13230 [ERROR] Function 'archive' already exists
    2015-09-28 10:24:02 13230 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'.
    2015-09-28 10:24:02 13230 [Note] InnoDB: Using atomics to ref count buffer pool pages
    2015-09-28 10:24:02 13230 [Note] InnoDB: The InnoDB memory heap is disabled
    2015-09-28 10:24:02 13230 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2015-09-28 10:24:02 13230 [Note] InnoDB: Memory barrier is not used
    2015-09-28 10:24:02 13230 [Note] InnoDB: Compressed tables use zlib 1.2.7
    2015-09-28 10:24:02 13230 [Note] InnoDB: Using Linux native AIO
    2015-09-28 10:24:02 13230 [Note] InnoDB: Not using CPU crc32 instructions
    2015-09-28 10:24:02 13230 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2015-09-28 10:24:02 13230 [Note] InnoDB: Completed initialization of buffer pool
    2015-09-28 10:24:02 13230 [Note] InnoDB: Highest supported file format is Barracuda.
    2015-09-28 10:24:02 13230 [Note] InnoDB: The log sequence numbers 1626213 and 1626213 in ibdata files do not match the log sequence number 1626253 in the ib_logfiles!
    2015-09-28 10:24:02 13230 [Note] InnoDB: Database was not shutdown normally!
    2015-09-28 10:24:02 13230 [Note] InnoDB: Starting crash recovery.
    2015-09-28 10:24:02 13230 [Note] InnoDB: Reading tablespace information from the .ibd files...
    2015-09-28 10:24:02 13230 [Note] InnoDB: Restoring possible half-written data pages
    2015-09-28 10:24:02 13230 [Note] InnoDB: from the doublewrite buffer...
    2015-09-28 10:24:02 13230 [Note] InnoDB: 128 rollback segment(s) are active.
    2015-09-28 10:24:02 13230 [Note] InnoDB: Waiting for purge to start
    2015-09-28 10:24:02 13230 [Note] InnoDB: 5.6.25 started; log sequence number 1626253
    2015-09-28 10:24:02 13230 [Note] Server hostname (bind-address): '*'; port: 3306
    2015-09-28 10:24:02 13230 [Note] IPv6 is available.
    2015-09-28 10:24:02 13230 [Note] - '::' resolves to '::';
    2015-09-28 10:24:02 13230 [Note] Server socket created on IP: '::'.
    2015-09-28 10:24:02 13230 [Note] Event Scheduler: Loaded 0 events
    2015-09-28 10:24:02 13230 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.6.25-1~dotdeb+7.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Debian)
    2015-09-28 10:24:02 13230 [ERROR] /usr/sbin/mysqld: Table './dbispconfig/sys_log' is marked as crashed and should be repaired
    2015-09-28 10:24:02 13230 [Warning] Checking table: './dbispconfig/sys_log'
    2015-09-28 10:24:03 13230 [ERROR] /usr/sbin/mysqld: Table './dbispconfig/monitor_data' is marked as crashed and should be repaired
    2015-09-28 10:24:03 13230 [Warning] Checking table: './dbispconfig/monitor_data'
    2015-09-28 10:24:03 13230 [ERROR] /usr/sbin/mysqld: Table './dbispconfig/sys_session' is marked as crashed and should be repaired
    2015-09-28 10:24:03 13230 [Warning] Checking table: './dbispconfig/sys_session'
    2015-09-28 10:28:48 13230 [Note] /usr/sbin/mysqld: Normal shutdown

    2015-09-28 10:28:48 13230 [Note] Giving 1 client threads a chance to die gracefully
    2015-09-28 10:28:48 13230 [Note] Event Scheduler: Purging the queue. 0 events
    2015-09-28 10:28:48 13230 [Note] Shutting down slave threads
    2015-09-28 10:28:50 13230 [Note] Forcefully disconnecting 1 remaining clients
    2015-09-28 10:28:50 13230 [Warning] /usr/sbin/mysqld: Forcing close of thread 3 user: 'ispconfig'

    2015-09-28 10:28:50 13230 [Note] Binlog end
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'partition'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'BLACKHOLE'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'ARCHIVE'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_FT_DELETED'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_METRICS'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_CMPMEM'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_CMP_RESET'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_CMP'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_LOCKS'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'INNODB_TRX'
    2015-09-28 10:28:50 13230 [Note] Shutting down plugin 'InnoDB'
    2015-09-28 10:28:50 13230 [Note] InnoDB: FTS optimize thread exiting.
    2015-09-28 10:28:50 13230 [Note] InnoDB: Starting shutdown...
    2015-09-28 10:28:51 13230 [Note] InnoDB: Shutdown completed; log sequence number 1626263
    2015-09-28 10:28:51 13230 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
    2015-09-28 10:28:51 13230 [Note] Shutting down plugin 'MRG_MYISAM'
    2015-09-28 10:28:51 13230 [Note] Shutting down plugin 'CSV'
    2015-09-28 10:28:51 13230 [Note] Shutting down plugin 'MEMORY'
    2015-09-28 10:28:51 13230 [Note] Shutting down plugin 'MyISAM'
    2015-09-28 10:28:51 13230 [Note] Shutting down plugin 'sha256_password'
    2015-09-28 10:28:51 13230 [Note] Shutting down plugin 'mysql_old_password'
    2015-09-28 10:28:51 13230 [Note] Shutting down plugin 'mysql_native_password'
    2015-09-28 10:28:51 13230 [Note] Shutting down plugin 'binlog'
    2015-09-28 10:28:51 13230 [Note] /usr/sbin/mysqld: Shutdown complete

    150928 10:28:51 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
    =======================================================================================
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Login to phpmyadmin, go to the dbispconfig database. select all tables and choose repair.
     
  5. anthonywang

    anthonywang Member

    thanks for quick help,
    I have used the repair,but now ispconfig still have same problem,
    my password is correct,but system show it's incorrect,
    then i check mysql,the port closed

    root@server:~# nmap -p 3306 localhost
    Starting Nmap 6.00 ( http://nmap.org ) at 2015-09-28 17:25 UTC
    Nmap scan report for localhost (127.0.0.1)
    Host is up (0.00016s latency).
    rDNS record for 127.0.0.1: 127.0.0.1
    PORT STATE SERVICE
    3306/tcp closed mysql
    Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
     
  6. anthonywang

    anthonywang Member

    error.log
    ================================================================================
    Code:
    150928 10:28:51 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
    150928 10:37:51 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    2015-09-28 10:37:51 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
    2015-09-28 10:37:51 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2015-09-28 10:37:51 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25-1~dotdeb+7.1) starting as process 15346 ...
    2015-09-28 10:37:51 15346 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)
    
    2015-09-28 10:37:51 15346 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)
    
    2015-09-28 10:37:51 15346 [Note] Plugin 'FEDERATED' is disabled.
    2015-09-28 10:37:51 15346 [ERROR] Function 'innodb' already exists
    2015-09-28 10:37:51 15346 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'.
    2015-09-28 10:37:51 15346 [ERROR] Function 'federated' already exists
    2015-09-28 10:37:51 15346 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'.
    2015-09-28 10:37:51 15346 [ERROR] Function 'blackhole' already exists
    2015-09-28 10:37:51 15346 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'.
    2015-09-28 10:37:51 15346 [ERROR] Function 'archive' already exists
    2015-09-28 10:37:51 15346 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'.
    2015-09-28 10:37:51 15346 [Note] InnoDB: Using atomics to ref count buffer pool pages
    2015-09-28 10:37:51 15346 [Note] InnoDB: The InnoDB memory heap is disabled
    2015-09-28 10:37:51 15346 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2015-09-28 10:37:51 15346 [Note] InnoDB: Memory barrier is not used
    2015-09-28 10:37:51 15346 [Note] InnoDB: Compressed tables use zlib 1.2.7
    2015-09-28 10:37:51 15346 [Note] InnoDB: Using Linux native AIO
    2015-09-28 10:37:51 15346 [Note] InnoDB: Not using CPU crc32 instructions
    2015-09-28 10:37:51 15346 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2015-09-28 10:37:51 15346 [Note] InnoDB: Completed initialization of buffer pool
    2015-09-28 10:37:51 15346 [Note] InnoDB: Highest supported file format is Barracuda.
    2015-09-28 10:37:51 15346 [Note] InnoDB: 128 rollback segment(s) are active.
    2015-09-28 10:37:51 15346 [Note] InnoDB: Waiting for purge to start
    2015-09-28 10:37:51 15346 [Note] InnoDB: 5.6.25 started; log sequence number 1626263
    2015-09-28 10:37:51 15346 [Note] Server hostname (bind-address): '*'; port: 3306
    2015-09-28 10:37:51 15346 [Note] IPv6 is available.
    2015-09-28 10:37:51 15346 [Note]   - '::' resolves to '::';
    2015-09-28 10:37:51 15346 [Note] Server socket created on IP: '::'.
    2015-09-28 10:37:51 15346 [Note] Event Scheduler: Loaded 0 events
    2015-09-28 10:37:51 15346 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.6.25-1~dotdeb+7.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
    150928 11:31:20 mysqld_safe Number of processes running now: 0
    150928 11:31:20 mysqld_safe mysqld restarted
    2015-09-28 11:31:21 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
    2015-09-28 11:31:21 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2015-09-28 11:31:21 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25-1~dotdeb+7.1) starting as process 16896 ...
    2015-09-28 11:31:21 16896 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)
    
    2015-09-28 11:31:21 16896 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)
    
    2015-09-28 11:31:21 16896 [Note] Plugin 'FEDERATED' is disabled.
    2015-09-28 11:31:21 16896 [ERROR] Function 'innodb' already exists
    2015-09-28 11:31:21 16896 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'.
    2015-09-28 11:31:21 16896 [ERROR] Function 'federated' already exists
    2015-09-28 11:31:21 16896 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'.
    2015-09-28 11:31:21 16896 [ERROR] Function 'blackhole' already exists
    2015-09-28 11:31:21 16896 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'.
    2015-09-28 11:31:21 16896 [ERROR] Function 'archive' already exists
    2015-09-28 11:31:21 16896 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'.
    2015-09-28 11:31:21 16896 [Note] InnoDB: Using atomics to ref count buffer pool pages
    2015-09-28 11:31:21 16896 [Note] InnoDB: The InnoDB memory heap is disabled
    2015-09-28 11:31:21 16896 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2015-09-28 11:31:21 16896 [Note] InnoDB: Memory barrier is not used
    2015-09-28 11:31:21 16896 [Note] InnoDB: Compressed tables use zlib 1.2.7
    2015-09-28 11:31:21 16896 [Note] InnoDB: Using Linux native AIO
    2015-09-28 11:31:21 16896 [Note] InnoDB: Not using CPU crc32 instructions
    2015-09-28 11:31:21 16896 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    InnoDB: mmap(136019968 bytes) failed; errno 12
    2015-09-28 11:31:21 16896 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
    2015-09-28 11:31:21 16896 [ERROR] Plugin 'InnoDB' init function returned error.
    2015-09-28 11:31:21 16896 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2015-09-28 11:31:21 16896 [ERROR] Unknown/unsupported storage engine: InnoDB
    2015-09-28 11:31:21 16896 [ERROR] Aborting
    
    2015-09-28 11:31:21 16896 [Note] Binlog end
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'partition'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'BLACKHOLE'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'ARCHIVE'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_FT_DELETED'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_METRICS'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_CMPMEM'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_CMP_RESET'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_CMP'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_LOCKS'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'INNODB_TRX'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'MRG_MYISAM'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'CSV'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'MEMORY'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'MyISAM'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'sha256_password'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'mysql_old_password'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'mysql_native_password'
    2015-09-28 11:31:21 16896 [Note] Shutting down plugin 'binlog'
    2015-09-28 11:31:21 16896 [Note] /usr/sbin/mysqld: Shutdown complete
    
     
    Last edited: Sep 28, 2015
  7. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    InnoDB: mmap(136019968 bytes) failed; errno 12

    Increase the RAM or reduce innodb_buffer_pool_size in your my.cnf
     
  8. anthonywang

    anthonywang Member

    thank you for reply,
    when i add this line "innodb_buffer_pool_size = 1G" to /etc/mysql/my.cnf
    i can't login to phpmyadmin
    here is my.cnf
    Code:
    #
    # The MySQL database server configuration file.
    #
    # You can copy this to one of:
    # - "/etc/mysql/my.cnf" to set global options,
    # - "~/.my.cnf" to set user-specific options.
    #
    # One can use all long options that the program supports.
    # Run program with --help to get a list of available options and with
    # --print-defaults to see which it would actually understand and use.
    #
    # For explanations see
    # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
    
    # This will be passed to all mysql clients
    # It has been reported that passwords should be enclosed with ticks/quotes
    # escpecially if they contain "#" chars...
    # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
    [client]
    port        = 3306
    socket        = /var/run/mysqld/mysqld.sock
    
    # Here is entries for some specific programs
    # The following values assume you have at least 32M ram
    
    # This was formally known as [safe_mysqld]. Both versions are currently parsed.
    [mysqld_safe]
    socket        = /var/run/mysqld/mysqld.sock
    nice        = 0
    
    [mysqld]
    #
    # * Basic Settings
    #
    user        = mysql
    pid-file    = /var/run/mysqld/mysqld.pid
    socket        = /var/run/mysqld/mysqld.sock
    port        = 3306
    basedir        = /usr
    datadir        = /var/lib/mysql
    tmpdir        = /tmp
    lc-messages-dir    = /usr/share/mysql
    skip-external-locking
    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    
    # bind-address        = 127.0.0.1
    
    #
    # * Fine Tuning
    #
    key_buffer        = 16M
    max_allowed_packet    = 16M
    thread_stack        = 192K
    thread_cache_size       = 8
    # This replaces the startup script and checks MyISAM tables if needed
    # the first time they are touched
    myisam-recover-options  = BACKUP
    #max_connections        = 100
    #table_cache            = 64
    #thread_concurrency     = 10
    #
    # * Query Cache Configuration
    #
    query_cache_limit    = 1M
    query_cache_size        = 16M
    #
    # * Logging and Replication
    #
    # Both location gets rotated by the cronjob.
    # Be aware that this log type is a performance killer.
    # As of 5.1 you can enable the log at runtime!
    #general_log_file        = /var/log/mysql/mysql.log
    #general_log             = 1
    #
    # Error log - should be very few entries.
    #
    log_error = /var/log/mysql/error.log
    #
    # Here you can see queries with especially long duration
    #slow_query_log = 1
    #slow_query_log_file = /var/log/mysql/mysql-slow.log
    #long_query_time = 2
    #log-queries-not-using-indexes
    #
    # The following can be used as easy to replay backup logs or for replication.
    # note: if you are setting up a replication slave, see README.Debian about
    #       other settings you may need to change.
    #server-id        = 1
    #log_bin            = /var/log/mysql/mysql-bin.log
    expire_logs_days    = 10
    max_binlog_size         = 100M
    
    
    innodb_buffer_pool_size = 1G // I Add to here
    
    
    #binlog_do_db        = include_database_name
    #binlog_ignore_db    = include_database_name
    #
    # * InnoDB
    #
    # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
    # Read the manual for more InnoDB related options. There are many!
    #
    # * Security Features
    #
    # Read the manual, too, if you want chroot!
    # chroot = /var/lib/mysql/
    #
    # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
    #
    # ssl-ca=/etc/mysql/cacert.pem
    # ssl-cert=/etc/mysql/server-cert.pem
    # ssl-key=/etc/mysql/server-key.pem
    
    
    
    [mysqldump]
    quick
    quote-names
    max_allowed_packet    = 16M
    
    [mysql]
    #no-auto-rehash    # faster start of mysql but no tab completition
    
    [isamchk]
    key_buffer        = 16M
    
    #
    # * IMPORTANT: Additional settings that can override those from this file!
    #   The files must end with '.cnf', otherwise they'll be ignored.
    #
    !includedir /etc/mysql/conf.d/
    
    [code]
     
    Last edited: Sep 28, 2015
  9. cbj4074

    cbj4074 Member

    "I can't log into phpmyadmin" doesn't tell us anything. We need to know the specific nature of the failure. Try connecting to MySQL directly, from the terminal.

    Florian said to reduce the "innodb_buffer_pool_size" value. It looks like you were using the default value of 128M previously, and you increased the value to 1GB. You seem to be exhausting all available memory on this system.

    What is the output of "free -m" on this system?

    Try setting that value to 64M and restart MySQL. Then try connecting to MySQL via the terminal, provided it starts, and report any specific error messages.
     
  10. anthonywang

    anthonywang Member

    thanks for your reply,
    not phpmyadmin can't login,also Mysql and Ispconfig backend.
    root@server:~# free -m
    total used free shared buffers cached
    Mem: 502 496 5 0 5 289
    -/+ buffers/cache: 201 300
    Swap: 0 0 0
     
    Last edited: Sep 28, 2015
  11. anthonywang

    anthonywang Member

    now,Mysql can't connect again,and Ispconfig backend login still same problem,
    i did repair dbispconfig database b4,but seems like problem happen again,

    service mysql restart,and new error.log:
    Code:
    
    2015-09-28 20:46:14 18689 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)
    
    2015-09-28 20:46:14 18689 [Note] Plugin 'FEDERATED' is disabled.
    2015-09-28 20:46:14 18689 [ERROR] Function 'innodb' already exists
    2015-09-28 20:46:14 18689 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'.
    2015-09-28 20:46:14 18689 [ERROR] Function 'federated' already exists
    2015-09-28 20:46:14 18689 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'.
    2015-09-28 20:46:14 18689 [ERROR] Function 'blackhole' already exists
    2015-09-28 20:46:14 18689 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'.
    2015-09-28 20:46:14 18689 [ERROR] Function 'archive' already exists
    2015-09-28 20:46:14 18689 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'.
    2015-09-28 20:46:14 18689 [Note] InnoDB: Using atomics to ref count buffer pool pages
    2015-09-28 20:46:14 18689 [Note] InnoDB: The InnoDB memory heap is disabled
    2015-09-28 20:46:14 18689 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2015-09-28 20:46:14 18689 [Note] InnoDB: Memory barrier is not used
    2015-09-28 20:46:14 18689 [Note] InnoDB: Compressed tables use zlib 1.2.7
    2015-09-28 20:46:14 18689 [Note] InnoDB: Using Linux native AIO
    2015-09-28 20:46:14 18689 [Note] InnoDB: Not using CPU crc32 instructions
    2015-09-28 20:46:14 18689 [Note] InnoDB: Initializing buffer pool, size = 64.0M
    InnoDB: mmap(68009984 bytes) failed; errno 12
    2015-09-28 20:46:14 18689 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
    2015-09-28 20:46:14 18689 [ERROR] Plugin 'InnoDB' init function returned error.
    2015-09-28 20:46:14 18689 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2015-09-28 20:46:14 18689 [ERROR] Unknown/unsupported storage engine: InnoDB
    2015-09-28 20:46:14 18689 [ERROR] Aborting
    
    2015-09-28 20:46:14 18689 [Note] Binlog end
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'partition'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'BLACKHOLE'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'ARCHIVE'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_FT_DELETED'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_METRICS'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_CMPMEM'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_CMP_RESET'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_CMP'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_LOCKS'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'INNODB_TRX'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'MRG_MYISAM'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'CSV'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'MEMORY'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'MyISAM'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'sha256_password'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'mysql_old_password'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'mysql_native_password'
    2015-09-28 20:46:14 18689 [Note] Shutting down plugin 'binlog'
    2015-09-28 20:46:14 18689 [Note] /usr/sbin/mysqld: Shutdown complete
    
    150928 20:46:14 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
    150928 20:59:32 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    2015-09-28 20:59:33 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
    2015-09-28 20:59:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2015-09-28 20:59:33 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25-1~dotdeb+7.1) starting as process 20932 ...
    2015-09-28 20:59:33 20932 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)
    
    2015-09-28 20:59:33 20932 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)
    
    2015-09-28 20:59:33 20932 [Note] Plugin 'FEDERATED' is disabled.
    2015-09-28 20:59:33 20932 [ERROR] Function 'innodb' already exists
    2015-09-28 20:59:33 20932 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'.
    2015-09-28 20:59:33 20932 [ERROR] Function 'federated' already exists
    2015-09-28 20:59:33 20932 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'.
    2015-09-28 20:59:33 20932 [ERROR] Function 'blackhole' already exists
    2015-09-28 20:59:33 20932 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'.
    2015-09-28 20:59:33 20932 [ERROR] Function 'archive' already exists
    2015-09-28 20:59:33 20932 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'.
    2015-09-28 20:59:33 20932 [Note] InnoDB: Using atomics to ref count buffer pool pages
    2015-09-28 20:59:33 20932 [Note] InnoDB: The InnoDB memory heap is disabled
    2015-09-28 20:59:33 20932 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2015-09-28 20:59:33 20932 [Note] InnoDB: Memory barrier is not used
    2015-09-28 20:59:33 20932 [Note] InnoDB: Compressed tables use zlib 1.2.7
    2015-09-28 20:59:33 20932 [Note] InnoDB: Using Linux native AIO
    2015-09-28 20:59:33 20932 [Note] InnoDB: Not using CPU crc32 instructions
    2015-09-28 20:59:33 20932 [Note] InnoDB: Initializing buffer pool, size = 64.0M
    2015-09-28 20:59:33 20932 [Note] InnoDB: Completed initialization of buffer pool
    2015-09-28 20:59:33 20932 [Note] InnoDB: Highest supported file format is Barracuda.
    2015-09-28 20:59:33 20932 [Note] InnoDB: The log sequence numbers 1626403 and 1626403 in ibdata files do not match the log sequence number 1626413 in the ib_logfiles!
    2015-09-28 20:59:33 20932 [Note] InnoDB: Database was not shutdown normally!
    2015-09-28 20:59:33 20932 [Note] InnoDB: Starting crash recovery.
    2015-09-28 20:59:33 20932 [Note] InnoDB: Reading tablespace information from the .ibd files...
    2015-09-28 20:59:33 20932 [Note] InnoDB: Restoring possible half-written data pages
    2015-09-28 20:59:33 20932 [Note] InnoDB: from the doublewrite buffer...
    2015-09-28 20:59:33 20932 [Note] InnoDB: 128 rollback segment(s) are active.
    2015-09-28 20:59:33 20932 [Note] InnoDB: Waiting for purge to start
    2015-09-28 20:59:33 20932 [Note] InnoDB: 5.6.25 started; log sequence number 1626413
    2015-09-28 20:59:33 20932 [Note] Server hostname (bind-address): '*'; port: 3306
    2015-09-28 20:59:33 20932 [Note] IPv6 is available.
    2015-09-28 20:59:33 20932 [Note]   - '::' resolves to '::';
    2015-09-28 20:59:33 20932 [Note] Server socket created on IP: '::'.
    2015-09-28 20:59:33 20932 [Note] Event Scheduler: Loaded 0 events
    2015-09-28 20:59:33 20932 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.6.25-1~dotdeb+7.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
    2015-09-28 20:59:33 20932 [ERROR] /usr/sbin/mysqld: Table './dbispconfig/monitor_data' is marked as crashed and should be repaired
    2015-09-28 20:59:33 20932 [Warning] Checking table:   './dbispconfig/monitor_data'
    2015-09-28 20:59:33 20932 [ERROR] /usr/sbin/mysqld: Table './dbispconfig/sys_log' is marked as crashed and should be repaired
    2015-09-28 20:59:33 20932 [Warning] Checking table:   './dbispconfig/sys_log'
    2015-09-28 20:59:33 20932 [ERROR] /usr/sbin/mysqld: Table './dbispconfig/sys_session' is marked as crashed and should be repaired
    2015-09-28 20:59:33 20932 [Warning] Checking table:   './dbispconfig/sys_session'
    
     
  12. cbj4074

    cbj4074 Member

    Yep, that's your problem. Your server only has 512MB of RAM, which in the vast majority of modern use-cases, is nowhere near enough.

    This is what those numbers mean (from "free -m"): You have 502MB of memory, 496MB have been consumed, and you have 5MB free.

    So, even 64MB for the InnoDB buffer pool is too much, and MySQL will not start (or if it does, it will not stay running).
     
  13. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    If you don´t need innodb, you can disable innodb. But you should have at least 2GB ram.
     
  14. anthonywang

    anthonywang Member

    Many thanks for your quick reply,
    today,first time i check the output of free -m the output:
    root@server:~# free -m
    Code:
                 total       used       free     shared    buffers     cached
    Mem:           502        276        226          0          7         75
    -/+ buffers/cache:        193        308
    Swap:            0          0          0
    
    then i change my.cnf
    innodb_buffer_pool_size = 50M
    and check it again
    it's become:

    Code:
    root@server:~# service mysql restart
    [ ok ] Stopping MySQL database server: mysqld.
    [....] Starting MySQL database server: mysqldNo directory, logging in with HOME=/
    . ok
    [info] Checking for tables which need an upgrade, are corrupt or were
    not closed cleanly..
    root@server:~# free -m
                 total       used       free     shared    buffers     cached
    Mem:           502        394        108          0          2         85
    -/+ buffers/cache:        306        196
    Swap:            0          0          0
    
    is it okay?

    by the way,my server in digitalocean
    • 512MBMemory
    • 1 CoreProcessor
    and i only have 3 domain name on this server,and doesn't have any website's database,only have few Html document on it,so i don't know why the free memory only 5MB?
     
  15. anthonywang

    anthonywang Member

    looks like Mysql auto shutdown again,and free memory become 228
    ========================================================================
    root@server:~# free -m
    total used free shared buffers cached
    Mem: 502 394 108 0 2 85
    -/+ buffers/cache: 306 196
    Swap: 0 0 0
    root@server:~# ^C
    root@server:~# ^C
    You have new mail in /var/mail/root
    root@server:~# free -m
    total used free shared buffers cached
    Mem: 502 273 228 0 6 62
    -/+ buffers/cache: 204 297
    Swap: 0 0 0
    root@server:~# free -m
    total used free shared buffers cached
    Mem: 502 273 228 0 6 62
    -/+ buffers/cache: 204 297
    Swap: 0 0 0
    root@server:~# nmap -p 3306 localhost

    Starting Nmap 6.00 ( http://nmap.org ) at 2015-09-29 08:09 UTC
    Nmap scan report for localhost (127.0.0.1)
    Host is up (0.00017s latency).
    rDNS record for 127.0.0.1: 127.0.0.1
    PORT STATE SERVICE
    3306/tcp closed mysql

    Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not enough for a full install, you should upgrade to 1 GB.

    This does not matter much for the RAM consumption as there is a basic consumption of about 750MB on a server that provides web, mail, dns and FTP services.
     
  17. anthonywang

    anthonywang Member

    many thanks for remind me,
    if i disabling ClamAV, and Amavis,how many memory i need?
    512MB is enough?
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    It might be that 512 MB are enough then.
     
  19. anthonywang

    anthonywang Member

    Many thanks,till
    it's working now,very grateful for your help:)
     
  20. cbj4074

    cbj4074 Member

    Glad you were able to get it working, anthonywang!

    Do you mind sharing what steps you took to resolve the issue? Someone else may have the exact same hardware specs and operating system, and it would be most helpful if you tell us exactly how you cleared-up the problem.

    Was the solution simply to stop ClamAV and AMaViS? In my experience they are memory-hungry and will chew-up whatever they can get in the way of RAM.

    AMaViS's memory consumption can be tuned to some extent. The simplest approach (to my knowledge) is to do the following:

    Code:
    # echo '$max_servers = 1;' > /etc/amavis/conf.d/51-lowmem.conf
    # service amavis restart
    
    I'm not sure if the same type of adjustment can be made for ClamAV.

    Anyway, glad it's resolved!
     

Share This Page