The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Multiple MySQL Processes

Discussion in 'CloudLinux' started by urgido, Sep 21, 2016.

  1. urgido

    urgido Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    66
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi, here is my log hostname.err

    Code:
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    160921 12:30:04  InnoDB: Unable to open the first data file
    InnoDB: Error in opening ./ibdata1
    160921 12:30:04  InnoDB: Operating system error number 11 in a file operation.
    InnoDB: Error number 11 means 'Resource temporarily unavailable'.
    InnoDB: Some operating system error numbers are described at
    InnoDB: MySQL :: MySQL 5.5 Reference Manual
    160921 12:30:04 InnoDB: Could not open or create data files.
    160921 12:30:04 InnoDB: If you tried to add new data files, and it failed here,
    160921 12:30:04 InnoDB: you should now edit innodb_data_file_path in my.cnf back
    160921 12:30:04 InnoDB: to what it was, and remove the new ibdata files InnoDB created
    160921 12:30:04 InnoDB: in this failed attempt. InnoDB only wrote those files full of
    160921 12:30:04 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
    160921 12:30:04 InnoDB: remove old data files which contain your precious data!
    160921 12:30:04 [ERROR] Plugin 'InnoDB' init function returned error.
    160921 12:30:04 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    160921 12:30:08 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    160921 12:30:08 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
    160921 12:30:08 [Note] Server socket created on IP: '0.0.0.0'.
    160921 12:30:08 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
    160921 12:30:08 [ERROR] Do you already have another mysqld server running on port: 3306 ?
    160921 12:30:08 [ERROR] Aborting
    And here is my my.cnf
    Code:
    [mysqld]
    local-infile=0
    default-storage-engine=MyISAM
    innodb_file_per_table=1
    max_allowed_packet=268435456
    open_files_limit=50000
    local-infile=0
    
    query_cache_type=0
    join_buffer_size=300K
    tmp_table_size=128M
    max_heap_table_size=128M
    thread_cache_size=4
    innodb_buffer_pool_size=1G
    
    key_buffer_size=256M
    table_open_cache=500
    log-slow-queries=/var/lib/mysql/slow.log
    
    
    The service is crashing every five minutes,can you give me a hand?
    Bless
     
    #1 urgido, Sep 21, 2016
    Last edited by a moderator: Sep 21, 2016
  2. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    #1: Make sure your /var/ partition isn't full
    #2: Make sure your mysql user can write to /var/lib/mysql (and all of it's subdirectories/files)
     
  3. NOC_Serverpoint

    NOC_Serverpoint Active Member

    Joined:
    Jul 3, 2016
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Couple of things to verify :
    - Any other MySQL process already running ?
    You can use command lsof -i:3306 to check. If so kill it.
    - Delete/Move all ibdata files and let mysql create them
     
  4. urgido

    urgido Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    66
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    total 200
    drwxr-xr-x 25 root root 4096 Sep 23 11:56 ./
    drwxr-xr-x 25 root root 4096 Sep 20 02:32 ../
    drwxr-xr-x 10 root root 4096 Sep 15 03:42 cache/
    srw-rw-rw- 1 root root 0 Sep 23 11:56 clamd=
    drwx--x--x 102 root root 12288 Sep 23 12:00 cpanel/
    drwxr-xr-x 2 root root 4096 Nov 22 2013 cvs/
    drwxr-xr-x 4 root root 4096 Apr 20 2012 db/
    drwxr-xr-x 3 root root 4096 Apr 20 2012 empty/
    drwxr-xr-x 2 root root 4096 Sep 23 2011 games/
    drwxr-xr-x 23 root root 4096 Sep 23 04:02 lib/
    drwxr-xr-x 2 root root 4096 Sep 23 2011 local/
    drwxrwxr-x 3 root lock 4096 Sep 23 11:54 lock/
    drwxr-xr-x 10 root root 4096 Sep 23 11:54 log/
    lrwxrwxrwx 1 root root 10 Sep 4 00:14 mail -> spool/mail/
    drwxr-xr-x 6 named named 53248 Sep 23 09:48 named/
    drwxr-xr-x 6 named named 24576 Sep 4 20:53 named-backup/
    drwxr-xr-x 6 named named 24576 Sep 5 18:03 named.backup/
    drwxr-xr-x 2 root root 4096 Sep 23 2011 nis/
    drwxr-xr-x 2 root root 4096 Sep 23 2011 opt/
    drwxr-xr-x 2 root root 4096 Sep 23 2011 preserve/
    drwxr-xr-x 4 root root 4096 Aug 17 2015 profiles/
    drwxr-xr-x 22 root root 4096 Sep 23 11:59 run/
    drwxr-xr-x 69 root root 4096 Sep 22 12:46 softaculous/
    drwxr-xr-x 10 root root 4096 Sep 6 00:00 spool/
    drwxrwxrwt 2 root root 4096 Sep 23 10:58 tmp/
    drwxr-xr-x 6 root root 4096 Aug 24 14:32 www/
    drwxr-xr-x 2 root root 4096 Sep 23 2011 yp/
     
  5. urgido

    urgido Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    66
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    No other process is running

    I see these on my log file

    160923 11:55:26 InnoDB: Operating system error number 11 in a file operation.
    InnoDB: Error number 11 means 'Resource temporarily unavailable'.
    InnoDB: Some operating system error numbers are described at
    InnoDB: MySQL :: MySQL 5.5 Reference Manual
    160923 11:55:26 InnoDB: Could not open or create data files.
    160923 11:55:26 InnoDB: If you tried to add new data files, and it failed here,
    160923 11:55:26 InnoDB: you should now edit innodb_data_file_path in my.cnf back
    160923 11:55:26 InnoDB: to what it was, and remove the new ibdata files InnoDB created
    160923 11:55:26 InnoDB: in this failed attempt. InnoDB only wrote those files full of
    160923 11:55:26 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
    160923 11:55:26 InnoDB: remove old data files which contain your precious data!
    160923 11:55:26 [ERROR] Plugin 'InnoDB' init function returned error.
    160923 11:55:26 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    160923 11:55:26 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    160923 11:55:26 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    160923 11:55:26 [Note] Server socket created on IP: '0.0.0.0'.
    160923 11:55:29 [Note] Event Scheduler: Loaded 0 events
    160923 11:55:29 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.5.52-cll' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
     
  6. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Now I can see your mysql services is running on your server, If you are getting any other mysql InnoDB error logs on your server then might be your InnoDB tables are corrupted, Please check following cPanel docs and try to repair it.

    InnoDB Corruption Repair Guide
     
  7. AmedeoSca

    AmedeoSca Member

    Joined:
    Aug 23, 2015
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Italy
    cPanel Access Level:
    Root Administrator
    I have the same problem in one server, (but i think that will be in some other) the start scritpt /scripts/restartsrv_mysql start 2 istances of service
    Code:
    /scripts/restartsrv_mysql --start
    
    ps aux | grep mysql
    
    mysql      21644  0.1  0.0 113124  1576 ?        Ss   03:10   0:00 /bin/sh /usr/bin/mysqld_safe
    mysql      21726  0.1  0.0 113124  1592 ?        Ss   03:10   0:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
    mysql      22025  0.6  0.0 600200 45612 ?        Sl   03:10   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lib/mysql/log.net.err --open-files-limit=10000 --pid-file=/var/lib/mysql/mysql.pid
    mysql      22098  0.2  0.0 428512 31532 ?        Sl   03:10   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lib/mysql/mysql.err --open-files-limit=10000 --pid-file=/var/lib/mysql/mysql.pid
    root       22306  0.0  0.0 112648   968 pts/0    S+   03:11   0:00 grep --color=auto mysql
    I must kill the second process (the one with mysql 21726 0.1 0.0 113124 1592 ? Ss 03:10 0:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr) and it's all ok

    This is the log when I kill the second process
    Code:
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 11
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    160929  3:15:27  InnoDB: Unable to open the first data file
    InnoDB: Error in opening ./ibdata1
    160929  3:15:27  InnoDB: Operating system error number 11 in a file operation.
    InnoDB: Error number 11 means 'Resource temporarily unavailable'.
    InnoDB: Some operating system error numbers are described at
    InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
    160929  3:15:27 InnoDB: Could not open or create data files.
    160929  3:15:27 InnoDB: If you tried to add new data files, and it failed here,
    160929  3:15:27 InnoDB: you should now edit innodb_data_file_path in my.cnf back
    160929  3:15:27 InnoDB: to what it was, and remove the new ibdata files InnoDB created
    160929  3:15:27 InnoDB: in this failed attempt. InnoDB only wrote those files full of
    160929  3:15:27 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
    160929  3:15:27 InnoDB: remove old data files which contain your precious data!
    160929  3:15:27 [ERROR] Plugin 'InnoDB' init function returned error.
    160929  3:15:27 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    160929  3:15:27 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    160929  3:15:27 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
    160929  3:15:27 [Note] Server socket created on IP: '0.0.0.0'.
    160929  3:15:27 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
    160929  3:15:27 [ERROR] Do you already have another mysqld server running on port: 3306 ?
    160929  3:15:27 [ERROR] Aborting
    
    160929  3:15:27 [Note] /usr/sbin/mysqld: Shutdown complete
    This is a VERY BIG mistake and crash an important service as mysql ...............
     
    #7 AmedeoSca, Sep 28, 2016
    Last edited: Sep 28, 2016
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  9. AmedeoSca

    AmedeoSca Member

    Joined:
    Aug 23, 2015
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Italy
    cPanel Access Level:
    Root Administrator
    Yes are installed both CloudLinux and MySQL Governor... and the problem is not solved at now...
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    CloudLinux is aware of an issue where MySQL/MariaDB with mysql-governor installed results in duplicate instances of the service. You can follow the CloudLinux blog to see when a new package for MySQL Governor has been published:

    CloudLinux - Main | New template

    In the meantime, the temporary workaround is to disable MySQL Governor, or move "/usr/lib/systemd/system/mysqld.service" out of the way (and "/usr/lib/systemd/system/mariadb.service" if applicable), run "systemctl daemon-reload", and restart MySQL. Additional assistance is also available on the CloudLinux support forums:

    Forum

    Let us know if you have any questions.

    Thank you.
     
  11. Bazinga

    Bazinga Active Member

    Joined:
    Aug 23, 2016
    Messages:
    26
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    Ukraine
    cPanel Access Level:
    Website Owner
    The errors like "InnoDB: Unable to lock ./ibdata1, error: 11" are related to few instances of mysql service started on CloudLinux 7. Bugreport has been filled with CL however it is still not resolved.

    A workaround provided by Michael looks to be good.
     
Loading...

Share This Page